General
Conventions
Routing, data, filters, and verification rules for the web app.
- Add pages under
src/pagesand API handlers undersrc/pages/api. - Keep database access on the server; browser components call HTTP endpoints.
- Use SWR for browser server state.
- Put every feature filter in its filter panel. A top-bar control may mirror the same state but cannot be its only control.
- Keep request state and visible controls synchronized.
- Put shared DOM primitives in
@statshub/ui-web; React Native components belong in@statshub/ui-native. - Preserve API behavior unless the contract and every consumer change together.
Run pnpm check and pnpm build, then inspect the changed route and browser
console.