This project implements a multi-tenant URL shortener using:
- Postgres (DB)
- Redis (cache)
- Backend API
- Java → Spring Boot (
shortener-service) - Python → FastAPI (
shortener-python)
- Java → Spring Boot (
- React App (frontend UI)
The system supports running either Java or Python backend, selectable via Docker profiles.
From the project root (where this docker-compose.yml lives):
docker compose --profile java up --builddocker compose --profile python up --build-
UI
- http://localhost:3000
- Proxies API requests via
/apito the active backend (Java or Python).
-
Backend API
- Java: http://localhost:8080
- Python: http://localhost:8000
-
Postgres DB
localhost:5432- User:
postgres - Password:
postgres - Database:
shortenerdb
-
Redis
localhost:6379
docker compose downdocker compose down -vThis removes Postgres and Redis data.
- Nginx configs are provided for both profiles:
nginx-java.conf→ proxies to Java backendnginx-python.conf→ proxies to Python backend
- The UI automatically switches backend depending on the profile used at startup.
Developed by Pinkesh Sharma
GitHub Profile