An enterprise AI workspace for model routing, multimodal chat, files, tools, billing, identity, and operations.
An enterprise AI workspace for model routing, multimodal chat, files, tools, billing, identity, and operations.
An integrated AI platform for enterprise model routing, chat, files, tools, billing, identity, and operations.
English | 简体中文
DEEIX Chat is an open-source, deployable AI platform for individuals, teams, and enterprises that need long-term, stable, and unified access to multiple model providers. It provides one clear entry point for multiple upstream models and providers, integrating multimodal chat, model routing, files and RAG, MCP tools, usage billing, identity, audit logs, and operational controls into one product.
The system is designed around simple deployment, efficient static delivery, and a low runtime resource footprint: lightweight without feeling limited, restrained without losing capability, and open without becoming disorderly.
| Area | Capabilities |
|---|---|
| Conversations | A multimodal chat interface for daily use, with streaming, branches, retries, edits, feedback, sharing, rich rendering, and traceable model execution metadata. |
| Models and routing | A platform-model layer for upstream channels, real models, route bindings, priority, weights, circuit breaking, vendor mapping, and capability configuration, reducing the cost of multi-provider operations. |
| Protocols and adaptation | Unified support for OpenAI, Anthropic, Google/Gemini, xAI, OpenRouter, and OpenAI-compatible protocols across text, image, tools, and provider-native capability differences. |
| Files and retrieval | File upload, preview, extraction, OCR, storage quota, full-context injection, chunking, embeddings, and semantic retrieval so file content can naturally enter the conversation context. |
| Tool ecosystem | MCP servers and provider-native official tools with discovery, enablement, user selection, execution limits, result rendering, and tool-call traceability. |
| Context and memory | Message windows, token budgets, summary compression, conversation memory, long-term memory, and RAG evidence records for controlled-cost continuity. |
| Billing and payments | Model pricing, per-call tool pricing, subscriptions, top-ups, balances, usage ledgers, billing snapshots, Stripe Checkout, EPay, and webhook validation. |
| Identity and security | Local accounts, session management, HttpOnly refresh cookies, 2FA/TOTP, trusted devices, SSO/OIDC/OAuth, contact verification, and encrypted sensitive data. |
| Administration and audit | Centralized management for users, roles, upstreams, models, routes, pricing, subscriptions, balances, usage logs, audit logs, auth events, and system events. |
| Deployment and operations | Single-runtime frontend/API serving, Docker deployment, SQLite or PostgreSQL, in-memory cache or Redis, S3-compatible storage, Swagger, structured logs, version endpoint, GeoIP, and OpenTelemetry. |
DEEIX Chat uses a split frontend/backend development model with a single-runtime deployment path. The frontend is built into static assets and served by the Go service, while APIs, authorization, model routing, files, billing, and audit capabilities run in the same backend runtime. Heavy document extraction and OCR capabilities are optional services, keeping the base deployment lightweight.
…| Layer | Responsibility | Technologies |
|---|---|---|
| Frontend | Chat UI, admin console, and static builds | Next.js 16, React 19, TypeScript, Tailwind CSS, Shadcn/UI, Streamdown, KaTeX, Mermaid, Recharts, Motion |
| Backend runtime | APIs, authentication, authorization, orchestration, protocol adaptation, and static serving | Go 1.26, Gin, Gorm, Swagger, OpenTelemetry, Zap |
| Data and cache | Domain data, vector retrieval, session state, and runtime cache | PostgreSQL, pgvector, SQLite, sqlite-vec, Redis, in-memory cache |
| Files and storage | Uploaded files, generated files, object storage, and local persistence | Local filesystem, S3-compatible object storage |
| File processing | Text extraction, OCR, document parsing, and LLM OCR fallback | Built-in extractors, Apache Tika, Docling, RapidOCR, Tesseract OCR, Paddle OCR, cloud OCR adapters, MinerU |
| Tool protocol | MCP tool integration and provider-native official tools | MCP Streamable HTTP JSON-RPC, provider-native tools |
| Deployment runtime | Lightweight single-node deployment or multi-node production deployment | Docker, Docker Compose, SQLite/in-memory cache, PostgreSQL/Redis |
The backend keeps clear internal boundaries: backend/cmd/server is the executable entrypoint, backend/internal/cli owns process startup, backend/internal/app assembles and wires the application, and backend/internal/transport/http owns the HTTP boundary. Requests then flow through application use cases to consumer-owned repository or ports interfaces and their infra implementations. The data layer uses domain-prefixed tables, while financial records, audit trails, system events, and high-growth vector data remain separate sources of truth.
…frontend/ and backend/ are independent workspaces managed by pnpm and Turborepo. packages/api-contract/ connects them through generated Swagger types; update the Go transport contract first, then regenerate the shared package.
The SQLite profile does not require a separately managed database or cache. The default development configuration uses PostgreSQL and Redis; the full Compose profile starts both services for you.
Quick installation guide: Quick Start.
Local development is intended for editing source code and running the frontend and backend separately. The default config connects to local PostgreSQL and Redis. If you only want a low-dependency trial, use the lightweight Docker installation below.
cp config.example.yaml config.yamlAdjust database.postgres.dsn, database.redis.*, and public URLs in config.yaml for your local environment.
pnpm install
cp frontend/.env.example frontend/.env.localpnpm devUse pnpm dev:web or pnpm dev:api to start only one workspace.
The frontend uses NEXT_PUBLIC_API_BASE_URL for API requests. For local development, confirm that frontend/.env.local contains:
NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8080Service URLs and probes:
| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| API | http://localhost:8080 |
| Liveness | http://localhost:8080/healthz |
| Readiness | http://localhost:8080/readyz |
| Version | http://localhost:8080/api/v1/version |
| Swagger (development only) | http://localhost:8080/swagger/index.html |
If NEXT_PUBLIC_API_BASE_URL is omitted, local development defaults to localhost:8080; same-origin deployments use the current origin.
Run workspace commands from the repository root:
| Command | Purpose |
|---|---|
pnpm dev |
Start the frontend and backend in watch mode. |
pnpm dev:web |
Start only the Next.js frontend. |
pnpm dev:api |
Start only the Go API. |
pnpm check |
Run workspace lint, type, backend version, and API contract checks. |
pnpm test |
Run workspace tests. |
pnpm build |
Build the static frontend and backend binary. |
pnpm verify |
Run checks, tests, and builds together. |
pnpm api:generate |
Regenerate Swagger artifacts and TypeScript API types. |
pnpm api:check |
Check that generated API artifacts are up to date. |
The frontend is exported as static files, so pnpm build writes the browser artifact to frontend/out. The Go service can serve that directory in the production image or through server.frontend_dist_dir.
Run the following Docker commands from the repository root. Choose one installation profile first, then copy the matching config file. All root compose profiles expose the app at http://localhost:8080 by default and mount the repository-level config.yaml to /app/config.yaml inside the container.
| Profile | Use case | Config file | Compose file | Built-in dependencies |
|---|---|---|---|---|
| Lightweight | Local evaluation, personal use, small single-node deployments | config.sqlite.example.yaml |
docker-compose.sqlite.yml |
App only, SQLite + sqlite-vec + in-memory cache |
| Default | External PostgreSQL and Redis already exist | config.example.yaml |
docker-compose.yml |
App only |
| Full | Single-machine stack with app, PostgreSQL, and Redis | config.full.example.yaml |
docker-compose.full.yml |
App, PostgreSQL, Redis |
This is the lowest-dependency deployment. It starts only the app container, stores data and local vector indexes in SQLite, and uses the in-process memory cache. Use it for local evaluation, personal deployments, and small single-node setups.
cp config.sqlite.example.yaml config.yaml
docker compose -f docker-compose.sqlite.yml up -dSQLite + memory cache is single-process only. It is good for local use, evaluation, and small single-node deployments. Use PostgreSQL + Redis for multi-node or high-concurrency production deployments.
Use this when PostgreSQL and Redis are already managed outside this compose stack. Before starting, set database and Redis addresses to values reachable from inside the container; if the services run on the Docker host, host.docker.internal is usually the right hostname.
cp config.example.yaml config.yaml
# Edit database.postgres.dsn, database.redis.*, and public URLs.
docker compose up -dThe default docker-compose.yml starts only the application container. Keep compose environment empty unless you intentionally want environment variables to override config.yaml.
Use this when you want compose to start the app, PostgreSQL, and Redis together.
cp config.full.example.yaml config.yaml
docker compose -f docker-compose.full.yml up -ddocker-compose.full.yml sets POSTGRES_DSN, REDIS_ADDR, REDIS_USERNAME, and REDIS_PASSWORD in compose environment, so those values override the database and Redis values in config.yaml.
Configuration priority is environment variables > config.yaml > built-in defaults. config.yaml is for static infrastructure and security configuration such as server URLs, database, cache, storage, GeoIP, tracing, JWT, and encryption keys. Runtime business settings are stored in the database and managed in the admin console.
The default compose files persist application data:
| Data | Container path |
|---|---|
| SQLite database | /app/data/deeix.db |
| Uploaded and generated files | /app/storage |
| PostgreSQL data | /var/lib/postgresql/data, full installation only |
| Redis data | /data, full installation only |
The default application image is ghcr.io/deeix-ai/deeix-chat:latest. Compose files reference an image and do not define a build step. Build a local image first, then select it with DEEIX_CHAT_IMAGE:
docker build -t deeix-chat:local .
DEEIX_CHAT_IMAGE=deeix-chat:local docker compose up -dUse the matching -f docker-compose.sqlite.yml or -f docker-compose.full.yml option when starting another profile.
APP_ENV accepts dev/development and prod/production, normalizes them to dev or prod, and defaults to prod when omitted. Use
No open issues yet, or sync has not completed.