# ali-jemo/labpoint-ashurix architecture

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

- Interactive diagram: https://gitdiagram.com/ali-jemo/labpoint-ashurix
- Repository: https://github.com/ali-jemo/labpoint-ashurix

## Overview

LabPoint is a student task-and-credit marketplace using ARI, with a Telegram bot serving as an entry point to a Firebase-backed web app. The principal workflow is to enter the app, post or accept a task, complete it, and settle the reward; users can also transfer ARI and view account, notification, and leaderboard features. The sampled code shows direct browser-to-Firebase reads and writes rather than an API-server path. Some page implementations were not sampled, so their internal data wiring is not inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/App.jsx) (App routes), [`frontend/src/components/TaskDetailsModal.jsx`](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/components/TaskDetailsModal.jsx) (Task actions), [`frontend/src/context/AuthContext.jsx`](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/context/AuthContext.jsx) (Auth context), [`bot.py`](https://github.com/ali-jemo/labpoint-ashurix/blob/master/bot.py) (Telegram bot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_bot["Telegram bot<br/>[bot.py]"]
  node_app["App routes<br/>[App.jsx]"]
end

subgraph group_experience["Web experience"]
  node_onboarding["Onboarding<br/>[Onboarding.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_profile["Profile<br/>[Profile.jsx]"]
  node_settings["Settings<br/>[Settings.jsx]"]
  node_leaderboard["Leaderboard<br/>[Leaderboard.jsx]"]
  node_notifications["Notifications<br/>[Notifications.jsx]"]
  node_theme["Theme context<br/>[ThemeContext.jsx]"]
end

subgraph group_market["Tasks and ARI"]
  node_wallet["Wallet<br/>[Wallet.jsx]"]
  node_taskmarket["Task market<br/>[TaskMarket.jsx]"]
  node_create["Create task<br/>[CreateTask.jsx]"]
  node_taskdetails["Task actions"]
  node_sendari["ARI transfer<br/>[SendAriModal.jsx]"]
end

subgraph group_platform["Firebase platform"]
  node_auth["Auth context<br/>[AuthContext.jsx]"]
  node_firebase["Firebase setup<br/>[firebase.js]"]
  node_firestore[("Firestore")]
end

node_student(("Student"))
node_telegram(("Telegram"))

node_student -->|"opens bot"| node_telegram
node_telegram -->|"sends commands"| node_bot
node_bot -->|"offers app link"| node_telegram
node_student -->|"opens web app"| node_app
node_app -->|"routes to"| node_onboarding
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_wallet
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_taskmarket
node_app -->|"routes to"| node_create
node_app -->|"routes to"| node_leaderboard
node_app -->|"routes to"| node_settings
node_app -->|"routes to"| node_notifications
node_onboarding -->|"requests login"| node_auth
node_auth -->|"uses services"| node_firebase
node_firebase -->|"provides database"| node_firestore
node_auth -->|"reads and writes profiles"| node_firestore
node_settings -->|"updates profile"| node_firestore
node_create -->|"creates task and charges balance"| node_firestore
node_taskmarket -->|"opens task actions"| node_taskdetails
node_taskdetails -->|"updates task and settles reward"| node_firestore
node_taskdetails -->|"records activity"| node_firestore
node_wallet -->|"opens transfer"| node_sendari
node_sendari -->|"transfers ARI and records activity"| node_firestore

click node_bot "https://github.com/ali-jemo/labpoint-ashurix/blob/master/bot.py"
click node_app "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/App.jsx"
click node_auth "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/context/AuthContext.jsx"
click node_firebase "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/firebase.js"
click node_onboarding "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Onboarding.jsx"
click node_dashboard "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Dashboard.jsx"
click node_wallet "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Wallet.jsx"
click node_profile "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Profile.jsx"
click node_settings "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Settings.jsx"
click node_taskmarket "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/TaskMarket.jsx"
click node_create "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/CreateTask.jsx"
click node_taskdetails "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/components/TaskDetailsModal.jsx"
click node_sendari "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/components/SendAriModal.jsx"
click node_leaderboard "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Leaderboard.jsx"
click node_notifications "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Notifications.jsx"
click node_theme "https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/context/ThemeContext.jsx"

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_bot,node_app toneBlue
class node_onboarding,node_dashboard,node_profile,node_settings,node_leaderboard,node_notifications,node_theme toneAmber
class node_wallet,node_taskmarket,node_create,node_taskdetails,node_sendari toneMint
class node_auth,node_firebase,node_firestore toneRose
class node_student,node_telegram toneIndigo
```

## Components

### App entry

- [Telegram bot](https://github.com/ali-jemo/labpoint-ashurix/blob/master/bot.py): `bot.py`
- [App routes](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`

### Web experience

- [Onboarding](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Onboarding.jsx): `frontend/src/pages/Onboarding.jsx`
- [Dashboard](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Profile](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Profile.jsx): `frontend/src/pages/Profile.jsx`
- [Settings](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Settings.jsx): `frontend/src/pages/Settings.jsx`
- [Leaderboard](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Leaderboard.jsx): `frontend/src/pages/Leaderboard.jsx`
- [Notifications](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Notifications.jsx): `frontend/src/pages/Notifications.jsx`
- [Theme context](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/context/ThemeContext.jsx): `frontend/src/context/ThemeContext.jsx`

### Tasks and ARI

- [Wallet](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/Wallet.jsx): `frontend/src/pages/Wallet.jsx`
- [Task market](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/TaskMarket.jsx): `frontend/src/pages/TaskMarket.jsx`
- [Create task](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/pages/CreateTask.jsx): `frontend/src/pages/CreateTask.jsx`
- [Task actions](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/components/TaskDetailsModal.jsx): `frontend/src/components/TaskDetailsModal.jsx`
- [ARI transfer](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/components/SendAriModal.jsx): `frontend/src/components/SendAriModal.jsx`

### Firebase platform

- [Auth context](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Firebase setup](https://github.com/ali-jemo/labpoint-ashurix/blob/master/frontend/src/firebase.js): `frontend/src/firebase.js`
- **Firestore**

### Other components

- **Student**
- **Telegram**

## Connections

- Student → Telegram: opens bot
- Telegram → Telegram bot: sends commands
- Telegram bot → Telegram: offers app link
- Student → App routes: opens web app
- App routes → Onboarding: routes to
- App routes → Dashboard: routes to
- App routes → Wallet: routes to
- App routes → Profile: routes to
- App routes → Task market: routes to
- App routes → Create task: routes to
- App routes → Leaderboard: routes to
- App routes → Settings: routes to
- App routes → Notifications: routes to
- Onboarding → Auth context: requests login
- Auth context → Firebase setup: uses services
- Firebase setup → Firestore: provides database
- Auth context → Firestore: reads and writes profiles
- Settings → Firestore: updates profile
- Create task → Firestore: creates task and charges balance
- Task market → Task actions: opens task actions
- Task actions → Firestore: updates task and settles reward
- Task actions → Firestore: records activity
- Wallet → ARI transfer: opens transfer
- ARI transfer → Firestore: transfers ARI and records activity
