A simple and modern URL shortener built with Next.js, NestJS, Redis, and Docker. Create shortened URLs instantly with QR code generation and easy sharing capabilities.
- 🔗 URL Shortening
- 📱 QR Code Generation
- 📋 Copy to Clipboard
- ⬇️ QR Code Download
- 👤 Personal Accounts for URL Tracking
- 📊 Analytics Dashboard
- ⚡ Rate Limiting
- 💨 Response Caching
- Frontend: Next.js 14 - Server-side rendering and API routes for optimal performance
- Backend: NestJS - Robust and scalable backend API framework
- Database: Redis - High-performance key-value store for URL mappings
- Containerization: Docker - Simplified deployment and development environment
- Node.js (v18 or higher)
- Docker and Docker Compose
- Redis (if running locally without Docker)
- Git
- Clone the repository:
git clone https://github.com/ninadnaik10/shortomega.git
cd shortomega
- Build and run with Docker Compose:
docker-compose up --build
The application will be available at:
- Frontend: http://localhost:3001
- Backend: http://localhost:3000
- Clone the repository:
git clone https://github.com/ninadnaik10/shortomega.git
cd shortomega
- Setup Backend:
cd shortomega-backend
yarn install
yarn start:dev
- Setup Frontend:
cd shortomega-frontend
yarn install
yarn dev
- Ensure Redis is running locally on default port (6379)
Rename .example.env to .env
REDIS_HOST=localhost
REDIS_PORT=6379
POST /api/shorten
- Create shortened URLGET /api/get-url/:hash
- Retrieve original URLGET /:hash
- Redirect to original URL
The project follows a monorepo structure with separate frontend and backend directories:
shortomega/
├── frontend/ # Next.js frontend application
├── backend/ # NestJS backend application
├── docker-compose.yml # Docker composition file
└── .dockerignore # Docker ignore rules
The frontend is built with Next.js and includes:
- Server-side rendering for optimal performance
- API routes for backend communication
- QR code generation and download functionality
- Responsive design with modern UI components
The backend uses NestJS and includes:
- RESTful API endpoints
- Redis integration for URL storage
- URL validation and processing
- Error handling and logging
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the GNU GPLv3.0 License - see the LICENSE file for details.
For support, please open an issue in the GitHub repository.