# deep2812msu2006/student_organization_system architecture

> Architecture diagram of the GitHub repository deep2812msu2006/student_organization_system, 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/deep2812msu2006/student_organization_system
- Repository: https://github.com/deep2812msu2006/student_organization_system

## Overview

This is a student-organization system spanning a React member/staff portal and an Express/PostgreSQL API. The user workflow is to browse, authenticate or enroll, then use event, membership, shop, and organization-management features; the API routes requests into domain services and persistence. The graph preserves the README’s major product areas, including community, finance, inventory, and check-in. Some frontend/API and unsampled domain links are shown only as unverified; sampled source and the README provide the cited relationships.

Main entry points: [`client/src/App.jsx`](https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/App.jsx) (Portal routing), [`server/app.js`](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/app.js) (API route assembly), [`client/src/services/api.js`](https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/services/api.js) (API client), [`server/utils/transaction.js`](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/utils/transaction.js) (Transaction helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Web portal"]
  node_webapp["Portal routing<br/>[App.jsx]"]
  node_search["Search and browse<br/>[SearchPage.jsx]"]
  node_membership_ui["Membership portal<br/>[MembershipPage.jsx]"]
  node_events_ui["Event pages"]
  node_shop_ui["Shop and orders"]
  node_staff_ui["Staff workspace"]
  node_community_ui["Community pages"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_identity["Identity and membership"]
  node_auth_context["Session context<br/>[AuthContext.jsx]"]
  node_auth_controller["Authentication controller<br/>[auth.controller.js]"]
  node_auth_service["Authentication service<br/>[auth.service.js]"]
  node_auth_model[("Account and roles<br/>[auth.model.js]")]
  node_member_routes["Membership routes<br/>[member.routes.js]"]
  node_member_service["Membership service<br/>[member.service.js]"]
  node_member_model[("Member records<br/>[member.model.js]")]
end

subgraph group_activities["Events and community"]
  node_event_routes["Event routes<br/>[event.routes.js]"]
  node_event_service["Event operations<br/>[event.service.js]"]
  node_checkin_routes["Check-in routes<br/>[checkin.routes.js]"]
  node_community_routes["Community routes"]
  node_community_service["Community service"]
  node_community_model[("Community records<br/>[community.model.js]")]
end

subgraph group_commerce["Shop and finance"]
  node_merch_routes["Merchandise routes"]
  node_merch_service["Merchandise service"]
  node_merch_model[("Catalog and orders")]
  node_finance_routes["Finance routes<br/>[finance.routes.js]"]
  node_payment_service["Payment operations<br/>[payment.service.js]"]
  node_payment_model[("Payment records<br/>[payment.model.js]")]
  node_expense_service["Expense operations<br/>[expense.service.js]"]
end

subgraph group_platform["API and persistence"]
  node_server_app["API route assembly<br/>[app.js]"]
  node_database[("PostgreSQL<br/>[db.js]")]
  node_transaction["Transaction helper<br/>[transaction.js]"]
end

node_visitor(("Member or visitor"))

node_visitor -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_search
node_webapp -->|"routes to"| node_membership_ui
node_webapp -->|"routes to"| node_events_ui
node_webapp -->|"routes to"| node_shop_ui
node_webapp -->|"routes to"| node_staff_ui
node_webapp -->|"routes to"| node_community_ui
node_auth_context -->|"calls"| node_api_client
node_webapp -->|"provides"| node_auth_context
node_search -.->|"requests data"| node_api_client
node_membership_ui -.->|"requests data"| node_api_client
node_events_ui -.->|"requests data"| node_api_client
node_shop_ui -.->|"requests data"| node_api_client
node_staff_ui -.->|"requests data"| node_api_client
node_community_ui -.->|"requests data"| node_api_client
node_api_client -.->|"calls API"| node_server_app
node_server_app -->|"mounts"| node_member_routes
node_server_app -->|"mounts"| node_event_routes
node_server_app -->|"mounts"| node_checkin_routes
node_server_app -->|"mounts"| node_community_routes
node_server_app -->|"mounts"| node_merch_routes
node_server_app -->|"mounts"| node_finance_routes
node_auth_controller -->|"calls"| node_auth_service
node_auth_service -->|"calls"| node_auth_model
node_member_routes -->|"calls"| node_member_service
node_member_routes -->|"queries"| node_member_model
node_event_routes -.->|"calls"| node_event_service
node_checkin_routes -->|"calls"| node_payment_service
node_community_routes -->|"calls"| node_community_service
node_community_routes -->|"calls"| node_community_model
node_merch_routes -->|"calls"| node_merch_service
node_merch_routes -->|"queries"| node_payment_model
node_merch_service -->|"calls"| node_merch_model
node_finance_routes -->|"calls"| node_payment_service
node_finance_routes -->|"calls"| node_expense_service
node_payment_service -->|"calls"| node_payment_model
node_auth_service -->|"runs in"| node_transaction
node_payment_service -->|"runs in"| node_transaction
node_member_routes -->|"runs in"| node_transaction
node_community_routes -->|"runs in"| node_transaction
node_merch_routes -->|"runs in"| node_transaction
node_transaction -.->|"uses pool"| node_database

click node_webapp "https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/App.jsx"
click node_search "https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/pages/SearchPage.jsx"
click node_membership_ui "https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/pages/members/MembershipPage.jsx"
click node_events_ui "https://github.com/deep2812msu2006/student_organization_system/tree/main/client/src/pages/events"
click node_shop_ui "https://github.com/deep2812msu2006/student_organization_system/tree/main/client/src/pages/shop"
click node_staff_ui "https://github.com/deep2812msu2006/student_organization_system/tree/main/client/src/pages/staff"
click node_community_ui "https://github.com/deep2812msu2006/student_organization_system/tree/main/client/src/pages/community"
click node_api_client "https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/services/api.js"
click node_auth_context "https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/context/AuthContext.jsx"
click node_auth_controller "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/controllers/auth.controller.js"
click node_auth_service "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/auth.service.js"
click node_auth_model "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/model/auth.model.js"
click node_member_routes "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/member.routes.js"
click node_member_service "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/member.service.js"
click node_member_model "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/model/member.model.js"
click node_event_routes "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/event.routes.js"
click node_event_service "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/event.service.js"
click node_checkin_routes "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/checkin.routes.js"
click node_community_routes "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/community.routes.js"
click node_community_service "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/community.service.js"
click node_community_model "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/model/community.model.js"
click node_merch_routes "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/merchandise.routes.js"
click node_merch_service "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/merchandise.service.js"
click node_merch_model "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/model/merchandise.model.js"
click node_finance_routes "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/finance.routes.js"
click node_payment_service "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/payment.service.js"
click node_payment_model "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/model/payment.model.js"
click node_expense_service "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/expense.service.js"
click node_server_app "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/app.js"
click node_database "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/config/db.js"
click node_transaction "https://github.com/deep2812msu2006/student_organization_system/blob/main/server/utils/transaction.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_webapp,node_search,node_membership_ui,node_events_ui,node_shop_ui,node_staff_ui,node_community_ui,node_api_client toneBlue
class node_auth_context,node_auth_controller,node_auth_service,node_auth_model,node_member_routes,node_member_service,node_member_model toneAmber
class node_event_routes,node_event_service,node_checkin_routes,node_community_routes,node_community_service,node_community_model toneMint
class node_merch_routes,node_merch_service,node_merch_model,node_finance_routes,node_payment_service,node_payment_model,node_expense_service toneRose
class node_server_app,node_database,node_transaction,node_visitor toneIndigo
```

## Components

### Web portal

- [Portal routing](https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Search and browse](https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/pages/SearchPage.jsx): `client/src/pages/SearchPage.jsx`
- [Membership portal](https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/pages/members/MembershipPage.jsx): `client/src/pages/members/MembershipPage.jsx`
- [Event pages](https://github.com/deep2812msu2006/student_organization_system/tree/main/client/src/pages/events): `client/src/pages/events`
- [Shop and orders](https://github.com/deep2812msu2006/student_organization_system/tree/main/client/src/pages/shop): `client/src/pages/shop`
- [Staff workspace](https://github.com/deep2812msu2006/student_organization_system/tree/main/client/src/pages/staff): `client/src/pages/staff`
- [Community pages](https://github.com/deep2812msu2006/student_organization_system/tree/main/client/src/pages/community): `client/src/pages/community`
- [API client](https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/services/api.js): `client/src/services/api.js`

### Identity and membership

- [Session context](https://github.com/deep2812msu2006/student_organization_system/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Authentication controller](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/controllers/auth.controller.js): `server/controllers/auth.controller.js`
- [Authentication service](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/auth.service.js): `server/services/auth.service.js`
- [Account and roles](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/model/auth.model.js): `server/model/auth.model.js`
- [Membership routes](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/member.routes.js): `server/routes/member.routes.js`
- [Membership service](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/member.service.js): `server/services/member.service.js`
- [Member records](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/model/member.model.js): `server/model/member.model.js`

### Events and community

- [Event routes](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/event.routes.js): `server/routes/event.routes.js`
- [Event operations](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/event.service.js): `server/services/event.service.js`
- [Check-in routes](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/checkin.routes.js): `server/routes/checkin.routes.js`
- [Community routes](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/community.routes.js): `server/routes/community.routes.js`
- [Community service](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/community.service.js): `server/services/community.service.js`
- [Community records](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/model/community.model.js): `server/model/community.model.js`

### Shop and finance

- [Merchandise routes](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/merchandise.routes.js): `server/routes/merchandise.routes.js`
- [Merchandise service](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/merchandise.service.js): `server/services/merchandise.service.js`
- [Catalog and orders](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/model/merchandise.model.js): `server/model/merchandise.model.js`
- [Finance routes](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/routes/finance.routes.js): `server/routes/finance.routes.js`
- [Payment operations](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/payment.service.js): `server/services/payment.service.js`
- [Payment records](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/model/payment.model.js): `server/model/payment.model.js`
- [Expense operations](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/services/expense.service.js): `server/services/expense.service.js`

### API and persistence

- [API route assembly](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/app.js): `server/app.js`
- [PostgreSQL](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/config/db.js): `server/config/db.js`
- [Transaction helper](https://github.com/deep2812msu2006/student_organization_system/blob/main/server/utils/transaction.js): `server/utils/transaction.js`

### Other components

- **Member or visitor**

## Connections

- Member or visitor → Portal routing: uses (evidence: `client/src/App.jsx`)
- Portal routing → Search and browse: routes to (evidence: `client/src/App.jsx`)
- Portal routing → Membership portal: routes to (evidence: `client/src/App.jsx`)
- Portal routing → Event pages: routes to (evidence: `client/src/App.jsx`)
- Portal routing → Shop and orders: routes to (evidence: `client/src/App.jsx`)
- Portal routing → Staff workspace: routes to (evidence: `client/src/App.jsx`)
- Portal routing → Community pages: routes to (evidence: `client/src/App.jsx`)
- Session context → API client: calls (evidence: `client/src/context/AuthContext.jsx`)
- Portal routing → Session context: provides (evidence: `client/src/App.jsx`)
- Search and browse → API client: requests data
- Membership portal → API client: requests data
- Event pages → API client: requests data
- Shop and orders → API client: requests data
- Staff workspace → API client: requests data
- Community pages → API client: requests data (evidence: `client/src/pages/community/TasksPage.jsx`)
- API client → API route assembly: calls API
- API route assembly → Membership routes: mounts (evidence: `server/app.js`)
- API route assembly → Event routes: mounts (evidence: `server/app.js`)
- API route assembly → Check-in routes: mounts (evidence: `server/app.js`)
- API route assembly → Community routes: mounts (evidence: `server/app.js`)
- API route assembly → Merchandise routes: mounts (evidence: `server/app.js`)
- API route assembly → Finance routes: mounts (evidence: `server/app.js`)
- Authentication controller → Authentication service: calls (evidence: `server/controllers/auth.controller.js`)
- Authentication service → Account and roles: calls (evidence: `server/services/auth.service.js`)
- Membership routes → Membership service: calls (evidence: `server/routes/member.routes.js`)
- Membership routes → Member records: queries (evidence: `server/routes/member.routes.js`)
- Event routes → Event operations: calls
- Check-in routes → Payment operations: calls (evidence: `server/routes/checkin.routes.js`)
- Community routes → Community service: calls (evidence: `server/routes/community.routes.js`)
- Community routes → Community records: calls (evidence: `server/routes/community.routes.js`)
- Merchandise routes → Merchandise service: calls (evidence: `server/routes/merchandise.routes.js`)
- Merchandise routes → Payment records: queries (evidence: `server/routes/merchandise.routes.js`)
- Merchandise service → Catalog and orders: calls (evidence: `server/services/merchandise.service.js`)
- Finance routes → Payment operations: calls (evidence: `server/routes/finance.routes.js`)
- Finance routes → Expense operations: calls (evidence: `server/routes/finance.routes.js`)
- Payment operations → Payment records: calls (evidence: `server/services/payment.service.js`)
- Authentication service → Transaction helper: runs in (evidence: `server/services/auth.service.js`)
- Payment operations → Transaction helper: runs in (evidence: `server/services/payment.service.js`)
- Membership routes → Transaction helper: runs in (evidence: `server/routes/member.routes.js`)
- Community routes → Transaction helper: runs in (evidence: `server/routes/community.routes.js`)
- Merchandise routes → Transaction helper: runs in (evidence: `server/routes/merchandise.routes.js`)
- Transaction helper → PostgreSQL: uses pool
