--- description: globs: alwaysApply: true --- # Technology Stack and Dependencies ## Core Technologies - **Runtime**: Bun (JavaScript/TypeScript runtime) - **Language**: TypeScript - **Framework**: Hono (lightweight web framework) - **API Integration**: LLM Gateway (OpenAI Compatible, OpenAI Responses API, Anthropic, Google Gemini), Gitea API - **Containerization**: Docker, Kubernetes ## Key Dependencies From [package.json](mdc:package.json): ### Production Dependencies - **hono**: Lightweight, ultrafast web framework - **@hono/zod-validator**: Schema validation for Hono - **zod**: TypeScript-first schema validation - **openai**: OpenAI API client (used for OpenAI Compatible and Responses providers) - **@anthropic-ai/sdk**: Anthropic Messages API client - **@google/genai**: Google Gemini API client - **axios**: HTTP client for API requests - **dotenv**: Environment variable management - **lodash-es**: Utility library ### Development Dependencies - **typescript**: TypeScript compiler and type definitions - **tslint**: Code linting - **@types/node**: Node.js type definitions - **@types/lodash-es**: Type definitions for lodash-es ## Environment Configuration The application uses a **DB-first** configuration approach (Portainer model): - **Environment variables** (minimal, infrastructure-level only): - `PORT`: Server port - `DATABASE_PATH`: SQLite file path (optional, default: `./data/assistant.db`) - `MASTER_KEY_PATH`: Encryption key path (optional, default: `./data/master.key`) - **Web UI + SQLite DB** ([src/db/](mdc:src/db)): All runtime config — Gitea, Feishu, webhook secret, admin password, review engine, memory settings — managed via Admin Dashboard - **First-boot seed**: `configManager.seedDefaults()` auto-generates secrets and seeds defaults on first run - **bun:sqlite**: Embedded database for all configuration persistence (encrypted for sensitive values)