Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thuongtruong1009/short1url

🔗 Ship your link in an easier way
https://github.com/thuongtruong1009/short1url

cicd container docker docker-compose dockerfile github go golang nginx nuxt nuxt3 nuxtjs redis rest-api reverse-proxy seo shortener

Last synced: about 1 month ago
JSON representation

🔗 Ship your link in an easier way

Awesome Lists containing this project

README

        



logo SHORT1URL


Build status
Test status
CircleCI status
Automated api build
Automated client build
GitHub code size in bytes
License


## Description

This is a simple URL shortener service. It is written in Golang and uses Redis as database. Other hand, it also provides some services such as QR code generator, barcode generator, etc.

## Preview

![Preview image](public/preview.png)

## What's new

- [x] Shorten URL
- [x] Redirect to original URL
- [x] Expiration time
- [x] Statistics
- [x] Rate limit
- [x] QR code generator (custom color, download image)
- [x] Barcode generator
- [x] Microservices Dockerize
- [x] Auto build and deploy image
- [x] Reverse proxy
- [ ] Unit test
- [ ] Caching

## Architecture

![](public/architecture.png)

## Getting started

1. Clone this repo

```bash
git clone https://github.com/thuongtruong1009/short1url.git
```

2. Fill in environment variables

```bash
# client
cd api && cp .env.example .env

# server
cd client && cp .env.example .env
```

3. Run Docker container

```bash
docker-compose up -d
```

4. Testing API

```bash
# with browser
Open http://localhost:81/s
```

```bash
# with Postman or browser
POST http://localhost:81/s
body: {
"url": ""
}
```

```bash
# with curl
curl -X POST 'http://localhost:81/s'
-H 'Content-Type: application/json'
-d '{"url": ""}"
```

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. If you like my work, please star 🌟 this repository.

## License

**Short1url** is an [MIT-licensed](LICENSE) open source project.

Copyright of thuongtruong1009