# yugeshramesh/skillsync-ai architecture

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

- Interactive diagram: https://gitdiagram.com/yugeshramesh/skillsync-ai
- Repository: https://github.com/yugeshramesh/skillsync-ai

## Overview

SkillSync is a peer-learning app for students to find study partners, connect, chat, schedule sessions, and track learning progress. The main workflow runs from account/profile setup through matching and connection, then chat and session activity that updates progress. The graph separates the React client, HTTP backend, learning-domain operations, and persistence/realtime layers. The README is only a Vite template and documents no product capabilities; several routes and screens are represented from the tree and source index, while unshown internal wiring is omitted or marked unverified.

Main entry points: [`backend/server.js`](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/server.js) (HTTP and socket server), [`src/App.jsx`](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/App.jsx) (Route application), [`backend/controllers/sessionController.js`](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/sessionController.js) (Session lifecycle), [`src/services/api.js`](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/services/api.js) (HTTP API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["Route application<br/>[App.jsx]"]
  node_authui["Sign-in and registration<br/>[Auth.jsx]"]
  node_profileui["Profile editing<br/>[Profile.jsx]"]
  node_dashboard["Learning dashboard<br/>[Dashboard.jsx]"]
  node_matchesui["Match discovery<br/>[TopMatches.jsx]"]
  node_matchui["Match detail<br/>[Match.jsx]"]
  node_connectedui["Connections and progress<br/>[Connected.jsx]"]
  node_chatui["Chat experience<br/>[ChatWindow.jsx]"]
  node_shell["Authenticated app shell<br/>[AppShell.jsx]"]
  node_api["HTTP API client<br/>[api.js]"]
  node_socketclient["Socket client<br/>[socket.js]"]
end

subgraph group_http["Backend HTTP"]
  node_server["HTTP and socket server<br/>[server.js]"]
  node_authroutes["Authentication routes<br/>[auth.js]"]
  node_profileroutes["Profile routes<br/>[profile.js]"]
  node_matchroutes["Match routes<br/>[match.js]"]
  node_chatroutes["Chat routes<br/>[chat.js]"]
  node_airoutes["AI routes<br/>[ai.js]"]
  node_sessionroutes["Session routes<br/>[sessions.js]"]
  node_connectionroutes["Connection routes<br/>[connections.js]"]
end

subgraph group_learning["Learning domain"]
  node_authlogic["Authentication operations<br/>[authController.js]"]
  node_profilelogic["Profile operations"]
  node_matchlogic["Matching operations<br/>[matchController.js]"]
  node_chatlogic["Chat operations<br/>[chatController.js]"]
  node_ailogic["AI chat operations<br/>[aiController.js]"]
  node_sessionlogic["Session lifecycle"]
  node_connectionlogic["Connection progress"]
end

subgraph group_runtime["Data and realtime"]
  node_users[("User records<br/>[User.js]")]
  node_sessions[("Session records<br/>[Session.js]")]
  node_connections[("Connection records<br/>[Connection.js]")]
  node_messages[("Message records<br/>[Message.js]")]
  node_db[("Database connection<br/>[db.js]")]
  node_socketmanager["Socket event dispatch<br/>[socketManager.js]"]
  node_socketio["Socket.IO setup<br/>[index.js]"]
end

node_student(("Student"))

node_student -->|"uses"| node_app
node_app -->|"routes to"| node_authui
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_profileui
node_app -->|"routes to"| node_matchesui
node_app -->|"routes to"| node_matchui
node_app -->|"routes to"| node_chatui
node_app -->|"routes to"| node_connectedui
node_authui -->|"calls"| node_api
node_profileui -->|"calls"| node_api
node_dashboard -->|"calls"| node_api
node_connectedui -->|"calls"| node_api
node_chatui -->|"calls"| node_api
node_chatui -->|"uses"| node_socketclient
node_shell -->|"connects"| node_socketclient
node_api -.->|"requests API"| node_server
node_socketclient -.->|"connects"| node_socketio
node_server -->|"connects"| node_db
node_server -->|"initializes"| node_socketio
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_profileroutes
node_server -->|"mounts"| node_matchroutes
node_server -->|"mounts"| node_chatroutes
node_server -->|"mounts"| node_airoutes
node_server -->|"mounts"| node_sessionroutes
node_server -->|"mounts"| node_connectionroutes
node_authroutes -->|"dispatches"| node_authlogic
node_profileroutes -->|"dispatches"| node_profilelogic
node_matchroutes -->|"dispatches"| node_matchlogic
node_chatroutes -->|"dispatches"| node_chatlogic
node_airoutes -->|"dispatches"| node_ailogic
node_sessionroutes -->|"dispatches"| node_sessionlogic
node_connectionroutes -->|"dispatches"| node_connectionlogic
node_authlogic -->|"reads and writes"| node_users
node_profilelogic -->|"reads and writes"| node_users
node_matchlogic -->|"reads"| node_users
node_chatlogic -->|"reads and writes"| node_messages
node_chatlogic -->|"reads"| node_users
node_chatlogic -->|"dispatches"| node_socketmanager
node_sessionlogic -->|"reads and writes"| node_sessions
node_sessionlogic -->|"updates"| node_connections
node_sessionlogic -->|"reads"| node_users
node_sessionlogic -->|"calls"| node_connectionlogic
node_sessionlogic -->|"dispatches"| node_socketmanager
node_connectionlogic -->|"reads and writes"| node_connections
node_connectionlogic -->|"reads"| node_sessions
node_connectionlogic -->|"reads"| node_users
node_socketio -->|"configures"| node_socketmanager

click node_app "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/App.jsx"
click node_authui "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/Auth.jsx"
click node_profileui "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/Profile.jsx"
click node_dashboard "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/Dashboard.jsx"
click node_matchesui "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/TopMatches.jsx"
click node_matchui "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/Match.jsx"
click node_connectedui "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/Connected.jsx"
click node_chatui "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/components/chat/ChatWindow.jsx"
click node_shell "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/components/layout/AppShell.jsx"
click node_api "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/services/api.js"
click node_socketclient "https://github.com/yugeshramesh/skillsync-ai/blob/main/src/services/socket.js"
click node_server "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/server.js"
click node_authroutes "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/auth.js"
click node_profileroutes "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/profile.js"
click node_matchroutes "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/match.js"
click node_chatroutes "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/chat.js"
click node_airoutes "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/ai.js"
click node_sessionroutes "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/sessions.js"
click node_connectionroutes "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/connections.js"
click node_authlogic "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/authController.js"
click node_profilelogic "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/profileController.js"
click node_matchlogic "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/matchController.js"
click node_chatlogic "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/chatController.js"
click node_ailogic "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/aiController.js"
click node_sessionlogic "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/sessionController.js"
click node_connectionlogic "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/connectionController.js"
click node_users "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/models/User.js"
click node_sessions "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/models/Session.js"
click node_connections "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/models/Connection.js"
click node_messages "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/models/Message.js"
click node_db "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/config/db.js"
click node_socketmanager "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/sockets/socketManager.js"
click node_socketio "https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/sockets/index.js"

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_authui,node_profileui,node_dashboard,node_matchesui,node_matchui,node_connectedui,node_chatui,node_shell,node_api,node_socketclient toneBlue
class node_server,node_authroutes,node_profileroutes,node_matchroutes,node_chatroutes,node_airoutes,node_sessionroutes,node_connectionroutes toneAmber
class node_authlogic,node_profilelogic,node_matchlogic,node_chatlogic,node_ailogic,node_sessionlogic,node_connectionlogic toneMint
class node_users,node_sessions,node_connections,node_messages,node_db,node_socketmanager,node_socketio toneRose
class node_student toneIndigo
```

## Components

### React client

- [Route application](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/App.jsx): `src/App.jsx`
- [Sign-in and registration](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/Auth.jsx): `src/pages/Auth.jsx`
- [Profile editing](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/Profile.jsx): `src/pages/Profile.jsx`
- [Learning dashboard](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`
- [Match discovery](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/TopMatches.jsx): `src/pages/TopMatches.jsx`
- [Match detail](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/Match.jsx): `src/pages/Match.jsx`
- [Connections and progress](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/pages/Connected.jsx): `src/pages/Connected.jsx`
- [Chat experience](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/components/chat/ChatWindow.jsx): `src/components/chat/ChatWindow.jsx`
- [Authenticated app shell](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/components/layout/AppShell.jsx): `src/components/layout/AppShell.jsx`
- [HTTP API client](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/services/api.js): `src/services/api.js`
- [Socket client](https://github.com/yugeshramesh/skillsync-ai/blob/main/src/services/socket.js): `src/services/socket.js`

### Backend HTTP

- [HTTP and socket server](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/server.js): `backend/server.js`
- [Authentication routes](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [Profile routes](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/profile.js): `backend/routes/profile.js`
- [Match routes](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/match.js): `backend/routes/match.js`
- [Chat routes](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/chat.js): `backend/routes/chat.js`
- [AI routes](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/ai.js): `backend/routes/ai.js`
- [Session routes](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/sessions.js): `backend/routes/sessions.js`
- [Connection routes](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/routes/connections.js): `backend/routes/connections.js`

### Learning domain

- [Authentication operations](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Profile operations](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/profileController.js): `backend/controllers/profileController.js`
- [Matching operations](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/matchController.js): `backend/controllers/matchController.js`
- [Chat operations](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/chatController.js): `backend/controllers/chatController.js`
- [AI chat operations](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/aiController.js): `backend/controllers/aiController.js`
- [Session lifecycle](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/sessionController.js): `backend/controllers/sessionController.js`
- [Connection progress](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/controllers/connectionController.js): `backend/controllers/connectionController.js`

### Data and realtime

- [User records](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/models/User.js): `backend/models/User.js`
- [Session records](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/models/Session.js): `backend/models/Session.js`
- [Connection records](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/models/Connection.js): `backend/models/Connection.js`
- [Message records](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/models/Message.js): `backend/models/Message.js`
- [Database connection](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/config/db.js): `backend/config/db.js`
- [Socket event dispatch](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/sockets/socketManager.js): `backend/sockets/socketManager.js`
- [Socket.IO setup](https://github.com/yugeshramesh/skillsync-ai/blob/main/backend/sockets/index.js): `backend/sockets/index.js`

### Other components

- **Student**

## Connections

- Student → Route application: uses
- Route application → Sign-in and registration: routes to (evidence: `src/App.jsx`)
- Route application → Learning dashboard: routes to (evidence: `src/App.jsx`)
- Route application → Profile editing: routes to (evidence: `src/App.jsx`)
- Route application → Match discovery: routes to (evidence: `src/App.jsx`)
- Route application → Match detail: routes to (evidence: `src/App.jsx`)
- Route application → Chat experience: routes to (evidence: `src/App.jsx`)
- Route application → Connections and progress: routes to (evidence: `src/App.jsx`)
- Sign-in and registration → HTTP API client: calls (evidence: `src/pages/Auth.jsx`)
- Profile editing → HTTP API client: calls (evidence: `src/pages/Profile.jsx`)
- Learning dashboard → HTTP API client: calls (evidence: `src/pages/Dashboard.jsx`)
- Connections and progress → HTTP API client: calls (evidence: `src/pages/Connected.jsx`)
- Chat experience → HTTP API client: calls (evidence: `src/components/chat/ChatWindow.jsx`)
- Chat experience → Socket client: uses (evidence: `src/components/chat/ChatWindow.jsx`)
- Authenticated app shell → Socket client: connects (evidence: `src/components/layout/AppShell.jsx`)
- HTTP API client → HTTP and socket server: requests API
- Socket client → Socket.IO setup: connects
- HTTP and socket server → Database connection: connects (evidence: `backend/server.js`)
- HTTP and socket server → Socket.IO setup: initializes (evidence: `backend/server.js`)
- HTTP and socket server → Authentication routes: mounts (evidence: `backend/server.js`)
- HTTP and socket server → Profile routes: mounts (evidence: `backend/server.js`)
- HTTP and socket server → Match routes: mounts (evidence: `backend/server.js`)
- HTTP and socket server → Chat routes: mounts (evidence: `backend/server.js`)
- HTTP and socket server → AI routes: mounts (evidence: `backend/server.js`)
- HTTP and socket server → Session routes: mounts (evidence: `backend/server.js`)
- HTTP and socket server → Connection routes: mounts (evidence: `backend/server.js`)
- Authentication routes → Authentication operations: dispatches (evidence: `backend/routes/auth.js`)
- Profile routes → Profile operations: dispatches (evidence: `backend/routes/profile.js`)
- Match routes → Matching operations: dispatches
- Chat routes → Chat operations: dispatches (evidence: `backend/routes/chat.js`)
- AI routes → AI chat operations: dispatches (evidence: `backend/routes/ai.js`)
- Session routes → Session lifecycle: dispatches (evidence: `backend/routes/sessions.js`)
- Connection routes → Connection progress: dispatches (evidence: `backend/routes/connections.js`)
- Authentication operations → User records: reads and writes (evidence: `backend/controllers/authController.js`)
- Profile operations → User records: reads and writes (evidence: `backend/controllers/profileController.js`)
- Matching operations → User records: reads (evidence: `backend/controllers/matchController.js`)
- Chat operations → Message records: reads and writes (evidence: `backend/controllers/chatController.js`)
- Chat operations → User records: reads (evidence: `backend/controllers/chatController.js`)
- Chat operations → Socket event dispatch: dispatches (evidence: `backend/controllers/chatController.js`)
- Session lifecycle → Session records: reads and writes (evidence: `backend/controllers/sessionController.js`)
- Session lifecycle → Connection records: updates (evidence: `backend/controllers/sessionController.js`)
- Session lifecycle → User records: reads (evidence: `backend/controllers/sessionController.js`)
- Session lifecycle → Connection progress: calls (evidence: `backend/controllers/sessionController.js`)
- Session lifecycle → Socket event dispatch: dispatches (evidence: `backend/controllers/sessionController.js`)
- Connection progress → Connection records: reads and writes (evidence: `backend/controllers/connectionController.js`)
- Connection progress → Session records: reads (evidence: `backend/controllers/connectionController.js`)
- Connection progress → User records: reads (evidence: `backend/controllers/connectionController.js`)
- Socket.IO setup → Socket event dispatch: configures (evidence: `backend/sockets/index.js`)
