Technical Overview
Sejong Pulse is organized as a web-first product with a Next.js application on the frontend, a FastAPI service layer on the backend, Supabase for identity and relational storage, and several optional integrations for search, messaging, media, recommendations, and AI.
Architecture
flowchart LR
user["Student user"] --> fe["Next.js frontend"]
fe --> api["FastAPI API"]
fe --> supa["Supabase Auth and Postgres"]
fe --> sendbird["Sendbird chat SDK"]
fe --> cloudinary["Cloudinary uploads"]
fe --> algolia["Algolia search"]
api --> supa
api --> redis["Redis cache and queue"]
api --> gorse["Gorse recommendations"]
api --> livekit["LiveKit sessions"]
api --> openrouter["OpenRouter-compatible AI endpoint"]
api --> sendgrid["SendGrid email"]
api --> toss["Billing provider"]
worker["Background worker"] --> redis
worker --> supa
reco["Recommendation worker"] --> gorse
reco --> supa
knowledge["Knowledge pipeline"] --> index["Knowledge index"]
api --> index
Frontend
The frontend lives in stitch/frontend and uses:
Next.jsApp RouterReact 19TypeScriptshared UI components in
src/componentsAPI and SDK helpers in
src/lib
Important route groups:
Auth flows under
src/app/(auth)Main product surfaces under
src/app/(app)shared application shell in
stitch/frontend/src/components/AppShell.tsx
Backend
The backend lives in stitch/backend and centers on:
main.pyfor the primary FastAPI application and the majority of HTTP routescontrollers/for billing and chat-focused routersservices/for external integrations and reusable domain logicworker.pyfor asynchronous job handlingrecommendation_worker.pyfor recommendation outbox processing
The service layer includes modules for:
search and indexing
billing and plan control
chat and advisor behavior
recommendation ranking and outbox delivery
official channel syncing
upload signing and media support
observability and abuse protection
Data and State
Core platform state is handled through:
Supabase Authfor user identity and sessionsSupabase Postgresfor profiles, pulses, comments, notifications, matches, channels, billing records, and feedbackRedisfor caching and durable job processingGorsefor recommendation scoring and synchronizationa local knowledge index for academic lookup
Deployment Topology
Current deployment artifacts in the repository point to:
Netlifyfor the frontend viastitch/frontend/netlify.tomlRenderfor the backend API, workers, and cron jobs viastitch/render.yamlDocker Composefor local LiveKit and Gorse infrastructure
Non-Runtime Assets
The stitch/ directory also includes stitched prototypes and diagram documents such as:
stitch/read.mdstitch/PROJECT_DIAGRAM.md
These are valuable references for product documentation even though they are not shipped as part of the runtime application.