Athas Boilerplate

Frontend Patterns

shared

Feature-slice frontend conventions for routes, APIs, and shared UI use.

Route adapter rule

Route files are adapters only:

  • declare route and wiring
  • delegate feature behavior to features/*
  • avoid business/data orchestration in routes

Feature-slice structure

Recommended shape:

features/<feature>/
  <Feature>Screen.tsx
  api.ts
  model.ts
  components/
  index.ts

Data access rule

  • app transport setup lives in src/lib/api.ts
  • features call typed clients through feature-local api.ts
  • screens consume hooks/selectors, not raw transport clients

Composition compatibility

  • module flags can soft-disable routes and nav exposure
  • feature code remains intact for profile-based composition

For full examples and conventions, see docs/architecture/25-frontend-patterns.md.

On this page