# hb-16-manoel/atlas architecture

> Architecture diagram of the GitHub repository hb-16-manoel/atlas, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hb-16-manoel/atlas
- Repository: https://github.com/hb-16-manoel/atlas

## Overview

Atlas is a personal planning and reflection app: a user works through a dashboard for tasks, habits, events, journal entries, progress, and settings. The page composes those views and obtains domain state through useAtlasData, which supports browser-local legacy data and authenticated cloud synchronization. Authentication includes account and recovery flows; cloud persistence is backed by Supabase. The README is only the stock Next.js starter and documents no product capabilities. Some component internals and sync wiring are unsampled, so the graph omits uncertain relationships.

Main entry points: [`app/page.tsx`](https://github.com/hb-16-manoel/atlas/blob/main/app/page.tsx) (Atlas app shell), [`app/hooks/useAtlasData.ts`](https://github.com/hb-16-manoel/atlas/blob/main/app/hooks/useAtlasData.ts) (Atlas data hook), [`app/components/AuthShell.tsx`](https://github.com/hb-16-manoel/atlas/blob/main/app/components/AuthShell.tsx) (Auth flows), [`app/lib/supabase/client.ts`](https://github.com/hb-16-manoel/atlas/blob/main/app/lib/supabase/client.ts) (Browser Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Planning experience"]
  node_app["Atlas app shell<br/>[page.tsx]"]
  node_home["Home<br/>[Home.tsx]"]
  node_planning["Planning<br/>[Planning.tsx]"]
  node_journal["Journal<br/>[Journal.tsx]"]
  node_settings["Settings<br/>[Settings.tsx]"]
end

subgraph group_insights["Reflection insights"]
  node_progress["Progress<br/>[Progress.tsx]"]
  node_intelligence["Atlas intelligence"]
  node_daily_score["Daily score<br/>[dailyScore.ts]"]
end

subgraph group_identity["Account access"]
  node_auth_provider["Auth provider<br/>[AuthProvider.tsx]"]
  node_auth_shell["Auth flows<br/>[AuthShell.tsx]"]
  node_auth_callback["Auth callback<br/>[route.ts]"]
  node_supabase_client["Browser Supabase client<br/>[client.ts]"]
  node_supabase_server["Server Supabase client<br/>[server.ts]"]
end

subgraph group_persistence["Data persistence"]
  node_data_hook["Atlas data hook<br/>[useAtlasData.ts]"]
  node_cloud_repo["Cloud repository"]
  node_local_repo["Legacy browser store"]
  node_cloud_db[("Supabase data")]
end

node_person(("User"))
node_supabase_auth{{"Supabase Auth"}}
node_oauth{{"Google OAuth"}}

node_person -->|"uses"| node_app
node_app -->|"renders"| node_home
node_app -->|"renders"| node_planning
node_app -->|"renders"| node_journal
node_app -->|"renders"| node_progress
node_app -->|"renders"| node_settings
node_app -->|"loads state"| node_data_hook
node_data_hook -->|"reads user"| node_auth_provider
node_data_hook -->|"creates repository"| node_cloud_repo
node_data_hook -->|"reads/writes"| node_local_repo
node_cloud_repo -->|"reads/writes"| node_cloud_db
node_progress -->|"analyzes"| node_intelligence
node_intelligence -->|"calculates"| node_daily_score
node_person -->|"submits credentials"| node_auth_shell
node_auth_shell -->|"uses"| node_supabase_client
node_auth_provider -->|"uses"| node_supabase_client
node_supabase_client -->|"auth requests"| node_supabase_auth
node_auth_shell -.->|"starts sign-in"| node_oauth
node_supabase_auth -->|"redirects"| node_auth_callback
node_auth_callback -->|"exchanges code"| node_supabase_server
node_supabase_server -->|"uses"| node_supabase_auth

click node_app "https://github.com/hb-16-manoel/atlas/blob/main/app/page.tsx"
click node_home "https://github.com/hb-16-manoel/atlas/blob/main/app/components/Home.tsx"
click node_planning "https://github.com/hb-16-manoel/atlas/blob/main/app/components/Planning.tsx"
click node_journal "https://github.com/hb-16-manoel/atlas/blob/main/app/components/Journal.tsx"
click node_progress "https://github.com/hb-16-manoel/atlas/blob/main/app/components/Progress.tsx"
click node_intelligence "https://github.com/hb-16-manoel/atlas/blob/main/app/lib/atlasIntelligence.ts"
click node_daily_score "https://github.com/hb-16-manoel/atlas/blob/main/app/lib/dailyScore.ts"
click node_settings "https://github.com/hb-16-manoel/atlas/blob/main/app/components/Settings.tsx"
click node_data_hook "https://github.com/hb-16-manoel/atlas/blob/main/app/hooks/useAtlasData.ts"
click node_cloud_repo "https://github.com/hb-16-manoel/atlas/blob/main/app/lib/data/cloudAtlasRepository.ts"
click node_local_repo "https://github.com/hb-16-manoel/atlas/blob/main/app/lib/data/legacyAtlasRepository.ts"
click node_cloud_db "https://github.com/hb-16-manoel/atlas/tree/main/supabase/migrations"
click node_auth_provider "https://github.com/hb-16-manoel/atlas/blob/main/app/components/AuthProvider.tsx"
click node_auth_shell "https://github.com/hb-16-manoel/atlas/blob/main/app/components/AuthShell.tsx"
click node_auth_callback "https://github.com/hb-16-manoel/atlas/blob/main/app/auth/callback/route.ts"
click node_supabase_client "https://github.com/hb-16-manoel/atlas/blob/main/app/lib/supabase/client.ts"
click node_supabase_server "https://github.com/hb-16-manoel/atlas/blob/main/app/lib/supabase/server.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_home,node_planning,node_journal,node_settings,node_person toneBlue
class node_progress,node_intelligence,node_daily_score toneAmber
class node_auth_provider,node_auth_shell,node_auth_callback,node_supabase_client,node_supabase_server toneMint
class node_data_hook,node_cloud_repo,node_local_repo,node_cloud_db toneRose
class node_supabase_auth,node_oauth toneIndigo
```

## Components

### Planning experience

- [Atlas app shell](https://github.com/hb-16-manoel/atlas/blob/main/app/page.tsx): `app/page.tsx`
- [Home](https://github.com/hb-16-manoel/atlas/blob/main/app/components/Home.tsx): `app/components/Home.tsx`
- [Planning](https://github.com/hb-16-manoel/atlas/blob/main/app/components/Planning.tsx): `app/components/Planning.tsx`
- [Journal](https://github.com/hb-16-manoel/atlas/blob/main/app/components/Journal.tsx): `app/components/Journal.tsx`
- [Settings](https://github.com/hb-16-manoel/atlas/blob/main/app/components/Settings.tsx): `app/components/Settings.tsx`

### Reflection insights

- [Progress](https://github.com/hb-16-manoel/atlas/blob/main/app/components/Progress.tsx): `app/components/Progress.tsx`
- [Atlas intelligence](https://github.com/hb-16-manoel/atlas/blob/main/app/lib/atlasIntelligence.ts): `app/lib/atlasIntelligence.ts`
- [Daily score](https://github.com/hb-16-manoel/atlas/blob/main/app/lib/dailyScore.ts): `app/lib/dailyScore.ts`

### Account access

- [Auth provider](https://github.com/hb-16-manoel/atlas/blob/main/app/components/AuthProvider.tsx): `app/components/AuthProvider.tsx`
- [Auth flows](https://github.com/hb-16-manoel/atlas/blob/main/app/components/AuthShell.tsx): `app/components/AuthShell.tsx`
- [Auth callback](https://github.com/hb-16-manoel/atlas/blob/main/app/auth/callback/route.ts): `app/auth/callback/route.ts`
- [Browser Supabase client](https://github.com/hb-16-manoel/atlas/blob/main/app/lib/supabase/client.ts): `app/lib/supabase/client.ts`
- [Server Supabase client](https://github.com/hb-16-manoel/atlas/blob/main/app/lib/supabase/server.ts): `app/lib/supabase/server.ts`

### Data persistence

- [Atlas data hook](https://github.com/hb-16-manoel/atlas/blob/main/app/hooks/useAtlasData.ts): `app/hooks/useAtlasData.ts`
- [Cloud repository](https://github.com/hb-16-manoel/atlas/blob/main/app/lib/data/cloudAtlasRepository.ts): `app/lib/data/cloudAtlasRepository.ts`
- [Legacy browser store](https://github.com/hb-16-manoel/atlas/blob/main/app/lib/data/legacyAtlasRepository.ts): `app/lib/data/legacyAtlasRepository.ts`
- [Supabase data](https://github.com/hb-16-manoel/atlas/tree/main/supabase/migrations): `supabase/migrations`

### Other components

- **User**
- **Supabase Auth**
- **Google OAuth**

## Connections

- User → Atlas app shell: uses
- Atlas app shell → Home: renders
- Atlas app shell → Planning: renders
- Atlas app shell → Journal: renders
- Atlas app shell → Progress: renders
- Atlas app shell → Settings: renders
- Atlas app shell → Atlas data hook: loads state
- Atlas data hook → Auth provider: reads user
- Atlas data hook → Cloud repository: creates repository
- Atlas data hook → Legacy browser store: reads/writes
- Cloud repository → Supabase data: reads/writes
- Progress → Atlas intelligence: analyzes
- Atlas intelligence → Daily score: calculates
- User → Auth flows: submits credentials
- Auth flows → Browser Supabase client: uses
- Auth provider → Browser Supabase client: uses
- Browser Supabase client → Supabase Auth: auth requests
- Auth flows → Google OAuth: starts sign-in
- Supabase Auth → Auth callback: redirects
- Auth callback → Server Supabase client: exchanges code
- Server Supabase client → Supabase Auth: uses
