Package Boundaries
@overlay/app-core: shared contracts, app shell registries, and renderless controller helpers.@overlay/api-client: typed transport wrappers for the web/api/v1/*routes.@overlay/ui: low-level primitives and design tokens.@overlay/modules-react: React DOM presentational components for feature modules.src/features/<domain>/*: web containers and feature-local helpers that bind routing, auth, Convex-backed APIs, uploads, billing, and local browser APIs.src/components/{ui,layout,providers}/*: shared UI primitives, app chrome, and runtime providers.
fetch, next/navigation, auth contexts, Convex, or overlayAppClient. Run npm run check:module-boundaries before committing module package changes.
Module Checklist
- Add cross-surface contracts to
@overlay/app-core. - Add typed methods to
@overlay/api-clientthat call existing/api/v1/*routes without changing endpoint behavior. - Put pure selection, filtering, sorting, dirty-state, and tree-building logic in
@overlay/app-core/modules. - Put React DOM presentation in
@overlay/modules-react, built from@overlay/ui. - Keep the web screen as a container that wires router, auth, upload flows, billing, local storage, and client methods into the shared module.
- Add Storybook stories that import public package APIs only.
Settings Panels
Register panel metadata insrc/overlay.config.ts:
componentKey to a local renderer in the web settings container. Other surfaces can reuse the registry metadata and provide their own renderer for the same key.
Extending UI Primitives
Prefer composition over editing existing primitives. Add a new primitive to@overlay/ui only when it is broadly reusable and can preserve the current visual language. Feature-specific surfaces belong in @overlay/modules-react.