The React app behind Orbyn Planner. docs/architecture.md is the behaviour contract; this file is the code layout it assumes.
| Path | Holds |
|---|---|
app/ |
Entrypoint, boot, shell, composition and routing. |
features/<name>/ |
A screen or flow. Its index.ts is the public surface. |
state/ |
Providers, hooks, application services and sync orchestration. |
core/ |
Pure planner and account rules, models and ports. No browser, storage or network. |
data/ |
IndexedDB, HTTP and engine adapters. |
ui/ |
Primitives and product components. |
lib/ |
Generic helpers with no product rules. |
testing/ |
Fakes, fixtures and test-only adapters. |
e2e/ |
Tests against a real engine. |
generated/ |
Wire and WebAssembly types generated from orbyn-engine. Do not edit by hand. |
styles/ |
Tokens and CSS. |
Imports point one way:
appmay usefeatures,state,data,core,ui,lib,stylesandgenerated.featuresmay use other feature front doors,state,data,core,ui,lib,stylesandgenerated.statemay usedata,core,lib,stylesandgenerated.datamay usecore,libandgenerated.coremay uselibandgenerated.uimay usecore,lib,stylesandgenerated.libmay usestyles.
Tests, testing/ and e2e/ may use anything.
A feature reaches another feature only through features/<name>/index.ts. Add every public module to that index; do not import another feature's files directly. app may deep-import a feature only for a lazy route.
npm run check:imports enforces these rules, the feature front doors, the one-way layers and acyclic production imports. npm run check runs it with TypeScript and ESLint. scripts/check-imports.mjs is the source of truth; update its table and this file together when the layout changes.