How robrosk/oura-coach works
Oura Coach is a wellness web app whose visible workflow is: enter from the public home page, pass the terms-and-privacy gate, then visit the app or begin Oura authorization. Its landing page also advertises sleep/readiness/activity insights, experiments, and context logging, but the supplied excerpts do not show those capabilities implemented. The graph reflects the sampled frontend and documented OAuth handoff; backend internals and the database are not shown, so their behavior is left unspecified.
Main entry points: App.tsx Route dispatcher · Layout.tsx Shared page layout · TermsGate.tsx Terms access gate · Accept.tsx Consent acceptance
Components 20
Web routing and shell
- Route dispatcher
web/src/App.tsx - Shared page layout
web/src/components/Layout.tsx - Site navigation
web/src/components/Header.tsx - Site footer
web/src/components/Footer.tsx
Consent and legal content
- Terms access gate
web/src/components/TermsGate.tsx - Consent acceptance
web/src/pages/Accept.tsx - Scrollable terms
web/src/components/ScrollableTerms.tsx - Consent version check
web/src/lib/terms.ts - Browser consent storage
web/src/lib/storage.ts - Legal document renderer
web/src/components/MarkdownPage.tsx - Privacy page
web/src/pages/Privacy.tsx - Terms page
web/src/pages/Terms.tsx
Wellness app and Oura connection
- Public landing
web/src/pages/Home.tsx - App home
web/src/pages/app/AppHome.tsx - Oura connection screen
web/src/pages/app/Connect.tsx - Authorization welcome
web/src/pages/app/Welcome.tsx - OAuth API client
web/src/lib/api.ts
Other components
- User
- Oura Coach backend
- Oura authorization
Connections 21
- User → Route dispatcher: opens routes
- Route dispatcher → Shared page layout: wraps pages
web/src/App.tsx - Shared page layout → Site navigation: renders
web/src/components/Layout.tsx - Shared page layout → Site footer: renders
web/src/components/Layout.tsx - Route dispatcher → Public landing: routes to
web/src/App.tsx - Route dispatcher → Terms access gate: protects app routes
web/src/App.tsx - Terms access gate → App home: renders when allowed
web/src/App.tsx - Terms access gate → Consent version check: checks acceptance
web/src/components/TermsGate.tsx - Consent version check → Browser consent storage: reads acceptance
web/src/lib/terms.ts - Route dispatcher → Consent acceptance: routes to
web/src/App.tsx - Consent acceptance → Scrollable terms: renders terms
web/src/pages/Accept.tsx - Consent acceptance → Browser consent storage: records acceptance
web/src/pages/Accept.tsx - Route dispatcher → Privacy page: routes to
web/src/App.tsx - Route dispatcher → Terms page: routes to
web/src/App.tsx - Privacy page → Legal document renderer: renders document
web/src/pages/Privacy.tsx - Terms page → Legal document renderer: renders document
web/src/pages/Terms.tsx - Route dispatcher → Oura connection screen: routes to
web/src/App.tsx - Route dispatcher → Authorization welcome: routes to
web/src/App.tsx - Oura connection screen → OAuth API client: starts authorization
web/src/pages/app/Connect.tsx - OAuth API client → Oura Coach backend: requests auth URL
web/src/lib/api.ts - Oura connection screen → Oura authorization: redirects for authorization
web/src/pages/app/Connect.tsx