Project Structure
Interactive file explorer for the Luna monorepo. Click any file to see what it does.
Click a file or folder to read its description. Folders expand and collapse on click. The tree opens with the main backend and frontend directories pre-expanded.
Tip: data/ is gitignored â never commit it. backend/ is Python,frontend/ is TypeScript.
Key entry points
When adding new functionality, these are the files to start with:
| File | What to do here |
|---|---|
backend/main.py | Mount new FastAPI routers. |
backend/config.py | Add new .env settings as typed fields. |
backend/services/tool_registry.py | Register new tools with a default permission mode. |
backend/services/llm.py | Add a new LLM provider streaming generator. |
backend/processes/registry.py | Register new background workers. |
frontend/src/App.tsx | Add new top-level view modes. |
frontend/src/store/index.ts | Add new global state slices and actions. |
electron/main.js | Add native menus, IPC handlers, or OS integrations. |
cli/luna.mjs | Add new developer CLI subcommands. |
Where new code belongs
Routes go in backend/routers/. Business logic goes in backend/services/. Routers should be thin â validate input, call a service, return the result. Never put complex logic directly in a router.