SnapLink is a simple yet powerful URL shortener built with Python (Django) and React for the frontend. It allows users to shorten long URLs, track visits, and even generate QR codes for quick access.
- 🔗 URL Shortening – Convert long URLs into short, easy-to-share links.
- 📊 Click Tracking – See how many times a link has been accessed.
- ⏳ Expiration Dates – Set an expiry time for temporary links.
- 📸 QR Code Generation – Generate QR codes for each shortened URL (To Do).
- 🚀 Fast & Lightweight – Uses HTMX/React for a snappy frontend experience (To Do).
- Python (Django)
- SQLite/PostgreSQL (Database)
- Redis (Caching short URLs for performance)
- React
- Tailwind CSS (for styling)
-
Clone the Repository
git clone https://github.com/madhvi-n/snaplink.git cd snaplink
-
Set up a virtual environment
python -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
-
Install Dependencies
pip install -r requirements.txt
-
Apply Database Migrations
python manage.py migrate
-
Create a Superuser
python manage.py createsuperuser
-
Run the Development Server
python manage.py runserver
Access the application at: http://127.0.0.1:8000
-
Install dependencies
npm install
-
Run the Development Server
npm run dev
The API documentation is available via Swagger:
- Swagger UI:
http://127.0.0.1:8000/api/swagger/
- Redoc:
http://127.0.0.1:8000/api/redoc/
SECRET_KEY=django-secret-key
DEBUG=True
BASE_URL=http://localhost:8000