Skip to content

Frontend deep reference

Code-grounded reference for the adepthood React Native app, generated by reading frontend/src/ directly (not project READMEs). Every factual claim cites a repo-relative file:line reference into the adepthood monorepo; load-bearing logic is excerpted verbatim. Stack context: ADR 0003 — React Native + Expo + Zustand.

What is in this section

Page Concern
Navigation The complete navigation graph: auth gate, AuthStack, RootStack, tab shell, ring gating, deep links
Feature modules One page per module in frontend/src/features/
State Every Zustand store, the reset registry, derived program hooks, and the AsyncStorage/SecureStore persistence layer
API client The HTTP client pipeline and the complete endpoint-wrapper table, mapped to backend routes, with a known-drift list
Design-system usage How Candle & Ink tokens, the type(width) ramp, ThemeContext, and useResponsive are consumed in practice

Enumerated surface (counts from source)

All counts were enumerated from frontend/src/ at the commit in the footer, excluding __tests__/ and *.test.* files.

Surface Count Enumerated from
Feature modules in features/ 10 — Auth, Course, Habits, Invitations, Journal, Map, Practice, Return, Settings, Welcome frontend/src/features/ directory listing
Navigation routes 22 — 11 RootStack (incl. the Tabs host), 6 AuthStack, 5 bottom-tab destinations frontend/src/navigation/RootStack.tsx:32-71, frontend/src/App.tsx:44-53, frontend/src/navigation/BottomTabs.tsx:30-37
Zustand stores 6 (plus the reset registry, the normalizedCollection helper, and the useProgramProgression derived-hook module) frontend/src/store/ (9 files)
Storage modules 16 frontend/src/storage/
API client namespaces 26 frontend/src/api/index.ts
Typed endpoint wrapper methods 93 frontend/src/api/index.ts (see the complete table)
React contexts 4 — AuthContext, ApiKeyContext, NetworkStatusContext (context/), ThemeContext (design/) frontend/src/context/, frontend/src/design/ThemeContext.tsx
Shared component files 31 — 11 root, 9 drawer/, 7 layout/, 3 feedback/, 1 care/ frontend/src/components/

Two structural notes that differ from older project docs:

  • There is no "Today" feature module in current source. The tab shell registers Journal, Habits, Practice, Course, and Map only (frontend/src/navigation/BottomTabs.tsx:30-37), with Journal as the initial route (BottomTabs.tsx:209).
  • The bottom tab navigator renders no visible tab bar: its tabBar prop mounts a null-rendering redirect host, and the in-app drawer is primary navigation (frontend/src/navigation/BottomTabs.tsx:142-152,182-186).

Entry point and provider stack

frontend/src/App.tsx:236-257 composes the app:

export default function App(): React.JSX.Element {
  if (CONFIG_ERROR) {
    return <ConfigErrorScreen message={CONFIG_ERROR} />;
  }
  return (
    <ErrorBoundary>
      <ThemeProvider>
        <SafeAreaProvider>
          <NetworkStatusProvider>
            <AuthProvider>
              <ApiKeyProvider>
                <ToastProvider>
                  <AppShell />

CONFIG_ERROR is captured at module load rather than thrown, so a bad EXPO_PUBLIC_API_BASE_URL renders a visible error screen instead of a blank page (frontend/src/config.ts:17-34). AppShell hydrates the program store, resolves the nav theme for the active mode, and mounts NavigationContainer with the deep-link config (frontend/src/App.tsx:222-234).

Grounded in adepthood@55eef11, 2026-07-31.