Minimal, production-ready URL shortener.
- ⚡ Fully async backend (FastAPI + SQLAlchemy)
- 🔗 Configurable redirects (
302/307) - 📊 Optional click tracking
- 🎨 Minimal UI (React + Tailwind)
- 🚀 Ready for production scaling
- FastAPI
- SQLAlchemy (async)
- PostgreSQL
- Alembic
- Pydantic
- React
- Vite
- TypeScript
- TailwindCSS
.
├── alembic/
├── frontend/
├── src/
│ ├── api/
│ ├── core/
│ ├── models/
│ ├── repository/
│ ├── schemas/
│ ├── services/
│ └── utils/
├── .env.example
├── alembic.ini
├── main.py
└── requirements.txtcp .env.example .env
pip install -r requirements.txt
alembic upgrade head
uvicorn src.main:app --host 0.0.0.0 --port 8000cd frontend
npm install
npm run devPOST /shorten{
"original_url": "https://example.com"
}{
"short_code": "AbXyQz",
"short_url": "http://127.0.0.1:8000/AbXyQz",
"original_url": "https://example.com",
"created_at": "2026-04-15T12:00:00Z"
}GET /{code}
