# avtandilkakulia/vocabulary-learning-app architecture

> Architecture diagram of the GitHub repository avtandilkakulia/vocabulary-learning-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/avtandilkakulia/vocabulary-learning-app
- Repository: https://github.com/avtandilkakulia/vocabulary-learning-app

## Overview

Vocabulary Learning is a React app for building English–Georgian vocabulary and practicing recall. The main workflow is authentication, word entry and search, then free practice or a scored test, with results available in history. Word management uses a dedicated data hook; authentication and vocabulary/test data use Supabase. The README also documents profiles, progress statistics, achievements, theme preferences, and cross-device sync. The graph preserves these capabilities, but unsampled implementations and their internal links are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/App.tsx) (App navigation), [`src/lib/supabase.ts`](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/lib/supabase.ts) (Supabase client), [`src/components/WordManagement.tsx`](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/WordManagement.tsx) (Word management), [`src/components/words/modals/WordModal.tsx`](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/modals/WordModal.tsx) (Word editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app_shell["App navigation<br/>[App.tsx]"]
  node_error_boundary["Error boundary<br/>[ErrorBoundary.tsx]"]
end

subgraph group_identity["Identity and preferences"]
  node_auth_page["Sign in / signup<br/>[AuthPage.tsx]"]
  node_auth_context["Session and auth<br/>[AuthContext.tsx]"]
  node_theme["Theme preferences<br/>[ThemeContext.tsx]"]
end

subgraph group_vocabulary["Vocabulary management"]
  node_word_management["Word management<br/>[WordManagement.tsx]"]
  node_word_hook["Word data hook<br/>[useWords.ts]"]
  node_word_form["Word editor<br/>[WordModal.tsx]"]
  node_word_table["Word table<br/>[WordTable.tsx]"]
  node_word_toolbar["Search toolbar<br/>[WordToolbar.tsx]"]
  node_pagination["Pagination<br/>[Pagination.tsx]"]
  node_modal_portal["Modal portal<br/>[ModalPortal.tsx]"]
  node_pos_styles["Word display styles"]
end

subgraph group_learning["Practice and progress"]
  node_free_mode["Free practice<br/>[FreeMode.tsx]"]
  node_test_mode["Scored test<br/>[TestMode.tsx]"]
  node_history["Test history<br/>[History.tsx]"]
  node_profile["Profile and progress<br/>[UserProfile.tsx]"]
end

subgraph group_services["Backend and shared logic"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_supabase_service[("Supabase backend")]
  node_sanitizer["Description sanitizer"]
  node_formatter["Text formatting<br/>[applyFormatting.ts]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app_shell
node_app_shell -->|"shows signed out"| node_auth_page
node_app_shell -->|"routes to"| node_word_management
node_app_shell -->|"routes to"| node_free_mode
node_app_shell -->|"routes to"| node_test_mode
node_app_shell -->|"routes to"| node_history
node_app_shell -->|"shows profile"| node_profile
node_app_shell -->|"wraps"| node_error_boundary
node_auth_page -->|"requests auth"| node_auth_context
node_auth_context -->|"auth calls"| node_supabase_client
node_auth_page -->|"reads theme"| node_theme
node_word_management -->|"uses data hook"| node_word_hook
node_word_management -->|"renders"| node_word_table
node_word_management -->|"renders"| node_word_toolbar
node_word_management -->|"renders"| node_pagination
node_word_management -->|"opens editor"| node_word_form
node_word_hook -->|"reads and writes"| node_supabase_client
node_word_toolbar -->|"uses search"| node_word_hook
node_word_table -->|"uses styles"| node_pos_styles
node_word_form -->|"renders through"| node_modal_portal
node_word_form -->|"calls word actions"| node_word_hook
node_word_form -->|"applies formatting"| node_formatter
node_word_form -->|"sanitizes preview"| node_sanitizer
node_free_mode -->|"loads words and saves results"| node_supabase_client
node_test_mode -->|"uses backend"| node_supabase_client
node_history -->|"loads history"| node_supabase_client
node_profile -->|"uses backend"| node_supabase_client
node_free_mode -->|"sanitizes descriptions"| node_sanitizer
node_test_mode -->|"sanitizes descriptions"| node_sanitizer
node_supabase_client -->|"connects to"| node_supabase_service

click node_app_shell "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/App.tsx"
click node_error_boundary "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/ErrorBoundary.tsx"
click node_auth_page "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/AuthPage.tsx"
click node_auth_context "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/contexts/AuthContext.tsx"
click node_theme "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/contexts/ThemeContext.tsx"
click node_word_management "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/WordManagement.tsx"
click node_word_hook "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/useWords.ts"
click node_word_form "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/modals/WordModal.tsx"
click node_word_table "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/WordTable.tsx"
click node_word_toolbar "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/WordToolbar.tsx"
click node_pagination "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/Pagination.tsx"
click node_modal_portal "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/modals/ModalPortal.tsx"
click node_pos_styles "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/partOfSpeechStyles.ts"
click node_free_mode "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/FreeMode.tsx"
click node_test_mode "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/TestMode.tsx"
click node_history "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/History.tsx"
click node_profile "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/UserProfile.tsx"
click node_supabase_client "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/lib/supabase.ts"
click node_sanitizer "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/lib/sanitizeDescription.ts"
click node_formatter "https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/lib/applyFormatting.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_shell,node_error_boundary toneBlue
class node_auth_page,node_auth_context,node_theme toneAmber
class node_word_management,node_word_hook,node_word_form,node_word_table,node_word_toolbar,node_pagination,node_modal_portal,node_pos_styles toneMint
class node_free_mode,node_test_mode,node_history,node_profile toneRose
class node_supabase_client,node_supabase_service,node_sanitizer,node_formatter,node_learner toneIndigo
```

## Components

### Application shell

- [App navigation](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/App.tsx): `src/App.tsx`
- [Error boundary](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/ErrorBoundary.tsx): `src/components/ErrorBoundary.tsx`

### Identity and preferences

- [Sign in / signup](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/AuthPage.tsx): `src/components/AuthPage.tsx`
- [Session and auth](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Theme preferences](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/contexts/ThemeContext.tsx): `src/contexts/ThemeContext.tsx`

### Vocabulary management

- [Word management](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/WordManagement.tsx): `src/components/WordManagement.tsx`
- [Word data hook](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/useWords.ts): `src/components/words/useWords.ts`
- [Word editor](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/modals/WordModal.tsx): `src/components/words/modals/WordModal.tsx`
- [Word table](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/WordTable.tsx): `src/components/words/WordTable.tsx`
- [Search toolbar](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/WordToolbar.tsx): `src/components/words/WordToolbar.tsx`
- [Pagination](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/Pagination.tsx): `src/components/words/Pagination.tsx`
- [Modal portal](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/modals/ModalPortal.tsx): `src/components/words/modals/ModalPortal.tsx`
- [Word display styles](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/words/partOfSpeechStyles.ts): `src/components/words/partOfSpeechStyles.ts`

### Practice and progress

- [Free practice](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/FreeMode.tsx): `src/components/FreeMode.tsx`
- [Scored test](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/TestMode.tsx): `src/components/TestMode.tsx`
- [Test history](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/History.tsx): `src/components/History.tsx`
- [Profile and progress](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/components/UserProfile.tsx): `src/components/UserProfile.tsx`

### Backend and shared logic

- [Supabase client](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase backend**
- [Description sanitizer](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/lib/sanitizeDescription.ts): `src/lib/sanitizeDescription.ts`
- [Text formatting](https://github.com/avtandilkakulia/vocabulary-learning-app/blob/main/src/lib/applyFormatting.ts): `src/lib/applyFormatting.ts`

### Other components

- **Learner**

## Connections

- Learner → App navigation: uses (evidence: `README.md`)
- App navigation → Sign in / signup: shows signed out (evidence: `src/App.tsx`)
- App navigation → Word management: routes to (evidence: `src/App.tsx`)
- App navigation → Free practice: routes to (evidence: `src/App.tsx`)
- App navigation → Scored test: routes to (evidence: `src/App.tsx`)
- App navigation → Test history: routes to (evidence: `src/App.tsx`)
- App navigation → Profile and progress: shows profile (evidence: `src/App.tsx`)
- App navigation → Error boundary: wraps (evidence: `src/App.tsx`)
- Sign in / signup → Session and auth: requests auth (evidence: `src/components/AuthPage.tsx`)
- Session and auth → Supabase client: auth calls (evidence: `src/contexts/AuthContext.tsx`)
- Sign in / signup → Theme preferences: reads theme (evidence: `src/components/AuthPage.tsx`)
- Word management → Word data hook: uses data hook (evidence: `src/components/WordManagement.tsx`)
- Word management → Word table: renders (evidence: `src/components/WordManagement.tsx`)
- Word management → Search toolbar: renders (evidence: `src/components/WordManagement.tsx`)
- Word management → Pagination: renders (evidence: `src/components/WordManagement.tsx`)
- Word management → Word editor: opens editor (evidence: `src/components/WordManagement.tsx`)
- Word data hook → Supabase client: reads and writes (evidence: `src/components/words/useWords.ts`)
- Search toolbar → Word data hook: uses search (evidence: `src/components/words/WordToolbar.tsx`)
- Word table → Word display styles: uses styles (evidence: `src/components/words/WordTable.tsx`)
- Word editor → Modal portal: renders through (evidence: `src/components/words/modals/WordModal.tsx`)
- Word editor → Word data hook: calls word actions (evidence: `src/components/words/modals/WordModal.tsx`)
- Word editor → Text formatting: applies formatting (evidence: `src/components/words/modals/WordModal.tsx`)
- Word editor → Description sanitizer: sanitizes preview (evidence: `src/components/words/modals/WordModal.tsx`)
- Free practice → Supabase client: loads words and saves results (evidence: `src/components/FreeMode.tsx`)
- Scored test → Supabase client: uses backend (evidence: `src/components/TestMode.tsx`)
- Test history → Supabase client: loads history (evidence: `src/components/History.tsx`)
- Profile and progress → Supabase client: uses backend (evidence: `src/components/UserProfile.tsx`)
- Free practice → Description sanitizer: sanitizes descriptions (evidence: `src/components/FreeMode.tsx`)
- Scored test → Description sanitizer: sanitizes descriptions (evidence: `src/components/TestMode.tsx`)
- Supabase client → Supabase backend: connects to (evidence: `README.md`)
