# niranjan123-k/vee-learn architecture

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

- Interactive diagram: https://gitdiagram.com/niranjan123-k/vee-learn
- Repository: https://github.com/niranjan123-k/vee-learn

## Overview

VeeLearn is a peer-to-peer skill-learning and time-banking platform. Users register and complete profiles, discover teachers, book sessions, communicate during learning, transfer credits when sessions are completed, and leave reviews. The React client reaches Spring Boot through REST and WebSockets; backend services implement the domain workflows and persist platform data. The README documents analytics, calendar support, and real-time notifications as additional capabilities. Some frontend pages and backend modules are represented from the file tree and README rather than inspected source, so uncertain internal connections are omitted.

Main entry points: [`client/src/App.jsx`](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/App.jsx) (App routing), [`server-spring/src/main/java/com/veelearn/api/service/SessionService.java`](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/SessionService.java) (Session lifecycle), [`client/src/pages/SessionChatPage.jsx`](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/SessionChatPage.jsx) (Session experience), [`server-spring/src/main/java/com/veelearn/api/service/AuthService.java`](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/AuthService.java) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["App routing<br/>[App.jsx]"]
  node_authstore["Auth state<br/>[authStore.js]"]
  node_api["REST client<br/>[api.js]"]
  node_profileui["Profile and skills<br/>[ProfilePage.jsx]"]
  node_exploreui["Teacher discovery<br/>[ExplorePage.jsx]"]
  node_bookingui["Session booking"]
  node_sessionui["Session experience"]
  node_messagesui["Messages<br/>[MessagesPage.jsx]"]
  node_ledgerui["Credit ledger UI<br/>[LedgerPage.jsx]"]
end

subgraph group_identity["Identity and profiles"]
  node_authsvc["Authentication<br/>[AuthService.java]"]
  node_usersvc["User profiles<br/>[UserService.java]"]
end

subgraph group_learning["Learning exchange"]
  node_skillmatch["Skills and matching"]
  node_sessionsvc["Session lifecycle"]
  node_reviews["Reviews<br/>[ReviewService.java]"]
end

subgraph group_platform["Platform services"]
  node_ledger["Credit ledger"]
  node_analytics["Learning analytics"]
  node_calendar["Calendar integration"]
  node_realtime["Realtime messaging"]
end

subgraph group_data["Persistence"]
  node_postgres[("PostgreSQL")]
end

node_learner(("Platform user"))

node_learner -->|"uses"| node_app
node_app -->|"loads auth"| node_authstore
node_authstore -->|"sends requests"| node_api
node_app -->|"routes to"| node_profileui
node_app -->|"routes to"| node_exploreui
node_app -->|"routes to"| node_bookingui
node_app -->|"routes to"| node_sessionui
node_app -->|"routes to"| node_messagesui
node_app -->|"routes to"| node_ledgerui
node_api -->|"REST requests"| node_authsvc
node_authsvc -->|"initializes credits"| node_ledger
node_exploreui -.->|"finds teachers"| node_skillmatch
node_bookingui -.->|"books sessions"| node_sessionsvc
node_sessionsvc -->|"escrows credits"| node_ledger
node_sessionsvc -->|"uses calendar"| node_calendar
node_sessionsvc -->|"sends events"| node_realtime
node_sessionui -->|"WebSocket chat"| node_realtime
node_sessionui -.->|"session actions"| node_sessionsvc
node_reviews -.->|"reads and writes"| node_postgres
node_sessionsvc -.->|"reads and writes"| node_postgres
node_ledger -.->|"records transactions"| node_postgres
node_usersvc -.->|"reads and writes"| node_postgres
node_authsvc -.->|"reads and writes"| node_postgres
node_app -.->|"shows analytics"| node_analytics
node_sessionui -.->|"submits review"| node_reviews

click node_app "https://github.com/niranjan123-k/vee-learn/blob/main/client/src/App.jsx"
click node_authstore "https://github.com/niranjan123-k/vee-learn/blob/main/client/src/stores/authStore.js"
click node_api "https://github.com/niranjan123-k/vee-learn/blob/main/client/src/utils/api.js"
click node_profileui "https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/ProfilePage.jsx"
click node_exploreui "https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/ExplorePage.jsx"
click node_bookingui "https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/BookSessionPage.jsx"
click node_sessionui "https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/SessionChatPage.jsx"
click node_messagesui "https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/MessagesPage.jsx"
click node_ledgerui "https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/LedgerPage.jsx"
click node_authsvc "https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/AuthService.java"
click node_usersvc "https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/UserService.java"
click node_skillmatch "https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/MatchingService.java"
click node_sessionsvc "https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/SessionService.java"
click node_reviews "https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/ReviewService.java"
click node_ledger "https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/CreditLedgerService.java"
click node_analytics "https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/AnalyticsService.java"
click node_calendar "https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/GoogleCalendarService.java"
click node_realtime "https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/websocket/SocketIOService.java"

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,node_authstore,node_api,node_profileui,node_exploreui,node_bookingui,node_sessionui,node_messagesui,node_ledgerui,node_learner toneBlue
class node_authsvc,node_usersvc toneAmber
class node_skillmatch,node_sessionsvc,node_reviews toneMint
class node_ledger,node_analytics,node_calendar,node_realtime toneRose
class node_postgres toneIndigo
```

## Components

### Web client

- [App routing](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Auth state](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/stores/authStore.js): `client/src/stores/authStore.js`
- [REST client](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/utils/api.js): `client/src/utils/api.js`
- [Profile and skills](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/ProfilePage.jsx): `client/src/pages/ProfilePage.jsx`
- [Teacher discovery](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/ExplorePage.jsx): `client/src/pages/ExplorePage.jsx`
- [Session booking](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/BookSessionPage.jsx): `client/src/pages/BookSessionPage.jsx`
- [Session experience](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/SessionChatPage.jsx): `client/src/pages/SessionChatPage.jsx`
- [Messages](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/MessagesPage.jsx): `client/src/pages/MessagesPage.jsx`
- [Credit ledger UI](https://github.com/niranjan123-k/vee-learn/blob/main/client/src/pages/LedgerPage.jsx): `client/src/pages/LedgerPage.jsx`

### Identity and profiles

- [Authentication](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/AuthService.java): `server-spring/src/main/java/com/veelearn/api/service/AuthService.java`
- [User profiles](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/UserService.java): `server-spring/src/main/java/com/veelearn/api/service/UserService.java`

### Learning exchange

- [Skills and matching](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/MatchingService.java): `server-spring/src/main/java/com/veelearn/api/service/MatchingService.java`
- [Session lifecycle](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/SessionService.java): `server-spring/src/main/java/com/veelearn/api/service/SessionService.java`
- [Reviews](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/ReviewService.java): `server-spring/src/main/java/com/veelearn/api/service/ReviewService.java`

### Platform services

- [Credit ledger](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/CreditLedgerService.java): `server-spring/src/main/java/com/veelearn/api/service/CreditLedgerService.java`
- [Learning analytics](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/AnalyticsService.java): `server-spring/src/main/java/com/veelearn/api/service/AnalyticsService.java`
- [Calendar integration](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/service/GoogleCalendarService.java): `server-spring/src/main/java/com/veelearn/api/service/GoogleCalendarService.java`
- [Realtime messaging](https://github.com/niranjan123-k/vee-learn/blob/main/server-spring/src/main/java/com/veelearn/api/websocket/SocketIOService.java): `server-spring/src/main/java/com/veelearn/api/websocket/SocketIOService.java`

### Persistence

- **PostgreSQL**

### Other components

- **Platform user**

## Connections

- Platform user → App routing: uses (evidence: `README.md`)
- App routing → Auth state: loads auth (evidence: `client/src/App.jsx`)
- Auth state → REST client: sends requests (evidence: `client/src/stores/authStore.js`)
- App routing → Profile and skills: routes to (evidence: `client/src/App.jsx`)
- App routing → Teacher discovery: routes to (evidence: `client/src/App.jsx`)
- App routing → Session booking: routes to (evidence: `client/src/App.jsx`)
- App routing → Session experience: routes to (evidence: `client/src/App.jsx`)
- App routing → Messages: routes to (evidence: `client/src/App.jsx`)
- App routing → Credit ledger UI: routes to (evidence: `client/src/App.jsx`)
- REST client → Authentication: REST requests (evidence: `README.md`)
- Authentication → Credit ledger: initializes credits (evidence: `server-spring/src/main/java/com/veelearn/api/service/AuthService.java`)
- Teacher discovery → Skills and matching: finds teachers
- Session booking → Session lifecycle: books sessions
- Session lifecycle → Credit ledger: escrows credits (evidence: `server-spring/src/main/java/com/veelearn/api/service/SessionService.java`)
- Session lifecycle → Calendar integration: uses calendar (evidence: `server-spring/src/main/java/com/veelearn/api/service/SessionService.java`)
- Session lifecycle → Realtime messaging: sends events (evidence: `server-spring/src/main/java/com/veelearn/api/service/SessionService.java`)
- Session experience → Realtime messaging: WebSocket chat (evidence: `README.md`)
- Session experience → Session lifecycle: session actions
- Reviews → PostgreSQL: reads and writes
- Session lifecycle → PostgreSQL: reads and writes
- Credit ledger → PostgreSQL: records transactions
- User profiles → PostgreSQL: reads and writes
- Authentication → PostgreSQL: reads and writes
- App routing → Learning analytics: shows analytics
- Session experience → Reviews: submits review
