A high-performance URL shortening service built with a modern tech stack for robust functionality and a smooth user experience.
- FastAPI - Web framework.
- Uvicorn - HTTP Server.
- Pydantic - data validation and settings management.
- MongoDB - Data Storage.
- Redis - In-memory cache for analytics and rate limiting.
- Celery - Distributed task queue for background processing e.g fetching Url preview data.
- Create short, memorable URLs from long, unwieldy links.
- Gain detailed analytics on shortened URLs, including clicks, referrers, and location data.
- Generate QR codes for quick sharing of shortened links.
- Protected endpoints with robust rate limiting.
- Dockerized Setup.
- JWT token authentication.
- Docker
- Clone the repository
git clone https://github.com/EiseWilliam/scissor-api
- Change directory
cd scissor-api
- Build the docker images
docker-compose build
- Start the services
docker-compose up
- Access the API docs at
http://localhost:8000/docs
If you want to make changes to environment variables like jwt secret key, you can do so by editing the envsampledocker
file in the root directory and renaming it to .env
.
by default all env variables for docker setup is defined in scissor-api/app/core/config/settings.py
file.
- Python 3.10
- MongoDB
- Redis
- Clone the repository
git clone https://github.com/EiseWilliam/scissor-api
- Change directory
cd scissor-api
- Create a virtual environment
python3 -m venv venv
- Activate the virtual environment
source venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Environment variables
cp .envsample .env
- Start the server
python3 run.py
- Access the API docs at
http://localhost:8000/docs
View API documentation at Scissor API Documentation
View the frontend repo at Scissor Frontend