Quick start

This guide gets you from a clean checkout to a logged-in CRM in roughly five minutes using Docker Compose.

Prerequisites

  • Docker + Docker Compose v2
  • Git
  • A free port at 8000 (backend) and 5173 (frontend)

1. Clone the repository

git clone https://github.com/MicroPyramid/Django-CRM.git
cd Django-CRM

2. Configure environment

Copy the sample environment file. The defaults work for local development.

cp .env.docker.example .env.docker

The important values:

Variable Default Purpose
POSTGRES_PASSWORD root Database password
DJANGO_SECRET_KEY Generate a fresh value for any deployment
DEBUG True Disable in production
JWT_SIGNING_KEY Used to sign access tokens

3. Start the stack

docker compose up --build

This brings up:

  • db — PostgreSQL 16 with the app_user role pre-created (non-superuser, so row-level security is enforced)
  • redis — broker for Celery
  • backend — Django on :8000
  • worker — Celery worker
  • frontend — SvelteKit dev server on :5173

4. Apply migrations and seed data

In a second terminal:

docker compose exec backend python manage.py migrate
docker compose exec backend python manage.py seed_data

seed_data creates a default MicroPyramid organization plus an admin user aswin.1231@gmail.com.

5. Sign in

Open http://localhost:5173. The default login flow uses Google OAuth or magic links — for local development, the easiest path is:

docker compose exec backend python manage.py devlogin aswin.1231@gmail.com --org MicroPyramid

This prints a JWT pair you can paste into the browser as cookies (or use directly against the API). The command refuses to run unless DEBUG=True, so it's safe to leave shipped.

Next steps