Features are organized by domain, then by feature name. Every feature lives in src/features/<domain>/<feature>/.
src/features/
notifications/
notification-dropdown/
notification-dropdown.tsx
hooks/
use-notification-dropdown.ts
notification-list/
notification-list.tsx
hooks/
use-unread-count.ts
settings/
profile-tab/
profile-tab.tsx
security-tab/
security-tab.tsx
Always nest inside <domain>/<feature>/. Even single-file features get their own folder. src/features/settings/profile-tab/profile-tab.tsx, not src/features/settings/profile-tab.tsx.
Pages belong in src/routes/. Route files import feature components. Features never contain "page" files.
Hooks are scoped to where they're used:
<feature>/hooks/ when only that feature uses it<domain>/hooks/ when shared across features in the same domainsrc/hooks/ when truly app-wideNo flat files at the domain level. Only shared folders like hooks/, types/, constants/.
Keep feature code colocated. Components, hooks, types, queries, schemas, and tests all live inside the feature folder they belong to. Don't move things to global components/ or hooks/ just because of file kind.
src/features/<domain>/<feature>/<feature>.tsxsrc/routes/