All projects
projectlive

KEC Archives — Backend API

April 2026

REST API for KEC Archives. Python FastAPI deployed as serverless functions on Vercel. SQLAlchemy + Alembic on Supabase PostgreSQL. **Auth:** Register, OTP email verification (Resend), JWT HS256 with refresh tokens. Admin login is two-step — password then time-limited OTP. **Posts:** Scoped to Public / Students / Batch year / Faculty / Subject. Reactions, comments, bookmarks, Cloudinary media upload. **Messaging:** Full DM system with file attachments, replies, reactions, edit/delete. Group chats with invite links, join requests, member role management. **AI:** Groq LLM for post text generation. HuggingFace FLUX.1-schnell for image generation. **Admin:** Platform stats, user management (role changes, ban/unban, deletion), subject CRUD, post deletion. **Push:** Web Push notifications (pywebpush) with subscription management endpoints. All routes prefixed with `/api/v1/`. The Next.js frontend proxies to this service — both on Vercel, connected via an environment variable.

View LiveGitHub

TECH STACK

PythonFastAPISQLAlchemyAlembicSupabasePostgreSQLJWTCloudinaryResendGroqHuggingFacepywebpushVercel

TAGGED

#backend#python#fastapi#postgresql#api#ai