A full-stack URL shortening service built as a learning project.
- Shorten long URLs to short codes
- JWT authentication (register/login)
- Redis caching for fast redirects
- Rate limiting on URL creation
- Click tracking
- Node.js + Express
- PostgreSQL
- Redis
- Docker + Docker Compose
- JWT + bcrypt
| Method | Route | Auth | Description |
|---|---|---|---|
| POST | /auth/register | No | Create account |
| POST | /auth/login | No | Get JWT token |
| POST | /urls | Yes | Shorten a URL |
| GET | /urls | Yes | Get your URLs |
| GET | /:code | No | Redirect to original URL |
git clone <repo>
cd url
cp .env.example .env
docker-compose up --build- Frontend: https://snip-frontend-two.vercel.app
- Backend: https://snip-omzp.onrender.com
Copy .env.example to .env and fill in your values.
cp .env.example .env