Architecture
Server
The Hono API server that powers Coodeen's backend.
Overview
The server is a Hono application that handles all backend operations. It runs on port 3099 and provides both REST API endpoints and Server-Sent Events for streaming chat responses.
API Routes
All routes are prefixed with /api:
| Route | Method | Description |
|---|---|---|
/chat | POST | AI chat with SSE streaming |
/sessions | CRUD | Session management |
/providers | CRUD | AI provider configuration |
/config | GET/PUT | App configuration (active provider, CWD) |
/fs | GET/PUT | Filesystem browsing, file read/write |
/git | GET | Git status, branches, commits |
/terminal | WS | PTY terminal sessions via WebSocket |
/skills | GET | Skill discovery and management |
/actions | POST | Action endpoints |
AI Agent
The agent uses the Vercel AI SDK to communicate with AI providers. It supports:
- Multi-provider routing — Selects the correct SDK based on the active provider
- Streaming responses — Server-Sent Events for real-time output
- Tool calling — The AI can invoke tools to interact with the filesystem and shell
- Multi-modal input — Text and image messages for vision-capable models
- Agent/Plan modes — Full access or read-only, depending on the mode
Static File Serving
In production, the server serves the pre-built React frontend from the static/ directory. During development, the Vite dev server handles the frontend separately.