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:
| Module | Purpose |
|---|---|
authentication | JWT-based login, registration, and token management |
charts | Chart creation and rendering |
dashboards | Dashboard builder and widget management |
data | Data source connections via direct SQLAlchemy |
queries | SQL query execution against connected sources |
knowledge | RAG knowledge base (PDF/DOCX ingestion) |
organizations | Multi-tenant organizations and projects |
user | User 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
| Layer | Technology |
|---|---|
| Server | Python 3.11, FastAPI, Uvicorn |
| ORM | SQLAlchemy 2.0 async + asyncpg |
| Migrations | Alembic |
| Package manager | Poetry |
| Client | Node.js 20+, Next.js 14 App Router, TypeScript |
| UI components | Ant Design |
| Charts | Apache ECharts |
| Package manager | npm |
| Database | PostgreSQL 16 |
| Cache | Redis 7 |
| Containers | Docker Compose |