Tech Stack & Architecture
Cascade is built using a modern decoupled architecture.
Tech Stack Overview
| Layer | Technology |
|---|---|
| Frontend | SvelteKit (Svelte 5, TypeScript, Vite) |
| Backend | Go 1.22 — standard net/http |
| Auth | Supabase + Google OAuth 2.0 |
| Database | MongoDB (via mongo-driver/v2) |
| Editor | TipTap (ProseMirror based rich-text editor) |
| AI Inference | Groq API (llama-3.1-8b-instant model) |
| Styling | Vanilla CSS — glassmorphism, pinkish theme |
System Design
graph LR
Frontend[SvelteKit Frontend] -->|REST & JWT| Backend[Go REST Backend]
Backend -->|Validation| DB[(MongoDB)]
Frontend -->|OAuth| Supabase[Supabase Auth]
Backend -.->|JWKS Key Verification| Supabase
Backend -->|LLM Prompts| Groq[Groq AI Inference]
Flow of Authentication
- User Sign in: The user clicks "Continue with Google". Supabase handles the OAuth flow and returns a signed JWT.
- Backend Validation: The frontend passes the JWT to the Go
GET /auth/callbackendpoint as a bearer token. The Go backend fetches the JWKS from Supabase and cryptographically verifies the token. - Database Upsert: Upon successful verification, the user record is either created or updated (login timestamp) in the MongoDB
userscollection.