# abishagj/careconnect architecture

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

- Interactive diagram: https://gitdiagram.com/abishagj/careconnect
- Repository: https://github.com/abishagj/careconnect

## Overview

CareConnect connects the public and NGO teams through a React client and Express API: people discover organizations, contribute or request support, and follow their activity; NGO admins manage programs and incoming requests, while platform admins oversee NGOs. MongoDB-backed feature controllers handle the domain workflows, with shared authentication, uploads, email, and real-time notifications. The README documents several capabilities whose implementation was not sampled; those branches are represented at their listed page or controller paths, with documented relationships cited to the README.

Main entry points: [`backend/controllers/helpRequestController.js`](https://github.com/abishagj/careconnect/blob/main/backend/controllers/helpRequestController.js) (Helpify requests), [`backend/controllers/celebrationController.js`](https://github.com/abishagj/careconnect/blob/main/backend/controllers/celebrationController.js) (Celebrations), [`frontend/src/pages/NGOPortal.jsx`](https://github.com/abishagj/careconnect/blob/main/frontend/src/pages/NGOPortal.jsx) (NGO admin portal), [`backend/server.js`](https://github.com/abishagj/careconnect/blob/main/backend/server.js) (API routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User experience"]
  node_webapp["Web application<br/>[App.jsx]"]
  node_ngo_discovery["NGO discovery<br/>[useNGOs.js]"]
  node_ngo_profile["NGO profile<br/>[NGOProfile.jsx]"]
  node_my_activity["My Activity"]
end

subgraph group_engagement["Community participation"]
  node_helpify["Helpify requests"]
  node_nlp["Category matching<br/>[nlpMatch.js]"]
  node_celebrations["Celebrations"]
  node_donations["Donations"]
  node_volunteering["Volunteering"]
  node_events["Events<br/>[eventController.js]"]
  node_internships["Internships"]
  node_community["Community posts<br/>[postController.js]"]
end

subgraph group_operations["NGO operations"]
  node_ngo_admin["NGO admin portal<br/>[NGOPortal.jsx]"]
  node_program_management["Program management"]
  node_platform_admin["Platform administration<br/>[adminController.js]"]
end

subgraph group_platform["Platform services"]
  node_auth["Authentication and roles<br/>[auth.js]"]
  node_uploads["File storage<br/>[fileStorage.js]"]
  node_notifications["Notifications<br/>[notifications.js]"]
  node_api["API routing<br/>[server.js]"]
  node_socket["Socket.IO delivery<br/>[socket.js]"]
end

subgraph group_data["Persistence and delivery"]
  node_mongo[("MongoDB<br/>[db.js]")]
  node_ngo_records[("NGO records<br/>[NGO.js]")]
  node_help_records[("Help request records<br/>[HelpRequest.js]")]
  node_celebration_records[("Celebration records<br/>[Celebration.js]")]
  node_user_records[("User records<br/>[User.js]")]
end

node_people(("Users and admins"))
node_cloudinary["Cloudinary"]

node_people -->|"use"| node_webapp
node_webapp -.->|"offers search"| node_ngo_discovery
node_people -->|"find NGOs"| node_ngo_discovery
node_ngo_discovery -->|"explore"| node_ngo_profile
node_ngo_profile -->|"donate"| node_donations
node_ngo_profile -->|"volunteer"| node_volunteering
node_people -->|"submit request"| node_helpify
node_helpify -->|"classifies text"| node_nlp
node_helpify -->|"creates and updates"| node_help_records
node_people -->|"request celebration"| node_celebrations
node_celebrations -->|"creates and updates"| node_celebration_records
node_people -->|"register"| node_events
node_people -->|"apply"| node_internships
node_people -->|"view updates"| node_community
node_people -->|"donate"| node_donations
node_ngo_admin -->|"reviews requests"| node_helpify
node_ngo_admin -->|"reviews requests"| node_celebrations
node_ngo_admin -->|"manage programs"| node_program_management
node_program_management -->|"manages"| node_events
node_program_management -->|"manages"| node_internships
node_ngo_admin -->|"publishes updates"| node_community
node_people -->|"administers platform"| node_platform_admin
node_api -->|"routes NGO requests"| node_ngo_records
node_api -->|"initializes"| node_socket
node_auth -->|"loads user"| node_user_records
node_helpify -->|"stores attachments"| node_uploads
node_celebrations -->|"stores attachment"| node_uploads
node_uploads -->|"uploads when enabled"| node_cloudinary
node_helpify -->|"notifies participants"| node_notifications
node_celebrations -->|"notifies participants"| node_notifications
node_notifications -->|"pushes events"| node_socket
node_celebrations -->|"reads NGO"| node_ngo_records
node_helpify -->|"matches NGOs"| node_ngo_records
node_api -->|"connects"| node_mongo

click node_webapp "https://github.com/abishagj/careconnect/blob/main/frontend/src/App.jsx"
click node_ngo_discovery "https://github.com/abishagj/careconnect/blob/main/frontend/src/hooks/useNGOs.js"
click node_ngo_profile "https://github.com/abishagj/careconnect/blob/main/frontend/src/pages/NGOProfile.jsx"
click node_my_activity "https://github.com/abishagj/careconnect/blob/main/frontend/src/pages/ImpactDashboard.jsx"
click node_helpify "https://github.com/abishagj/careconnect/blob/main/backend/controllers/helpRequestController.js"
click node_nlp "https://github.com/abishagj/careconnect/blob/main/backend/utils/nlpMatch.js"
click node_celebrations "https://github.com/abishagj/careconnect/blob/main/backend/controllers/celebrationController.js"
click node_donations "https://github.com/abishagj/careconnect/blob/main/backend/controllers/donationController.js"
click node_volunteering "https://github.com/abishagj/careconnect/blob/main/backend/controllers/volunteerController.js"
click node_events "https://github.com/abishagj/careconnect/blob/main/backend/controllers/eventController.js"
click node_internships "https://github.com/abishagj/careconnect/blob/main/backend/controllers/internshipController.js"
click node_community "https://github.com/abishagj/careconnect/blob/main/backend/controllers/postController.js"
click node_ngo_admin "https://github.com/abishagj/careconnect/blob/main/frontend/src/pages/NGOPortal.jsx"
click node_program_management "https://github.com/abishagj/careconnect/blob/main/frontend/src/pages/EventsInternshipsManagement.jsx"
click node_platform_admin "https://github.com/abishagj/careconnect/blob/main/backend/controllers/adminController.js"
click node_auth "https://github.com/abishagj/careconnect/blob/main/backend/middleware/auth.js"
click node_uploads "https://github.com/abishagj/careconnect/blob/main/backend/utils/fileStorage.js"
click node_notifications "https://github.com/abishagj/careconnect/blob/main/backend/utils/notifications.js"
click node_api "https://github.com/abishagj/careconnect/blob/main/backend/server.js"
click node_mongo "https://github.com/abishagj/careconnect/blob/main/backend/config/db.js"
click node_ngo_records "https://github.com/abishagj/careconnect/blob/main/backend/models/NGO.js"
click node_help_records "https://github.com/abishagj/careconnect/blob/main/backend/models/HelpRequest.js"
click node_celebration_records "https://github.com/abishagj/careconnect/blob/main/backend/models/Celebration.js"
click node_user_records "https://github.com/abishagj/careconnect/blob/main/backend/models/User.js"
click node_socket "https://github.com/abishagj/careconnect/blob/main/backend/utils/socket.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_ngo_discovery,node_ngo_profile,node_my_activity,node_people toneBlue
class node_helpify,node_nlp,node_celebrations,node_donations,node_volunteering,node_events,node_internships,node_community toneAmber
class node_ngo_admin,node_program_management,node_platform_admin toneMint
class node_auth,node_uploads,node_notifications,node_api,node_socket toneRose
class node_mongo,node_ngo_records,node_help_records,node_celebration_records,node_user_records,node_cloudinary toneIndigo
```

## Components

### User experience

- [Web application](https://github.com/abishagj/careconnect/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [NGO discovery](https://github.com/abishagj/careconnect/blob/main/frontend/src/hooks/useNGOs.js): `frontend/src/hooks/useNGOs.js`
- [NGO profile](https://github.com/abishagj/careconnect/blob/main/frontend/src/pages/NGOProfile.jsx): `frontend/src/pages/NGOProfile.jsx`
- [My Activity](https://github.com/abishagj/careconnect/blob/main/frontend/src/pages/ImpactDashboard.jsx): `frontend/src/pages/ImpactDashboard.jsx`

### Community participation

- [Helpify requests](https://github.com/abishagj/careconnect/blob/main/backend/controllers/helpRequestController.js): `backend/controllers/helpRequestController.js`
- [Category matching](https://github.com/abishagj/careconnect/blob/main/backend/utils/nlpMatch.js): `backend/utils/nlpMatch.js`
- [Celebrations](https://github.com/abishagj/careconnect/blob/main/backend/controllers/celebrationController.js): `backend/controllers/celebrationController.js`
- [Donations](https://github.com/abishagj/careconnect/blob/main/backend/controllers/donationController.js): `backend/controllers/donationController.js`
- [Volunteering](https://github.com/abishagj/careconnect/blob/main/backend/controllers/volunteerController.js): `backend/controllers/volunteerController.js`
- [Events](https://github.com/abishagj/careconnect/blob/main/backend/controllers/eventController.js): `backend/controllers/eventController.js`
- [Internships](https://github.com/abishagj/careconnect/blob/main/backend/controllers/internshipController.js): `backend/controllers/internshipController.js`
- [Community posts](https://github.com/abishagj/careconnect/blob/main/backend/controllers/postController.js): `backend/controllers/postController.js`

### NGO operations

- [NGO admin portal](https://github.com/abishagj/careconnect/blob/main/frontend/src/pages/NGOPortal.jsx): `frontend/src/pages/NGOPortal.jsx`
- [Program management](https://github.com/abishagj/careconnect/blob/main/frontend/src/pages/EventsInternshipsManagement.jsx): `frontend/src/pages/EventsInternshipsManagement.jsx`
- [Platform administration](https://github.com/abishagj/careconnect/blob/main/backend/controllers/adminController.js): `backend/controllers/adminController.js`

### Platform services

- [Authentication and roles](https://github.com/abishagj/careconnect/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`
- [File storage](https://github.com/abishagj/careconnect/blob/main/backend/utils/fileStorage.js): `backend/utils/fileStorage.js`
- [Notifications](https://github.com/abishagj/careconnect/blob/main/backend/utils/notifications.js): `backend/utils/notifications.js`
- [API routing](https://github.com/abishagj/careconnect/blob/main/backend/server.js): `backend/server.js`
- [Socket.IO delivery](https://github.com/abishagj/careconnect/blob/main/backend/utils/socket.js): `backend/utils/socket.js`

### Persistence and delivery

- [MongoDB](https://github.com/abishagj/careconnect/blob/main/backend/config/db.js): `backend/config/db.js`
- [NGO records](https://github.com/abishagj/careconnect/blob/main/backend/models/NGO.js): `backend/models/NGO.js`
- [Help request records](https://github.com/abishagj/careconnect/blob/main/backend/models/HelpRequest.js): `backend/models/HelpRequest.js`
- [Celebration records](https://github.com/abishagj/careconnect/blob/main/backend/models/Celebration.js): `backend/models/Celebration.js`
- [User records](https://github.com/abishagj/careconnect/blob/main/backend/models/User.js): `backend/models/User.js`

### Other components

- **Users and admins**
- **Cloudinary**

## Connections

- Users and admins → Web application: use
- Web application → NGO discovery: offers search
- Users and admins → NGO discovery: find NGOs
- NGO discovery → NGO profile: explore
- NGO profile → Donations: donate
- NGO profile → Volunteering: volunteer
- Users and admins → Helpify requests: submit request
- Helpify requests → Category matching: classifies text (evidence: `backend/controllers/helpRequestController.js`)
- Helpify requests → Help request records: creates and updates (evidence: `backend/controllers/helpRequestController.js`)
- Users and admins → Celebrations: request celebration
- Celebrations → Celebration records: creates and updates (evidence: `backend/controllers/celebrationController.js`)
- Users and admins → Events: register
- Users and admins → Internships: apply
- Users and admins → Community posts: view updates
- Users and admins → Donations: donate
- NGO admin portal → Helpify requests: reviews requests
- NGO admin portal → Celebrations: reviews requests
- NGO admin portal → Program management: manage programs
- Program management → Events: manages
- Program management → Internships: manages
- NGO admin portal → Community posts: publishes updates
- Users and admins → Platform administration: administers platform
- API routing → NGO records: routes NGO requests (evidence: `backend/server.js`)
- API routing → Socket.IO delivery: initializes (evidence: `backend/server.js`)
- Authentication and roles → User records: loads user (evidence: `backend/middleware/auth.js`)
- Helpify requests → File storage: stores attachments (evidence: `backend/controllers/helpRequestController.js`)
- Celebrations → File storage: stores attachment (evidence: `backend/controllers/celebrationController.js`)
- File storage → Cloudinary: uploads when enabled (evidence: `backend/utils/fileStorage.js`)
- Helpify requests → Notifications: notifies participants (evidence: `backend/controllers/helpRequestController.js`)
- Celebrations → Notifications: notifies participants (evidence: `backend/controllers/celebrationController.js`)
- Notifications → Socket.IO delivery: pushes events (evidence: `backend/utils/notifications.js`)
- Celebrations → NGO records: reads NGO (evidence: `backend/controllers/celebrationController.js`)
- Helpify requests → NGO records: matches NGOs (evidence: `backend/controllers/helpRequestController.js`)
- API routing → MongoDB: connects (evidence: `backend/server.js`)
