Architecture
Overview of the HyperSaaS tech stack and project structure.
Tech Stack
Backend
| Technology | Purpose |
|---|---|
| Django 5 | Web framework |
| Django REST Framework | API layer |
| PostgreSQL + pgvector | Database with vector search |
| Celery + Redis | Background tasks |
| Docker | Containerization |
Frontend
| Technology | Purpose |
|---|---|
| Next.js 15 | React framework |
| TypeScript | Type safety |
| Tailwind CSS v4 | Styling |
| shadcn/ui | Component library |
| NextAuth | Authentication |
AI Agent System
HyperSaaS uses a pluggable multi-framework agent architecture:
- LangGraph — Default handler, supports tool calling and streaming
- PydanticAI — Alternative handler for structured outputs
- Custom — Extend
BaseAgentHandlerfor any framework
Project Structure
backend/
├── backend/
│ ├── chat/ # Chat sessions, messages, AI handlers
│ ├── documents/ # Knowledge base, RAG, embeddings
│ ├── users/ # User management
│ ├── workspaces/ # Multi-tenancy
│ └── subscriptions/ # Stripe billing
├── config/ # Django settings, URLs, API router
└── requirements/ # Pip dependencies
frontend/
├── src/
│ ├── app/ # Next.js App Router pages
│ ├── components/ # UI components
│ ├── lib/ # Utilities, types, actions
│ └── config/ # Site configuration
└── public/ # Static assets