# haryaksh1/just_testing_things_out architecture

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

- Interactive diagram: https://gitdiagram.com/haryaksh1/just_testing_things_out
- Repository: https://github.com/haryaksh1/just_testing_things_out

## Overview

This repository implements a Spanish-learning app: learners follow an unlocked course path, complete interactive lessons or practice sessions, and earn progress that feeds streaks, quests, a shop, and weekly leagues. The Next.js frontend presents these experiences and a FastAPI backend owns session handling and learner state, with SQLite persistence. The graph includes documented side capabilities; some frontend-to-backend connections are dashed because the sampled excerpts do not establish their HTTP wiring or endpoint details.

Main entry points: [`duolingo_testing-main/frontend/lib/api.ts`](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/lib/api.ts) (API client), [`duolingo_testing-main/backend/seed.py`](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/seed.py) (Course seeding), [`duolingo_testing-main/backend/main.py`](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/main.py) (FastAPI routes), [`duolingo_testing-main/backend/services.py`](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/services.py) (Learner services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning experience"]
  node_learn_page["Learning path page<br/>[page.tsx]"]
  node_path_view["Course path<br/>[learning-path.tsx]"]
  node_lesson_route["Lesson route<br/>[page.tsx]"]
  node_lesson_player["Lesson player<br/>[player.tsx]"]
  node_exercise_views["Exercise views<br/>[exercises.tsx]"]
  node_guidebook["Unit guidebook<br/>[page.tsx]"]
  node_practice["Practice page<br/>[page.tsx]"]
  node_review_timed["Review and timed<br/>[page.tsx]"]
end

subgraph group_engagement["Progress and rewards"]
  node_profile["Learner profile<br/>[page.tsx]"]
  node_quests["Daily quests<br/>[page.tsx]"]
  node_quest_rewards["Quest rewards<br/>[quests.tsx]"]
  node_shop["Power-up shop<br/>[page.tsx]"]
  node_leaderboard["Weekly league<br/>[page.tsx]"]
  node_settings["Learner settings<br/>[settings-form.tsx]"]
  node_user_progress["Progress summary<br/>[user-progress.tsx]"]
end

subgraph group_backend["API and game rules"]
  node_api_client["API client<br/>[api.ts]"]
  node_api_routes["FastAPI routes<br/>[main.py]"]
  node_game_rules["Game rules<br/>[logic.py]"]
  node_learner_services["Learner services<br/>[services.py]"]
end

subgraph group_storage["Course data"]
  node_course_content["Course content<br/>[content.py]"]
  node_seed_builder["Course seeding<br/>[seed.py]"]
  node_sqlite[("SQLite access<br/>[db.py]")]
end

node_learner(("Learner"))

node_learner -->|"opens"| node_learn_page
node_learn_page -->|"renders"| node_path_view
node_learn_page -->|"requests path and profile"| node_api_client
node_lesson_route -->|"renders"| node_lesson_player
node_lesson_player -->|"renders"| node_exercise_views
node_lesson_player -->|"completes session"| node_api_client
node_api_client -.->|"HTTP requests"| node_api_routes
node_api_routes -->|"loads learner state"| node_learner_services
node_api_routes -->|"uses game rules"| node_game_rules
node_api_routes -->|"queries and updates"| node_sqlite
node_learner_services -->|"applies rules"| node_game_rules
node_learner_services -->|"reads and writes"| node_sqlite
node_seed_builder -->|"builds exercises from"| node_course_content
node_seed_builder -->|"seeds database"| node_sqlite
node_seed_builder -->|"uses game rules"| node_game_rules
node_seed_builder -->|"awards achievements"| node_learner_services
node_learner -.->|"opens"| node_practice
node_learner -.->|"opens"| node_guidebook
node_learner -.->|"starts run"| node_review_timed
node_learner -.->|"views"| node_profile
node_learner -.->|"views"| node_quests
node_quests -->|"shows rewards"| node_quest_rewards
node_learner -.->|"buys power-ups"| node_shop
node_shop -->|"loads learner data"| node_api_client
node_learner -.->|"views league"| node_leaderboard
node_leaderboard -->|"loads standings"| node_api_client
node_learner -.->|"updates settings"| node_settings
node_learner -.->|"checks progress"| node_user_progress

click node_learn_page "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/learn/page.tsx"
click node_path_view "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/learn/learning-path.tsx"
click node_lesson_route "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/lesson/%5BlessonId%5D/page.tsx"
click node_lesson_player "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/lesson/player.tsx"
click node_exercise_views "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/lesson/exercises.tsx"
click node_api_client "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/lib/api.ts"
click node_api_routes "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/main.py"
click node_game_rules "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/logic.py"
click node_learner_services "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/services.py"
click node_course_content "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/content.py"
click node_seed_builder "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/seed.py"
click node_sqlite "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/db.py"
click node_guidebook "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/guidebook/%5BunitId%5D/page.tsx"
click node_practice "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/practice/page.tsx"
click node_review_timed "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/lesson/review/page.tsx"
click node_profile "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/profile/page.tsx"
click node_quests "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/quests/page.tsx"
click node_quest_rewards "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/components/quests.tsx"
click node_shop "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/shop/page.tsx"
click node_leaderboard "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/leaderboard/page.tsx"
click node_settings "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/settings/settings-form.tsx"
click node_user_progress "https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/components/user-progress.tsx"

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_learn_page,node_path_view,node_lesson_route,node_lesson_player,node_exercise_views,node_guidebook,node_practice,node_review_timed toneBlue
class node_profile,node_quests,node_quest_rewards,node_shop,node_leaderboard,node_settings,node_user_progress toneAmber
class node_api_client,node_api_routes,node_game_rules,node_learner_services toneMint
class node_course_content,node_seed_builder,node_sqlite toneRose
class node_learner toneIndigo
```

## Components

### Learning experience

- [Learning path page](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/learn/page.tsx): `duolingo_testing-main/frontend/app/(main)/learn/page.tsx`
- [Course path](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/learn/learning-path.tsx): `duolingo_testing-main/frontend/app/(main)/learn/learning-path.tsx`
- [Lesson route](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/lesson/%5BlessonId%5D/page.tsx): `duolingo_testing-main/frontend/app/lesson/[lessonId]/page.tsx`
- [Lesson player](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/lesson/player.tsx): `duolingo_testing-main/frontend/app/lesson/player.tsx`
- [Exercise views](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/lesson/exercises.tsx): `duolingo_testing-main/frontend/app/lesson/exercises.tsx`
- [Unit guidebook](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/guidebook/%5BunitId%5D/page.tsx): `duolingo_testing-main/frontend/app/(main)/guidebook/[unitId]/page.tsx`
- [Practice page](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/practice/page.tsx): `duolingo_testing-main/frontend/app/(main)/practice/page.tsx`
- [Review and timed](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/lesson/review/page.tsx): `duolingo_testing-main/frontend/app/lesson/review/page.tsx`

### Progress and rewards

- [Learner profile](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/profile/page.tsx): `duolingo_testing-main/frontend/app/(main)/profile/page.tsx`
- [Daily quests](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/quests/page.tsx): `duolingo_testing-main/frontend/app/(main)/quests/page.tsx`
- [Quest rewards](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/components/quests.tsx): `duolingo_testing-main/frontend/components/quests.tsx`
- [Power-up shop](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/shop/page.tsx): `duolingo_testing-main/frontend/app/(main)/shop/page.tsx`
- [Weekly league](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/leaderboard/page.tsx): `duolingo_testing-main/frontend/app/(main)/leaderboard/page.tsx`
- [Learner settings](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/app/(main)/settings/settings-form.tsx): `duolingo_testing-main/frontend/app/(main)/settings/settings-form.tsx`
- [Progress summary](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/components/user-progress.tsx): `duolingo_testing-main/frontend/components/user-progress.tsx`

### API and game rules

- [API client](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/frontend/lib/api.ts): `duolingo_testing-main/frontend/lib/api.ts`
- [FastAPI routes](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/main.py): `duolingo_testing-main/backend/main.py`
- [Game rules](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/logic.py): `duolingo_testing-main/backend/logic.py`
- [Learner services](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/services.py): `duolingo_testing-main/backend/services.py`

### Course data

- [Course content](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/content.py): `duolingo_testing-main/backend/content.py`
- [Course seeding](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/seed.py): `duolingo_testing-main/backend/seed.py`
- [SQLite access](https://github.com/haryaksh1/just_testing_things_out/blob/main/duolingo_testing-main/backend/db.py): `duolingo_testing-main/backend/db.py`

### Other components

- **Learner**

## Connections

- Learner → Learning path page: opens
- Learning path page → Course path: renders (evidence: `duolingo_testing-main/frontend/app/(main)/learn/page.tsx`)
- Learning path page → API client: requests path and profile (evidence: `duolingo_testing-main/frontend/app/(main)/learn/page.tsx`)
- Lesson route → Lesson player: renders (evidence: `duolingo_testing-main/frontend/app/lesson/[lessonId]/page.tsx`)
- Lesson player → Exercise views: renders (evidence: `duolingo_testing-main/frontend/app/lesson/player.tsx`)
- Lesson player → API client: completes session (evidence: `duolingo_testing-main/frontend/app/lesson/player.tsx`)
- API client → FastAPI routes: HTTP requests
- FastAPI routes → Learner services: loads learner state (evidence: `duolingo_testing-main/backend/main.py`)
- FastAPI routes → Game rules: uses game rules (evidence: `duolingo_testing-main/backend/main.py`)
- FastAPI routes → SQLite access: queries and updates (evidence: `duolingo_testing-main/backend/main.py`)
- Learner services → Game rules: applies rules (evidence: `duolingo_testing-main/backend/services.py`)
- Learner services → SQLite access: reads and writes (evidence: `duolingo_testing-main/backend/services.py`)
- Course seeding → Course content: builds exercises from (evidence: `duolingo_testing-main/backend/seed.py`)
- Course seeding → SQLite access: seeds database (evidence: `duolingo_testing-main/backend/seed.py`)
- Course seeding → Game rules: uses game rules (evidence: `duolingo_testing-main/backend/seed.py`)
- Course seeding → Learner services: awards achievements (evidence: `duolingo_testing-main/backend/seed.py`)
- Learner → Practice page: opens
- Learner → Unit guidebook: opens
- Learner → Review and timed: starts run
- Learner → Learner profile: views
- Learner → Daily quests: views
- Daily quests → Quest rewards: shows rewards (evidence: `duolingo_testing-main/frontend/components/quests.tsx`)
- Learner → Power-up shop: buys power-ups
- Power-up shop → API client: loads learner data (evidence: `duolingo_testing-main/frontend/app/(main)/shop/page.tsx`)
- Learner → Weekly league: views league
- Weekly league → API client: loads standings (evidence: `duolingo_testing-main/frontend/app/(main)/leaderboard/page.tsx`)
- Learner → Learner settings: updates settings
- Learner → Progress summary: checks progress
