How sarvaiyaprashant2242005/voloconnect works
Project Type & Purpose
• VoloConnect is a full-stack web application.
• Purpose: Match volunteers and organizations via a React frontend and a Node/Express backend with PostgreSQL persistence, plus email notifications.
File Structure
• client/
‑ React + Vite project
‑ src/components (UI), src/services (API calls), src/context (Auth state)
• server/
‑ Express app (app.js + index.js)
‑ config/ (DB setup, init scripts)
‑ controllers/ (business logic)
‑ routes/ (REST endpoints)
‑ middleware/auth.js (JWT guard)
‑ utils/emailService.js (SMTP integration)
‑ db/ (migrations, seed, logs)
README Insights
• Runs on localhost:3001 (client) & 5000 (server).
• Key features: Smart matching, real-time updates, profile management, org dashboard, impact tracking.
Main Components
a. Frontend (React/Vite)
• UI components (Landing, Auth, Dashboard, Events)
• AuthContext for JWT/session
• API layer (eventService.js)
b. Backend (Node.js/Express)
• Routes → Controllers → Database
• Auth middleware (JWT)
• EmailService (SMTP/SendGrid)
c. Persistence
• PostgreSQL database (schemas: users, events, volunteers, logs)
d. External Services
• Email provider
• (Optionally) push/notification service or third-party auth if used
Relationships & Data Flows
• User browser → HTTP(S) → React client
• React client → REST API calls → Express routes
• Express middleware → Controller logic → Queries to PostgreSQL
• Controller → Calls emailService → External SMTP
• DB migrations & seeds initialize schemas
• AuthContext intercepts API calls, stores JWT from login
Architectural Patterns & Principles
• Frontend: Component-based UI, Context API for global state, Service layer for decoupled API calls
• Backend: MVC-inspired (Routes → Controllers → Models/DB), layered config for DB and initialization, middleware for cross-cutting concerns
• Clear separation of concerns (UI vs. business logic vs. data layer)
Technologies & Frameworks
• Frontend: React, Vite, JSX, CSS Modules
• Backend: Node.js, Express, JWT, Knex/pg or raw SQL migrations
• Database: PostgreSQL
• Utilities: nodemailer or similar (emailService.js)