Production REST API for the HackathonFeed platform. Sits on top of the existing Supabase hackathons table populated by the scraper pipeline.
Frontend → FastAPI Routes → Services → Repositories → Supabase/PostgreSQL
- Copy environment file:
cp .env.example .env-
Set
DATABASE_URLto your Supabase PostgreSQL connection string and configure JWT secrets. -
Install dependencies with uv:
uv sync- Run database migrations (creates user tables, bookmarks, analytics, and tracked projects):
uv run alembic upgrade headOr run database/backend_schema.sql in the Supabase SQL Editor, then verify:
uv run python scripts/verify_tables.py- Start the API:
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Open Swagger docs at http://localhost:8000/docs.
| Area | Endpoints |
|---|---|
| Auth | POST /api/v1/auth/register, /login, /refresh, GET /me |
| Users | GET/PATCH /api/v1/users/me |
| Hackathons | GET /api/v1/hackathons, /search, /trending, /{id} |
| Bookmarks | POST/GET/DELETE /api/v1/bookmarks |
| Tracked projects | GET/POST/PATCH/DELETE /api/v1/tracked-projects, register, steps, milestones, notes, team |
| Themes | GET /api/v1/themes, /themes/platforms |
| Trends | GET /api/v1/trends/hackathons, /themes, /platforms |
| Admin | GET /api/v1/admin/stats, POST /scrape, DELETE /hackathon/{id} |
All successful responses follow:
{
"success": true,
"message": "...",
"data": {}
}app/api/– HTTP routes and dependenciesapp/services/– business logicapp/repositories/– database accessapp/models/– SQLAlchemy ORM modelsapp/schemas/– Pydantic DTOsapp/core/– config, security, database, loggingapp/middleware/– logging and rate limiting
- The
hackathonstable is owned by the scraper; this backend reads it and adds user-facing features. - Redis caching and background analytics jobs can be wired through APScheduler in a later phase.
- Create an admin user by updating the
rolecolumn in Supabase after registration.