Skip to Content
Working with the codebaseProject Structure

Project structure

NativeExpress keeps routes in src/app/, each AI feature in src/features/, shared app code in src/, and the database and edge functions in supabase/.

      • index.tsx - Entry route (onboarding / welcome / home)
      • update-password.tsx - Recovery-link screen, any auth state
      • _layout.tsx - Root layout, fonts, providers
      • index.ts - The feature registry Home and the tab layout read
      • types.ts - The Feature interface
      • README.md - How to remove or add a feature
      • supabase.ts - Supabase client
      • secure-storage.ts - Keychain / Keystore session storage
      • edgeFunction.ts - Typed edge-function calls and error codes
      • logger.ts - logError, reporting through the crash-reporting port
      • push.ts - OneSignal
      • index.ts - APP_THEME + setAppTheme()
    • global.css - Tailwind v4 / Uniwind CSS entry, the theme import, font variables
    • env.d.ts - Ambient type references (expo, uniwind)
    • config.toml - Local Supabase config
  • .env.example - Client environment variables
  • PRODUCT.md - The product brief
  • config.js - App identity, integrations and AI config import
  • app.config.js - Expo app configuration
  • eas.json - EAS build and submit profiles
  • store.config.json - App Store listing metadata
  • metro.config.js - Metro + Uniwind configuration
  • uniwind-types.d.ts - Generated Uniwind types
  • DESIGN.md - Design language reference
  • AGENTS.md - Instructions for coding agents

The files you’ll touch first

  • PRODUCT.md - What the app is, what it keeps, how it should look
  • config.js - App name, identifiers, EAS project and Google OAuth IDs
  • .env.example - Copy to .env.local for client configuration
  • src/theme/seeds/<name>.json - Your theme's colours; yarn theme:generate renders it
  • src/global.css - Fonts, breakpoints and Tailwind entry point
  • supabase/functions/_utils/ai.config.json - Models, presets and quota default
  • DESIGN.md - Design conventions for new screens

config.js imports the shared AI configuration. If you change it, follow the redeploy steps in Models so the app and functions use the same values.

Where to add code

Put route files in src/app/, shared UI in src/components/, and shared data-fetching hooks in src/hooks/. A feature’s own screens, components, hooks and queries belong under src/features/<name>/, with its Supabase queries in that feature’s repository.ts. Features never import one another; yarn check:features rejects it. Vendor integrations are wrapped by src/services/; screens use those wrappers.

Keep route tests under src/__tests__/app/, because files inside src/app/ become routes. See testing and the conventions skill before adding a new feature, and Removing features and integrations for taking one out.

Last updated on