Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ninadnaik10/shortomega
A simple and modern URL shortener built with Next.js, NestJS, and Redis.
https://github.com/ninadnaik10/shortomega
docker docker-compose nestjs nextjs open-source redis url-shortener
Last synced: 2 months ago
JSON representation
A simple and modern URL shortener built with Next.js, NestJS, and Redis.
- Host: GitHub
- URL: https://github.com/ninadnaik10/shortomega
- Owner: ninadnaik10
- License: gpl-3.0
- Created: 2024-10-29T04:56:33.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-25T19:06:37.000Z (3 months ago)
- Last Synced: 2024-11-25T20:18:18.058Z (3 months ago)
- Topics: docker, docker-compose, nestjs, nextjs, open-source, redis, url-shortener
- Language: TypeScript
- Homepage: https://shortomega.ninadnaik.xyz
- Size: 687 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Shortomega
 
   
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.
## Features
### Current Features
- 🔗 URL Shortening
- 📱 QR Code Generation
- 📋 Copy to Clipboard
- ⬇️ QR Code Download### Upcoming Features
- 👤 Personal Accounts for URL Tracking
- 📊 Analytics Dashboard
- ⚡ Rate Limiting
- 💨 Response Caching## Tech Stack
- **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## Images

## Prerequisites
- Node.js (v18 or higher)
- Docker and Docker Compose
- Redis (if running locally without Docker)
- Git## Local Development Setup
### Option 1: Using Docker (Recommended)
1. Clone the repository:
```bash
git clone https://github.com/ninadnaik10/shortomega.git
cd shortomega
```2. Build and run with Docker Compose:
```bash
docker-compose up --build
```The application will be available at:
- Frontend: http://localhost:3001
- Backend: http://localhost:3000### Option 2: Manual Setup
1. Clone the repository:
```bash
git clone https://github.com/ninadnaik10/shortomega.git
cd shortomega
```2. Setup Backend:
```bash
cd shortomega-backend
yarn install
yarn start:dev
```3. Setup Frontend:
```bash
cd shortomega-frontend
yarn install
yarn dev
```4. Ensure Redis is running locally on default port (6379)
## Environment Variables
### Frontend (.env)
Rename .example.env to .env
### Backend (.env)
```
REDIS_HOST=localhost
REDIS_PORT=6379
```## API Endpoints
- `POST /api/shorten` - Create shortened URL
- `GET /api/get-url/:hash` - Retrieve original URL
- `GET /:hash` - Redirect to original URL## Project Structure
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
```## Development
### Frontend Development
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### Backend Development
The backend uses NestJS and includes:
- RESTful API endpoints
- Redis integration for URL storage
- URL validation and processing
- Error handling and logging## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request## License
This project is licensed under the GNU GPLv3.0 License - see the LICENSE file for details.
## Support
For support, please open an issue in the GitHub repository.