HyperSaaS

Architecture

Overview of the HyperSaaS tech stack and project structure.

Tech Stack

Backend

TechnologyPurpose
Django 5Web framework
Django REST FrameworkAPI layer
PostgreSQL + pgvectorDatabase with vector search
Celery + RedisBackground tasks
StripePlans, checkout and billing portal
DockerContainerization

Frontend

TechnologyPurpose
Next.js 16React framework
TypeScriptType safety
Tailwind CSS v4Styling
shadcn/ui on Base UIComponent library
NextAuthAuthentication

AI Agent System

HyperSaaS uses a pluggable multi-framework agent architecture:

  • LangGraph — Default handler, with tool calling and streamed replies
  • PydanticAI — Alternative handler for structured outputs
  • Custom — Extend BaseAgentHandler for any framework

Project Structure

backend/
├── backend/
│   ├── chat/          # Chat sessions, messages, AI handlers, streaming
│   ├── core/          # Rate limits, tracing
│   ├── documents/     # Knowledge base, RAG, embeddings, evaluation
│   ├── users/         # Accounts
│   ├── workspaces/    # Multi-tenancy, AI usage metering
│   └── subscriptions/ # Plans and Stripe billing
├── config/            # Django settings, URLs, API router
├── docs/              # Plans, evaluation reports and runbooks
└── requirements/      # Pip dependencies

frontend/
├── src/
│   ├── app/           # Next.js App Router pages
│   ├── components/    # UI components
│   ├── lib/           # Utilities, types, actions
│   └── config/        # Site configuration
└── public/            # Static assets

On this page