# srikjonn/littlelearner architecture

> Architecture diagram of the GitHub repository srikjonn/littlelearner, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/srikjonn/littlelearner
- Repository: https://github.com/srikjonn/littlelearner

## Overview

Little Learners is a child-focused learning app with account access, learning activities and progress, plus an administrative content and usage area. Learners enter through the tab home, choose a learning area, and can review progress; the home screen explicitly retrieves progress. Authentication is mediated by a shared context backed by Supabase, while admin screens manage content and fetch dashboard statistics. The README names no additional capabilities; learning-screen internals and several route behaviors were not sampled, so their connections are omitted.

Main entry points: [`app/(tabs)/index.tsx`](https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/index.tsx) (Learner home), [`contexts/AuthContext.tsx`](https://github.com/srikjonn/littlelearner/blob/main/contexts/AuthContext.tsx) (Auth context), [`lib/supabase.ts`](https://github.com/srikjonn/littlelearner/blob/main/lib/supabase.ts) (Supabase client), [`app/_layout.tsx`](https://github.com/srikjonn/littlelearner/blob/main/app/_layout.tsx) (Root layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_root["Root layout<br/>[_layout.tsx]"]
  node_tabs["Learning tabs<br/>[_layout.tsx]"]
end

subgraph group_identity["Accounts and access"]
  node_authroutes["Authentication routes<br/>[_layout.tsx]"]
  node_login["Sign in<br/>[login.tsx]"]
  node_register["Registration<br/>[register.tsx]"]
  node_callback["OAuth callback<br/>[callback.tsx]"]
  node_authcontext["Auth context<br/>[AuthContext.tsx]"]
  node_protected["Route protection<br/>[ProtectedRoute.tsx]"]
end

subgraph group_learning["Learning experience"]
  node_home["Learner home<br/>[index.tsx]"]
  node_letters["Letter activities<br/>[letters.tsx]"]
  node_words["Word activities<br/>[words.tsx]"]
  node_stories["Story activities<br/>[stories.tsx]"]
  node_poems["Poem activities<br/>[poems.tsx]"]
  node_progress["Learning progress<br/>[progress.tsx]"]
  node_profile["Learner profile<br/>[profile.tsx]"]
end

subgraph group_administration["Administration"]
  node_adminroutes["Admin routes<br/>[_layout.tsx]"]
  node_dashboard["Admin dashboard<br/>[dashboard.tsx]"]
  node_contentadmin["Content management<br/>[content.tsx]"]
end

subgraph group_backend["Backend services"]
  node_client["Supabase client<br/>[supabase.ts]"]
  node_supabase[("Supabase backend")]
  node_datamodel["Data model<br/>[database.ts]"]
end

node_learner(("Learner"))

node_learner -->|"opens app"| node_root
node_root -->|"provides auth"| node_authcontext
node_root -->|"routes to"| node_authroutes
node_root -->|"routes to"| node_tabs
node_root -->|"routes to"| node_adminroutes
node_login -->|"requests sign-in"| node_authcontext
node_register -->|"requests sign-up"| node_authcontext
node_authcontext -->|"uses auth"| node_client
node_client -->|"auth and data calls"| node_supabase
node_callback -->|"uses client"| node_client
node_protected -->|"checks session"| node_authcontext
node_tabs -->|"reads session"| node_authcontext
node_home -->|"loads progress"| node_client
node_home -.->|"offers activity"| node_letters
node_home -.->|"offers activity"| node_words
node_home -.->|"offers activity"| node_stories
node_home -.->|"offers activity"| node_poems
node_home -->|"opens profile"| node_profile
node_home -->|"opens admin"| node_dashboard
node_dashboard -->|"fetches statistics"| node_client
node_dashboard -->|"signs out"| node_authcontext
node_contentadmin -->|"manages content"| node_supabase
node_client -->|"types data"| node_datamodel

click node_root "https://github.com/srikjonn/littlelearner/blob/main/app/_layout.tsx"
click node_authroutes "https://github.com/srikjonn/littlelearner/blob/main/app/(auth)/_layout.tsx"
click node_login "https://github.com/srikjonn/littlelearner/blob/main/app/(auth)/login.tsx"
click node_register "https://github.com/srikjonn/littlelearner/blob/main/app/(auth)/register.tsx"
click node_callback "https://github.com/srikjonn/littlelearner/blob/main/app/(auth)/callback.tsx"
click node_authcontext "https://github.com/srikjonn/littlelearner/blob/main/contexts/AuthContext.tsx"
click node_protected "https://github.com/srikjonn/littlelearner/blob/main/components/ProtectedRoute.tsx"
click node_tabs "https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/_layout.tsx"
click node_home "https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/index.tsx"
click node_letters "https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/letters.tsx"
click node_words "https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/words.tsx"
click node_stories "https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/stories.tsx"
click node_poems "https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/poems.tsx"
click node_progress "https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/progress.tsx"
click node_profile "https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/profile.tsx"
click node_adminroutes "https://github.com/srikjonn/littlelearner/blob/main/app/(admin)/_layout.tsx"
click node_dashboard "https://github.com/srikjonn/littlelearner/blob/main/app/(admin)/dashboard.tsx"
click node_contentadmin "https://github.com/srikjonn/littlelearner/blob/main/app/(admin)/content.tsx"
click node_client "https://github.com/srikjonn/littlelearner/blob/main/lib/supabase.ts"
click node_datamodel "https://github.com/srikjonn/littlelearner/blob/main/types/database.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_root,node_tabs toneBlue
class node_authroutes,node_login,node_register,node_callback,node_authcontext,node_protected toneAmber
class node_home,node_letters,node_words,node_stories,node_poems,node_progress,node_profile toneMint
class node_adminroutes,node_dashboard,node_contentadmin toneRose
class node_client,node_supabase,node_datamodel,node_learner toneIndigo
```

## Components

### App navigation

- [Root layout](https://github.com/srikjonn/littlelearner/blob/main/app/_layout.tsx): `app/_layout.tsx`
- [Learning tabs](https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/_layout.tsx): `app/(tabs)/_layout.tsx`

### Accounts and access

- [Authentication routes](https://github.com/srikjonn/littlelearner/blob/main/app/(auth)/_layout.tsx): `app/(auth)/_layout.tsx`
- [Sign in](https://github.com/srikjonn/littlelearner/blob/main/app/(auth)/login.tsx): `app/(auth)/login.tsx`
- [Registration](https://github.com/srikjonn/littlelearner/blob/main/app/(auth)/register.tsx): `app/(auth)/register.tsx`
- [OAuth callback](https://github.com/srikjonn/littlelearner/blob/main/app/(auth)/callback.tsx): `app/(auth)/callback.tsx`
- [Auth context](https://github.com/srikjonn/littlelearner/blob/main/contexts/AuthContext.tsx): `contexts/AuthContext.tsx`
- [Route protection](https://github.com/srikjonn/littlelearner/blob/main/components/ProtectedRoute.tsx): `components/ProtectedRoute.tsx`

### Learning experience

- [Learner home](https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Letter activities](https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/letters.tsx): `app/(tabs)/letters.tsx`
- [Word activities](https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/words.tsx): `app/(tabs)/words.tsx`
- [Story activities](https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/stories.tsx): `app/(tabs)/stories.tsx`
- [Poem activities](https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/poems.tsx): `app/(tabs)/poems.tsx`
- [Learning progress](https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/progress.tsx): `app/(tabs)/progress.tsx`
- [Learner profile](https://github.com/srikjonn/littlelearner/blob/main/app/(tabs)/profile.tsx): `app/(tabs)/profile.tsx`

### Administration

- [Admin routes](https://github.com/srikjonn/littlelearner/blob/main/app/(admin)/_layout.tsx): `app/(admin)/_layout.tsx`
- [Admin dashboard](https://github.com/srikjonn/littlelearner/blob/main/app/(admin)/dashboard.tsx): `app/(admin)/dashboard.tsx`
- [Content management](https://github.com/srikjonn/littlelearner/blob/main/app/(admin)/content.tsx): `app/(admin)/content.tsx`

### Backend services

- [Supabase client](https://github.com/srikjonn/littlelearner/blob/main/lib/supabase.ts): `lib/supabase.ts`
- **Supabase backend**
- [Data model](https://github.com/srikjonn/littlelearner/blob/main/types/database.ts): `types/database.ts`

### Other components

- **Learner**

## Connections

- Learner → Root layout: opens app
- Root layout → Auth context: provides auth (evidence: `app/_layout.tsx`)
- Root layout → Authentication routes: routes to (evidence: `app/_layout.tsx`)
- Root layout → Learning tabs: routes to (evidence: `app/_layout.tsx`)
- Root layout → Admin routes: routes to (evidence: `app/_layout.tsx`)
- Sign in → Auth context: requests sign-in (evidence: `app/(auth)/login.tsx`)
- Registration → Auth context: requests sign-up (evidence: `app/(auth)/register.tsx`)
- Auth context → Supabase client: uses auth (evidence: `contexts/AuthContext.tsx`)
- Supabase client → Supabase backend: auth and data calls (evidence: `lib/supabase.ts`)
- OAuth callback → Supabase client: uses client (evidence: `app/(auth)/callback.tsx`)
- Route protection → Auth context: checks session (evidence: `components/ProtectedRoute.tsx`)
- Learning tabs → Auth context: reads session (evidence: `app/(tabs)/_layout.tsx`)
- Learner home → Supabase client: loads progress (evidence: `app/(tabs)/index.tsx`)
- Learner home → Letter activities: offers activity
- Learner home → Word activities: offers activity
- Learner home → Story activities: offers activity
- Learner home → Poem activities: offers activity
- Learner home → Learner profile: opens profile (evidence: `app/(tabs)/index.tsx`)
- Learner home → Admin dashboard: opens admin (evidence: `app/(tabs)/index.tsx`)
- Admin dashboard → Supabase client: fetches statistics (evidence: `app/(admin)/dashboard.tsx`)
- Admin dashboard → Auth context: signs out (evidence: `app/(admin)/dashboard.tsx`)
- Content management → Supabase backend: manages content (evidence: `app/(admin)/content.tsx`)
- Supabase client → Data model: types data (evidence: `lib/supabase.ts`)
