How satyam9140/ngo_donation works
UnityAid is a donation and NGO-impact platform. Donors browse NGOs and causes, submit donations, and view impact summaries; NGOs can submit registration details. The browser routes and page components call a JSON API, whose Express routes dispatch to controllers for NGO listings and registrations, donations, contacts, and impact reporting. Controllers validate input and use a file-backed JSON store. The sampled code shows these flows and the static content-backed home page; the README is empty, and unsampled donation/contact implementation details are represented only where the source index supports them.
Main entry points: App.jsx Route application · ngoController.js NGO operations · Home.jsx Home and causes · Directory.jsx NGO directory
Components 31
Client experience
- Route application
client/src/App.jsx - Page layout
client/src/components/Layout.jsx - Home and causes
client/src/pages/Home.jsx - NGO directory
client/src/pages/Directory.jsx - NGO registration
client/src/pages/Register.jsx - Donation flow
client/src/pages/Donate.jsx - Impact dashboard
client/src/pages/Dashboard.jsx - Featured content
client/src/data/content.js - NGO card
client/src/components/NGOCard.jsx - Section header
client/src/components/SectionHeader.jsx - Statistic card
client/src/components/StatCard.jsx - API client
client/src/services/api.js
API runtime
- HTTP application
server/src/app.js - API route registry
server/src/routes/index.js - NGO routes
server/src/routes/ngoRoutes.js - Donation routes
server/src/routes/donationRoutes.js - Dashboard routes
server/src/routes/dashboardRoutes.js - Contact routes
server/src/routes/contactRoutes.js
Domain operations
- NGO operations
server/src/controllers/ngoController.js - Donation operations
server/src/controllers/donationController.js - Impact summary
server/src/controllers/dashboardController.js - Contact operations
server/src/controllers/contactController.js - Request validation
server/src/utils/validators.js - HTTP responses
server/src/utils/http.js
File persistence
- JSON store
server/src/utils/jsonStore.js - Data paths
server/src/config/paths.js - NGO records
server/data/ngos.json - Registration records
server/data/registrations.json - Donation records
server/data/donations.json - Contact records
server/data/contacts.json
Other components
- Platform user
Connections 48
- Platform user → Route application: opens
client/src/App.jsx - Route application → Page layout: wraps routes
client/src/App.jsx - Route application → Home and causes: routes to
client/src/App.jsx - Route application → NGO directory: routes to
client/src/App.jsx - Route application → NGO registration: routes to
client/src/App.jsx - Route application → Donation flow: routes to
client/src/App.jsx - Route application → Impact dashboard: routes to
client/src/App.jsx - Home and causes → Featured content: renders from
client/src/pages/Home.jsx - Home and causes → NGO card: renders
client/src/pages/Home.jsx - Home and causes → Statistic card: renders
client/src/pages/Home.jsx - Home and causes → Section header: renders
client/src/pages/Home.jsx - NGO directory → API client: fetches NGOs
client/src/pages/Directory.jsx - NGO directory → Featured content: uses content
client/src/pages/Directory.jsx - NGO directory → NGO card: renders
client/src/pages/Directory.jsx - NGO directory → Section header: renders
client/src/pages/Directory.jsx - NGO registration → API client: submits registration
client/src/pages/Register.jsx - NGO registration → Section header: renders
client/src/pages/Register.jsx - Donation flow → API client: submits donation
client/src/pages/Donate.jsx - Donation flow → Featured content: uses content
client/src/pages/Donate.jsx - Donation flow → Section header: renders
client/src/pages/Donate.jsx - Impact dashboard → API client: fetches summary
client/src/pages/Dashboard.jsx - Impact dashboard → Section header: renders
client/src/pages/Dashboard.jsx - Impact dashboard → Statistic card: renders
client/src/pages/Dashboard.jsx - API client → HTTP application: calls API
- HTTP application → API route registry: mounts API
server/src/app.js - API route registry → NGO routes: registers
server/src/routes/index.js - API route registry → Donation routes: registers
server/src/routes/index.js - API route registry → Dashboard routes: registers
server/src/routes/index.js - API route registry → Contact routes: registers
server/src/routes/index.js - NGO routes → NGO operations: dispatches
server/src/routes/ngoRoutes.js - Donation routes → Donation operations: dispatches
server/src/routes/donationRoutes.js - Dashboard routes → Impact summary: dispatches
server/src/routes/dashboardRoutes.js - Contact routes → Contact operations: dispatches
server/src/routes/contactRoutes.js - NGO operations → Request validation: validates input
server/src/controllers/ngoController.js - Donation operations → Request validation: validates input
server/src/controllers/donationController.js - Contact operations → Request validation: validates input
server/src/controllers/contactController.js - NGO operations → JSON store: reads and appends
server/src/controllers/ngoController.js - Donation operations → JSON store: reads and appends
server/src/controllers/donationController.js - Impact summary → JSON store: reads records
server/src/controllers/dashboardController.js - Contact operations → JSON store: stores contacts
server/src/controllers/contactController.js - NGO operations → HTTP responses: sends success
server/src/controllers/ngoController.js - Donation operations → HTTP responses: sends success
server/src/controllers/donationController.js - Impact summary → HTTP responses: sends summary
server/src/controllers/dashboardController.js - Contact operations → HTTP responses: sends success
server/src/controllers/contactController.js - JSON store → Data paths: uses data path
server/src/utils/jsonStore.js - NGO operations → NGO records: reads
server/src/controllers/ngoController.js - NGO operations → Registration records: reads and appends
server/src/controllers/ngoController.js - Impact summary → Donation records: reads
server/src/controllers/dashboardController.js