How community-center-vol-app-dev-team/beit-hanina-community-center-vol-app works
Project Type and Purpose
• This is a full-stack, volunteer time-management application targeting both web and mobile (Android/iOS) platforms.
• The “client” directory holds a React-based web PWA plus a Capacitor wrapper for native Android.
• The “src” directory at the root is the Node.js/Express back-end, with controllers, middleware, and PostgreSQL database integration.
File Structure
Frontend (client/)
– React web app in client/src (components, pages, routing, localization)
– Capacitor config and Android project under client/android
– Static assets and manifest in client/public
Backend (src/)
– server.js: entry point for Express HTTP server
– controllers/: business-logic endpoints (register, validation, etc.)
– middlewares/: JWT verification
– database/: connection (db.js), schema (schema.sql), and data-access logic
Supporting files
– scripts/: build, deploy, and conversion helpers (e.g., run_frontEnd.sh, setup_server.sh)
– CI config in .github/workflows/eslint.yml
README for Insights
• Minimal description: “social project…volunteer time management app for public center”
Components
a. Frontend Layer
• Web PWA (React + Service Worker)
• Mobile App (Capacitor → Android/iOS native shells)
b. API Layer
• API Gateway: Node.js/Express (server.js)
• Authentication Middleware (verifyToken.js)
c. Application Logic
• Controllers (register, validation)
d. Data Layer
• Database driver (db.js) connecting to a PostgreSQL instance
• Schema (schema.sql)
• Data-validation modules (users.js)
e. External/Third-Party Services (if any)
• Email/SMS services (if used—none explicit)
• Cloud storage for uploads (hinted by UploadComponent.js)
• Internationalization service (i18n.js)
Relationships and Interactions
• Frontends → HTTP/HTTPS calls → API Gateway
• API Gateway → Middleware (JWT/Auth) → Controllers
• Controllers → Database driver → PostgreSQL
• Optionally: Controllers → External services (e.g., file storage)
• Build/deploy scripts (in scripts/) orchestrate packaging of frontends and backend
Architectural Patterns and Design Principles
• Layered Architecture:
– Presentation (UI)
– API/Controller
– Business Logic
– Data Access
• MVC-style separation in back end (controllers & data layer)
• Hybrid mobile approach via Capacitor bridging JS UI to native
• Localization pipeline via i18n config and locale JSON files