BackendGetting Started
Overview
Get the HyperSaaS backend up and running.
Introduction
The HyperSaaS backend is a Django 5 application built on cookiecutter-django. It provides a production-ready REST API with authentication, multi-tenancy, AI chat, document management, and Stripe billing.
Tech Stack
| Technology | Version | Purpose |
|---|---|---|
| Python | 3.12+ | Runtime |
| Django | 5.1 | Web framework |
| Django REST Framework | 3.16 | API layer |
| PostgreSQL | 17 | Database |
| pgvector | 0.3 | Vector similarity search |
| Redis | 6+ | Cache & message broker |
| Celery | 5.5 | Background task queue |
| Docker | Latest | Containerization |
Prerequisites
- Python 3.12+
- Docker & Docker Compose
- PostgreSQL 15+ with pgvector extension
- Redis 6+
- An OpenAI API key (for embeddings and AI models)
- A Stripe account (for billing)
Quick Start
# Clone and enter the backend directory
git clone <your-repo-url>
cd backend
# Copy environment files
cp .envs/.local/.django.example .envs/.local/.django
cp .envs/.local/.postgres.example .envs/.local/.postgres
# Build and start all services
docker compose -f docker-compose.local.yml build
docker compose -f docker-compose.local.yml up -d
# Run migrations
docker exec backend_local_django python manage.py migrate
# Create a superuser
docker exec -it backend_local_django python manage.py createsuperuserThe API is now available at http://localhost:8000/api/ and the admin panel at http://localhost:8000/admin/.