# arunshreyas/crackr architecture

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

- Interactive diagram: https://gitdiagram.com/arunshreyas/crackr
- Repository: https://github.com/arunshreyas/crackr

## Overview

Crackrr is a JEE exam-preparation web app for practice, progress tracking, and competitive motivation. Its central workflow is a signed-in student choosing questions, completing practice, and reviewing mastery and rewards. The graph includes the dashboard, profile, onboarding, and settings branches shown by the tree and source references. Evidence is limited to the supplied excerpts, SOURCE INDEX references, and tree; unsampled implementation details and the question-ingestion scripts are not mapped.

Main entry points: [`app/practice/page.tsx`](https://github.com/arunshreyas/crackr/blob/main/app/practice/page.tsx) (Practice route), [`lib/server/auth/index.ts`](https://github.com/arunshreyas/crackr/blob/main/lib/server/auth/index.ts) (Authentication), [`lib/server/practice/service.ts`](https://github.com/arunshreyas/crackr/blob/main/lib/server/practice/service.ts) (Practice sessions), [`lib/server/db/index.ts`](https://github.com/arunshreyas/crackr/blob/main/lib/server/db/index.ts) (Application database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_student["Student experience"]
  node_home["Landing page<br/>[page.tsx]"]
  node_onboarding["Onboarding<br/>[OnboardingForm.tsx]"]
  node_onboarding_route["Onboarding route<br/>[page.tsx]"]
  node_dashboard_route["Dashboard route<br/>[page.tsx]"]
  node_dashboard["Dashboard view"]
  node_dashboard_widgets["Dashboard widgets"]
  node_settings_route["Settings route<br/>[page.tsx]"]
  node_settings["Settings view<br/>[SettingsClient.tsx]"]
  node_settings_action["Settings action<br/>[settings.ts]"]
end

subgraph group_practice["Practice and questions"]
  node_practice_route["Practice route<br/>[page.tsx]"]
  node_practice_ui["Practice workstation"]
  node_questions["Question catalog<br/>[service.ts]"]
  node_practice_service["Practice sessions<br/>[service.ts]"]
end

subgraph group_insights["Progress and profile"]
  node_progress_route["Progress route<br/>[page.tsx]"]
  node_progress_view["Progress analytics<br/>[ProgressClient.tsx]"]
  node_progress_service["Progress service<br/>[service.ts]"]
  node_profile_route["Profile route<br/>[page.tsx]"]
  node_profile_view["Profile and ranks<br/>[ProfileClient.tsx]"]
  node_profile_service["Profile service<br/>[service.ts]"]
end

subgraph group_services["Server services"]
  node_dashboard_service["Dashboard data<br/>[dashboard.ts]"]
  node_auth["Authentication<br/>[index.ts]"]
  node_gamification["XP and rewards<br/>[service.ts]"]
  node_game_config["Rank and reward rules<br/>[config.ts]"]
  node_database[("Application database<br/>[index.ts]")]
end

node_student(("Student"))

node_student -->|"visits"| node_home
node_student -.->|"opens practice"| node_practice_route
node_student -.->|"starts onboarding"| node_onboarding_route
node_onboarding_route -->|"renders"| node_onboarding
node_student -.->|"opens dashboard"| node_dashboard_route
node_dashboard_route -->|"checks identity"| node_auth
node_dashboard_route -->|"loads data"| node_dashboard_service
node_dashboard_route -->|"renders"| node_dashboard
node_dashboard -->|"renders"| node_dashboard_widgets
node_student -.->|"opens settings"| node_settings_route
node_settings_route -->|"checks identity"| node_auth
node_settings_route -->|"renders"| node_settings
node_settings -->|"invokes deletion"| node_settings_action
node_student -.->|"starts session"| node_practice_route
node_practice_route -->|"checks identity"| node_auth
node_practice_route -->|"loads catalog"| node_questions
node_practice_route -->|"loads active sessions"| node_practice_service
node_practice_route -->|"renders workstation"| node_practice_ui
node_practice_service -->|"requires user"| node_auth
node_practice_service -->|"fetches questions"| node_questions
node_practice_service -->|"awards practice XP"| node_gamification
node_practice_service -->|"reads and writes"| node_database
node_questions -->|"queries catalog"| node_database
node_student -.->|"opens progress"| node_progress_route
node_progress_route -->|"checks identity"| node_auth
node_progress_route -->|"loads analytics"| node_progress_service
node_progress_route -->|"renders"| node_progress_view
node_progress_service -->|"queries activity"| node_database
node_student -.->|"opens profile"| node_profile_route
node_profile_route -->|"checks identity"| node_auth
node_profile_route -->|"loads profile"| node_profile_service
node_profile_route -->|"renders"| node_profile_view
node_profile_service -->|"calculates ranks"| node_game_config
node_profile_service -->|"queries profile"| node_database
node_gamification -->|"uses rules"| node_game_config
node_gamification -->|"updates rewards"| node_database

click node_home "https://github.com/arunshreyas/crackr/blob/main/app/page.tsx"
click node_onboarding "https://github.com/arunshreyas/crackr/blob/main/app/onboarding/OnboardingForm.tsx"
click node_onboarding_route "https://github.com/arunshreyas/crackr/blob/main/app/onboarding/page.tsx"
click node_dashboard_route "https://github.com/arunshreyas/crackr/blob/main/app/dashboard/page.tsx"
click node_dashboard "https://github.com/arunshreyas/crackr/blob/main/app/dashboard/DashboardClient.tsx"
click node_dashboard_widgets "https://github.com/arunshreyas/crackr/tree/main/components/dashboard"
click node_settings_route "https://github.com/arunshreyas/crackr/blob/main/app/settings/page.tsx"
click node_settings "https://github.com/arunshreyas/crackr/blob/main/app/settings/SettingsClient.tsx"
click node_settings_action "https://github.com/arunshreyas/crackr/blob/main/app/actions/settings.ts"
click node_practice_route "https://github.com/arunshreyas/crackr/blob/main/app/practice/page.tsx"
click node_practice_ui "https://github.com/arunshreyas/crackr/blob/main/app/practice/PracticeContainer.tsx"
click node_questions "https://github.com/arunshreyas/crackr/blob/main/lib/server/questions/service.ts"
click node_practice_service "https://github.com/arunshreyas/crackr/blob/main/lib/server/practice/service.ts"
click node_progress_route "https://github.com/arunshreyas/crackr/blob/main/app/progress/page.tsx"
click node_progress_view "https://github.com/arunshreyas/crackr/blob/main/app/progress/ProgressClient.tsx"
click node_progress_service "https://github.com/arunshreyas/crackr/blob/main/lib/server/progress/service.ts"
click node_profile_route "https://github.com/arunshreyas/crackr/blob/main/app/profile/page.tsx"
click node_profile_view "https://github.com/arunshreyas/crackr/blob/main/app/profile/ProfileClient.tsx"
click node_profile_service "https://github.com/arunshreyas/crackr/blob/main/lib/server/profile/service.ts"
click node_dashboard_service "https://github.com/arunshreyas/crackr/blob/main/lib/services/dashboard.ts"
click node_auth "https://github.com/arunshreyas/crackr/blob/main/lib/server/auth/index.ts"
click node_gamification "https://github.com/arunshreyas/crackr/blob/main/lib/server/gamification/service.ts"
click node_game_config "https://github.com/arunshreyas/crackr/blob/main/lib/server/gamification/config.ts"
click node_database "https://github.com/arunshreyas/crackr/blob/main/lib/server/db/index.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_home,node_onboarding,node_onboarding_route,node_dashboard_route,node_dashboard,node_dashboard_widgets,node_settings_route,node_settings,node_settings_action toneBlue
class node_practice_route,node_practice_ui,node_questions,node_practice_service toneAmber
class node_progress_route,node_progress_view,node_progress_service,node_profile_route,node_profile_view,node_profile_service toneMint
class node_dashboard_service,node_auth,node_gamification,node_game_config,node_database toneRose
class node_student toneIndigo
```

## Components

### Student experience

- [Landing page](https://github.com/arunshreyas/crackr/blob/main/app/page.tsx): `app/page.tsx`
- [Onboarding](https://github.com/arunshreyas/crackr/blob/main/app/onboarding/OnboardingForm.tsx): `app/onboarding/OnboardingForm.tsx`
- [Onboarding route](https://github.com/arunshreyas/crackr/blob/main/app/onboarding/page.tsx): `app/onboarding/page.tsx`
- [Dashboard route](https://github.com/arunshreyas/crackr/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Dashboard view](https://github.com/arunshreyas/crackr/blob/main/app/dashboard/DashboardClient.tsx): `app/dashboard/DashboardClient.tsx`
- [Dashboard widgets](https://github.com/arunshreyas/crackr/tree/main/components/dashboard): `components/dashboard`
- [Settings route](https://github.com/arunshreyas/crackr/blob/main/app/settings/page.tsx): `app/settings/page.tsx`
- [Settings view](https://github.com/arunshreyas/crackr/blob/main/app/settings/SettingsClient.tsx): `app/settings/SettingsClient.tsx`
- [Settings action](https://github.com/arunshreyas/crackr/blob/main/app/actions/settings.ts): `app/actions/settings.ts`

### Practice and questions

- [Practice route](https://github.com/arunshreyas/crackr/blob/main/app/practice/page.tsx): `app/practice/page.tsx`
- [Practice workstation](https://github.com/arunshreyas/crackr/blob/main/app/practice/PracticeContainer.tsx): `app/practice/PracticeContainer.tsx`
- [Question catalog](https://github.com/arunshreyas/crackr/blob/main/lib/server/questions/service.ts): `lib/server/questions/service.ts`
- [Practice sessions](https://github.com/arunshreyas/crackr/blob/main/lib/server/practice/service.ts): `lib/server/practice/service.ts`

### Progress and profile

- [Progress route](https://github.com/arunshreyas/crackr/blob/main/app/progress/page.tsx): `app/progress/page.tsx`
- [Progress analytics](https://github.com/arunshreyas/crackr/blob/main/app/progress/ProgressClient.tsx): `app/progress/ProgressClient.tsx`
- [Progress service](https://github.com/arunshreyas/crackr/blob/main/lib/server/progress/service.ts): `lib/server/progress/service.ts`
- [Profile route](https://github.com/arunshreyas/crackr/blob/main/app/profile/page.tsx): `app/profile/page.tsx`
- [Profile and ranks](https://github.com/arunshreyas/crackr/blob/main/app/profile/ProfileClient.tsx): `app/profile/ProfileClient.tsx`
- [Profile service](https://github.com/arunshreyas/crackr/blob/main/lib/server/profile/service.ts): `lib/server/profile/service.ts`

### Server services

- [Dashboard data](https://github.com/arunshreyas/crackr/blob/main/lib/services/dashboard.ts): `lib/services/dashboard.ts`
- [Authentication](https://github.com/arunshreyas/crackr/blob/main/lib/server/auth/index.ts): `lib/server/auth/index.ts`
- [XP and rewards](https://github.com/arunshreyas/crackr/blob/main/lib/server/gamification/service.ts): `lib/server/gamification/service.ts`
- [Rank and reward rules](https://github.com/arunshreyas/crackr/blob/main/lib/server/gamification/config.ts): `lib/server/gamification/config.ts`
- [Application database](https://github.com/arunshreyas/crackr/blob/main/lib/server/db/index.ts): `lib/server/db/index.ts`

### Other components

- **Student**

## Connections

- Student → Landing page: visits (evidence: `app/page.tsx`)
- Student → Practice route: opens practice
- Student → Onboarding route: starts onboarding
- Onboarding route → Onboarding: renders (evidence: `app/onboarding/page.tsx`)
- Student → Dashboard route: opens dashboard
- Dashboard route → Authentication: checks identity (evidence: `app/dashboard/page.tsx`)
- Dashboard route → Dashboard data: loads data (evidence: `app/dashboard/page.tsx`)
- Dashboard route → Dashboard view: renders (evidence: `app/dashboard/page.tsx`)
- Dashboard view → Dashboard widgets: renders (evidence: `app/dashboard/DashboardClient.tsx`)
- Student → Settings route: opens settings
- Settings route → Authentication: checks identity (evidence: `app/settings/page.tsx`)
- Settings route → Settings view: renders (evidence: `app/settings/page.tsx`)
- Settings view → Settings action: invokes deletion (evidence: `app/settings/SettingsClient.tsx`)
- Student → Practice route: starts session
- Practice route → Authentication: checks identity (evidence: `app/practice/page.tsx`)
- Practice route → Question catalog: loads catalog (evidence: `app/practice/page.tsx`)
- Practice route → Practice sessions: loads active sessions (evidence: `app/practice/page.tsx`)
- Practice route → Practice workstation: renders workstation (evidence: `app/practice/page.tsx`)
- Practice sessions → Authentication: requires user (evidence: `lib/server/practice/service.ts`)
- Practice sessions → Question catalog: fetches questions (evidence: `lib/server/practice/service.ts`)
- Practice sessions → XP and rewards: awards practice XP (evidence: `lib/server/practice/service.ts`)
- Practice sessions → Application database: reads and writes (evidence: `lib/server/practice/service.ts`)
- Question catalog → Application database: queries catalog (evidence: `lib/server/questions/service.ts`)
- Student → Progress route: opens progress
- Progress route → Authentication: checks identity (evidence: `app/progress/page.tsx`)
- Progress route → Progress service: loads analytics (evidence: `app/progress/page.tsx`)
- Progress route → Progress analytics: renders (evidence: `app/progress/page.tsx`)
- Progress service → Application database: queries activity (evidence: `lib/server/progress/service.ts`)
- Student → Profile route: opens profile
- Profile route → Authentication: checks identity (evidence: `app/profile/page.tsx`)
- Profile route → Profile service: loads profile (evidence: `app/profile/page.tsx`)
- Profile route → Profile and ranks: renders (evidence: `app/profile/page.tsx`)
- Profile service → Rank and reward rules: calculates ranks (evidence: `lib/server/profile/service.ts`)
- Profile service → Application database: queries profile (evidence: `lib/server/profile/service.ts`)
- XP and rewards → Rank and reward rules: uses rules (evidence: `lib/server/gamification/service.ts`)
- XP and rewards → Application database: updates rewards (evidence: `lib/server/gamification/service.ts`)
