A modern URL shortening service built with Django that provides secure URL management with user authentication and tracking capabilities.
- URL Shortening: Generate concise URLs for long web addresses
- User Authentication: Email-based signup/login with OTP verification
- Custom Short URLs: Create personalized memorable short links
- Analytics: Track clicks and usage statistics
- Responsive Design: Mobile-first interface that works on all devices
- One-Click Copy: Easy clipboard copying of shortened URLs
- Profile Dashboard: Manage all your shortened URLs in one place
- Backend: Django 5.1 with custom user authentication
- Frontend: HTML, CSS, JavaScript
- Database: SQLite
- Server: Nginx + Gunicorn
- Containerization: Docker + Docker Compose
- CI/CD: GitHub Actions for automated deployment
-
Clone the repository and enter the directory:
git clone https://github.com/yourusername/linkradr.git cd linkradr -
Create a
.envfile with required variables:SECRET_KEY=your_secret_key DEBUG=True ALLOWED_HOSTS=localhost,127.0.0.1 EMAIL_HOST=smtp.your-email-provider.com EMAIL_PORT=587 EMAIL_HOST_USER=your-email@example.com EMAIL_HOST_PASSWORD=your-email-password
-
Build and run with Docker Compose:
docker-compose up --build
-
Access the application at http://localhost:8000
-
Create and activate virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate
-
Start development server:
python manage.py runserver
authapp- Custom authentication appshortener- Core URL shortening functionalitytemplates- HTML templatesstatic/- CSS, JS and imagesnginx- Nginx configurationscripts- Deployment scripts
The project includes GitHub Actions workflow for AWS EC2 deployment:
-
Add required secrets to GitHub repository:
EC2_HOST: EC2 instance hostname/IPEC2_SSH_KEY: SSH private key
-
Push to main branch to trigger deployment
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License.
- Made at CUSAT (Cochin University of Science and Technology)
- Special thanks to all contributors