# codewithsumit111/pbl_clubsync architecture

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

- Interactive diagram: https://gitdiagram.com/codewithsumit111/pbl_clubsync
- Repository: https://github.com/codewithsumit111/pbl_clubsync

## Overview

Club Management Software provides role-based student, club-lead, and admin workflows for club membership, events, attendance, achievements, logbooks, notices, and reporting. The React app selects views by authentication state and role; the Express API exposes corresponding domain routes, with MongoDB-backed models. The excerpts establish app routing, API route mounting, and authentication persistence, but do not show most view-to-service or route-to-model calls, so those links are omitted rather than inferred.

Main entry points: [`src/app/App.tsx`](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/App.tsx) (App routing), [`backend/src/index.js`](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/index.js) (Express API entry), [`backend/src/routes/auth.js`](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/auth.js) (Authentication routes), [`backend/src/models/Student.js`](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/models/Student.js) (Student records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["App routing<br/>[App.tsx]"]
  node_login["Sign in<br/>[LoginPage.tsx]"]
  node_student["Student workspace"]
  node_clubs["Club directory<br/>[ClubListView.tsx]"]
  node_events["Event attendance"]
  node_history["Attendance history"]
  node_logbook["Activity logbook<br/>[LogbookView.tsx]"]
  node_achievements["Achievements"]
  node_admin["Admin dashboard"]
  node_members["Student management<br/>[AllMembersView.tsx]"]
  node_analytics["CCA analytics<br/>[CCAAnalytics.tsx]"]
  node_clubstudents["Club member management"]
  node_clubcca["Club CCA management"]
  node_reports["Club reports<br/>[ClubReports.tsx]"]
end

subgraph group_state["Client state"]
  node_authstate["Authentication state<br/>[authSlice.ts]"]
  node_clubstate["Club state<br/>[clubSlice.ts]"]
  node_studentstate["Student state<br/>[studentSlice.ts]"]
end

subgraph group_api["API domains"]
  node_authroute["Authentication routes<br/>[auth.js]"]
  node_clubroute["Club routes<br/>[club.js]"]
  node_attendroute["Attendance routes<br/>[attendance.js]"]
  node_eventroute["Event routes<br/>[event.js]"]
  node_logroute["Logbook routes<br/>[logbook.js]"]
  node_achroute["Achievement routes<br/>[achievement.js]"]
  node_studentroute["Student routes<br/>[student.js]"]
  node_noticeroute["Notice routes<br/>[notice.js]"]
  node_uploadroute["Upload routes<br/>[upload.js]"]
  node_adminroute["Admin routes<br/>[admin.js]"]
  node_backend["Express API entry<br/>[index.js]"]
  node_authmw["JWT authentication<br/>[auth.js]"]
end

subgraph group_data["Persistence"]
  node_studentmodel[("Student records<br/>[Student.js]")]
  node_clubmodel[("Club records<br/>[Club.js]")]
  node_adminmodel[("Admin records<br/>[Admin.js]")]
  node_eventmodel[("Event records<br/>[Event.js]")]
end

node_browser(("User"))

node_browser -->|"uses"| node_app
node_app -->|"reads and updates"| node_authstate
node_app -->|"renders"| node_login
node_app -->|"renders"| node_student
node_app -->|"renders"| node_clubs
node_app -->|"renders"| node_events
node_app -->|"renders"| node_history
node_app -->|"renders"| node_logbook
node_app -->|"renders"| node_achievements
node_app -->|"renders"| node_admin
node_app -->|"renders"| node_members
node_app -->|"renders"| node_analytics
node_app -->|"renders"| node_clubstudents
node_app -->|"renders"| node_clubcca
node_app -->|"renders"| node_reports
node_backend -->|"mounts"| node_authroute
node_backend -->|"mounts"| node_clubroute
node_backend -->|"mounts"| node_attendroute
node_backend -->|"mounts"| node_eventroute
node_backend -->|"mounts"| node_logroute
node_backend -->|"mounts"| node_achroute
node_backend -->|"mounts"| node_studentroute
node_backend -->|"mounts"| node_noticeroute
node_backend -->|"mounts"| node_uploadroute
node_backend -->|"mounts"| node_adminroute
node_authroute -->|"protects"| node_authmw
node_authroute -->|"queries"| node_studentmodel
node_authroute -->|"queries"| node_clubmodel
node_authroute -->|"queries"| node_adminmodel
node_backend -->|"connects via"| node_studentmodel

click node_app "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/App.tsx"
click node_login "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/LoginPage.tsx"
click node_student "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/StudentDashboard.tsx"
click node_clubs "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/ClubListView.tsx"
click node_events "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/EventAttendanceView.tsx"
click node_history "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/StudentAttendanceHistoryView.tsx"
click node_logbook "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/LogbookView.tsx"
click node_achievements "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/AchievementView.tsx"
click node_admin "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/DashboardOverview.tsx"
click node_members "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/AllMembersView.tsx"
click node_analytics "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/CCAAnalytics.tsx"
click node_clubstudents "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/club/ClubStudentMgmt.tsx"
click node_clubcca "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/club/ClubCCAManagement.tsx"
click node_reports "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/club/ClubReports.tsx"
click node_authstate "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/features/authSlice.ts"
click node_clubstate "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/features/clubSlice.ts"
click node_studentstate "https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/features/studentSlice.ts"
click node_authroute "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/auth.js"
click node_clubroute "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/club.js"
click node_attendroute "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/attendance.js"
click node_eventroute "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/event.js"
click node_logroute "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/logbook.js"
click node_achroute "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/achievement.js"
click node_studentroute "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/student.js"
click node_noticeroute "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/notice.js"
click node_uploadroute "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/upload.js"
click node_adminroute "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/admin.js"
click node_backend "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/index.js"
click node_authmw "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/middleware/auth.js"
click node_studentmodel "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/models/Student.js"
click node_clubmodel "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/models/Club.js"
click node_adminmodel "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/models/Admin.js"
click node_eventmodel "https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/models/Event.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_login,node_student,node_clubs,node_events,node_history,node_logbook,node_achievements,node_admin,node_members,node_analytics,node_clubstudents,node_clubcca,node_reports,node_browser toneBlue
class node_authstate,node_clubstate,node_studentstate toneAmber
class node_authroute,node_clubroute,node_attendroute,node_eventroute,node_logroute,node_achroute,node_studentroute,node_noticeroute,node_uploadroute,node_adminroute,node_backend,node_authmw toneMint
class node_studentmodel,node_clubmodel,node_adminmodel,node_eventmodel toneRose
```

## Components

### Web application

- [App routing](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Sign in](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/LoginPage.tsx): `src/app/views/LoginPage.tsx`
- [Student workspace](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/StudentDashboard.tsx): `src/app/views/StudentDashboard.tsx`
- [Club directory](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/ClubListView.tsx): `src/app/views/ClubListView.tsx`
- [Event attendance](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/EventAttendanceView.tsx): `src/app/views/EventAttendanceView.tsx`
- [Attendance history](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/StudentAttendanceHistoryView.tsx): `src/app/views/StudentAttendanceHistoryView.tsx`
- [Activity logbook](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/LogbookView.tsx): `src/app/views/LogbookView.tsx`
- [Achievements](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/AchievementView.tsx): `src/app/views/AchievementView.tsx`
- [Admin dashboard](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/DashboardOverview.tsx): `src/app/views/DashboardOverview.tsx`
- [Student management](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/AllMembersView.tsx): `src/app/views/AllMembersView.tsx`
- [CCA analytics](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/CCAAnalytics.tsx): `src/app/views/CCAAnalytics.tsx`
- [Club member management](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/club/ClubStudentMgmt.tsx): `src/app/views/club/ClubStudentMgmt.tsx`
- [Club CCA management](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/club/ClubCCAManagement.tsx): `src/app/views/club/ClubCCAManagement.tsx`
- [Club reports](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/views/club/ClubReports.tsx): `src/app/views/club/ClubReports.tsx`

### Client state

- [Authentication state](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/features/authSlice.ts): `src/app/features/authSlice.ts`
- [Club state](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/features/clubSlice.ts): `src/app/features/clubSlice.ts`
- [Student state](https://github.com/codewithsumit111/pbl_clubsync/blob/main/src/app/features/studentSlice.ts): `src/app/features/studentSlice.ts`

### API domains

- [Authentication routes](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/auth.js): `backend/src/routes/auth.js`
- [Club routes](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/club.js): `backend/src/routes/club.js`
- [Attendance routes](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/attendance.js): `backend/src/routes/attendance.js`
- [Event routes](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/event.js): `backend/src/routes/event.js`
- [Logbook routes](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/logbook.js): `backend/src/routes/logbook.js`
- [Achievement routes](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/achievement.js): `backend/src/routes/achievement.js`
- [Student routes](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/student.js): `backend/src/routes/student.js`
- [Notice routes](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/notice.js): `backend/src/routes/notice.js`
- [Upload routes](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/upload.js): `backend/src/routes/upload.js`
- [Admin routes](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/routes/admin.js): `backend/src/routes/admin.js`
- [Express API entry](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/index.js): `backend/src/index.js`
- [JWT authentication](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/middleware/auth.js): `backend/src/middleware/auth.js`

### Persistence

- [Student records](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/models/Student.js): `backend/src/models/Student.js`
- [Club records](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/models/Club.js): `backend/src/models/Club.js`
- [Admin records](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/models/Admin.js): `backend/src/models/Admin.js`
- [Event records](https://github.com/codewithsumit111/pbl_clubsync/blob/main/backend/src/models/Event.js): `backend/src/models/Event.js`

### Other components

- **User**

## Connections

- User → App routing: uses
- App routing → Authentication state: reads and updates
- App routing → Sign in: renders
- App routing → Student workspace: renders
- App routing → Club directory: renders
- App routing → Event attendance: renders
- App routing → Attendance history: renders
- App routing → Activity logbook: renders
- App routing → Achievements: renders
- App routing → Admin dashboard: renders
- App routing → Student management: renders
- App routing → CCA analytics: renders
- App routing → Club member management: renders
- App routing → Club CCA management: renders
- App routing → Club reports: renders
- Express API entry → Authentication routes: mounts
- Express API entry → Club routes: mounts
- Express API entry → Attendance routes: mounts
- Express API entry → Event routes: mounts
- Express API entry → Logbook routes: mounts
- Express API entry → Achievement routes: mounts
- Express API entry → Student routes: mounts
- Express API entry → Notice routes: mounts
- Express API entry → Upload routes: mounts
- Express API entry → Admin routes: mounts
- Authentication routes → JWT authentication: protects
- Authentication routes → Student records: queries
- Authentication routes → Club records: queries
- Authentication routes → Admin records: queries
- Express API entry → Student records: connects via
