Skip to main content

Developer Overview CE

This section is for developers who want to run Aicser CE locally or contribute to the codebase.

Repository structure

aicser/
├── server/ # FastAPI application (Python 3.11, Poetry)
├── client/ # Next.js 14 application (TypeScript)
└── deploy/ # Docker Compose stacks and Makefile

Server

The server is a FastAPI application using async SQLAlchemy 2.0 with asyncpg. Modules live under server/src/modules/. Each module has router.py, models.py, schemas.py, and a services/ directory.

Key modules:

ModulePurpose
authenticationJWT-based login, registration, and token management
chartsChart creation and rendering
dashboardsDashboard builder and widget management
dataData source connections via direct SQLAlchemy
queriesSQL query execution against connected sources
knowledgeRAG knowledge base (PDF/DOCX ingestion)
organizationsMulti-tenant organizations and projects
userUser profiles and settings

Client

The client is a Next.js 14 App Router application. Routes are split into:

  • (auth)/ — public pages: login, logout, invite
  • (dashboard)/ — protected pages behind authentication

State is managed at two tiers:

  • React Query (TanStack v5) — server state, API data, caching
  • Zustand — client state: auth session, UI state, current organization

CE / EE module split CE EE · Self-Host

CE modules live in server/src/modules/. EE modules live in server/ee/modules/. Each CE module has an __init__.py that redirects imports to the EE directory when it exists. Application code always imports from src.modules.*.

The server loads EE routes only when AISER_EDITION=enterprise. Missing EE modules degrade gracefully — CE runs without them.

Tech stack

LayerTechnology
ServerPython 3.11, FastAPI, Uvicorn
ORMSQLAlchemy 2.0 async + asyncpg
MigrationsAlembic
Package managerPoetry
ClientNode.js 20+, Next.js 14 App Router, TypeScript
UI componentsAnt Design
ChartsApache ECharts
Package managernpm
DatabasePostgreSQL 16
CacheRedis 7
ContainersDocker Compose

Source code

github.com/Aicser-Platform/aicser