ZipLink is a URL shortener application built with Go and Fiber framework. It allows users to create custom short URLs for long URLs, making them easier to share and manage.
- Custom Short URLs: Users can create custom short URLs according to their preferences.
- Expiration: Optionally set an expiration time for short URLs.
- Rate Limiting: Rate limiting to prevent abuse and ensure fair usage.
- Swagger Documentation: Swagger UI integration for API documentation.
- Dockerized: Docker and Docker Compose setup for easy deployment.
- Go: Backend language
- Fiber: Web framework for Go
- Redis: Backend data store for storing short URLs and rate limiting information
- Docker: Containerization for deployment
- Swagger: API documentation
-
Clone the repository:
git clone https://github.com/sachin-404/ZipLink.git
-
Navigate to the project directory:
cd ZipLink
-
Set up environment variables:
Create a .env file in the project root directory and specify the following environment variables:
DB_ADDRESS="db:6379" DB_PASSWORD="" APP_PORT=":3000" DOMAIN="localhost:3000" API_QUOTA=10
-
Build and run the Docker containers:
docker compose up --build
-
Access the application at
http://localhost:3000.
-
Shorten a URL: Send a POST request to /api/v1 with the long URL in the request body. Optionally, you can provide a custom short URL and expiration time.
-
Resolve a Short URL: Access the shortened URL generated by the application to be redirected to the original long URL.
-
API Documentation: Access Swagger UI documentation at http://localhost:3000/docs for detailed API documentation.