Learning to Build a General-Purpose Open-Source Architecture from Scratch: OpenCode, Codex, Claude
The core architecture is modeled after opencode to build the follow-up
packages/desktop: Electron shell. Starts the local server and loads the app.packages/app: React + Vite renderer UI with shadcn-style components.packages/server: Express local API.packages/core: Session, runner, tools, permissions, and storage.packages/provider: Vercel AI SDK model adapter, defaulting to Anthropic Messages.packages/protocol: HTTP and event contracts shared by app/server/core.packages/schema: Shared schema helpers and IDs.
Project notes and learning material live in docs.
npm install
npm run devThe renderer runs on http://127.0.0.1:53173 and the local API runs on http://127.0.0.1:43110.
Set your DeepSeek config in the app sidebar before sending prompts.
The app stores it in .mini-opencode/config.json.
Optional startup defaults:
DEEPSEEK_API_KEYDEEPSEEK_BASE_URLDEEPSEEK_MODEL