Skip to main content

Local Development Setup CE

This guide sets up a development environment with hot reload for both server and client, using Docker for PostgreSQL and Redis.

Prerequisites

1. Clone the repository

git clone https://github.com/Aicser-Platform/aicser.git
cd aicser

2. Configure environment

cp server/env.example deploy/.env

Open deploy/.env and set at minimum:

POSTGRES_USER=postgres
POSTGRES_PASSWORD=yourpassword
POSTGRES_DB=aiser_world_db
SECRET_KEY=dev-secret-key-change-in-production
ENCRYPTION_KEY= # generate below
AISER_EDITION=community

Generate ENCRYPTION_KEY:

python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"

3. Start infrastructure and server

cd deploy
docker compose -f docker-compose.dev.yml up -d

This starts PostgreSQL, Redis, and the FastAPI server with live reload via volume mount.

4. Start the CE client

cd deploy
make dev-ce

This starts aiser-client-ce-dev on port 3000 with Next.js hot reload.

5. Verify

6. View logs

cd deploy
make dev-logs

Making changes

Both server and client use volume mounts — changes take effect without rebuilding:

  • Server — edit files in server/src/. Uvicorn restarts automatically.
  • Client — edit files in client/src/. Next.js hot-reloads automatically.

Rebuilding after dependency changes

If you change pyproject.toml or package.json, rebuild the affected container:

# Server
docker compose -f docker-compose.dev.yml up -d --build chat2chart-server

# Client
docker compose -f docker-compose.dev.yml --profile ce up -d --build client-ce

Stop services

cd deploy
make dev-down