How ualberta-cmput401/f24project-bleeding-heart-art-space works
Project Type and Purpose
• This is a full‐stack web application (“Volunteer Management Platform”) comprising:
• A React/TypeScript single‐page application (SPA) frontend
• A Node.js/Express/TypeScript monolithic backend API
• A PostgreSQL relational database
• Integrations with external services (email provider, Firebase SDK)
• Docker/Docker‐Compose orchestration and CI pipelines
File Structure
• Top‐level directories “frontend” and “backend” indicate two containers/services.
• “backend/src” is organized feature‑by‑feature (controllers, services, models, routes), revealing an MVC‑style pattern.
• “common” folders contain shared config, middleware, utils, and migrations (PostgreSQL schema managed with timestamped migration files).
• “frontend/src” is organized into pages, components, hooks, context, stores, and utilities—typical React SPA with state management via custom hooks and global context.
• Dockerfile and docker-compose.yml orchestrate containers (frontend, backend, database).
• GitHub Actions workflow for running backend tests indicates a CI pipeline.
README Insights
• Confirms high‑level overview: React + Node + TypeScript + PostgreSQL + Firebase.
• Features: event/shift creation, volunteer signup, calendar view, artist requests, email notifications, attendance tracking.
• Development: separate “npm run dev” for frontend and backend; acceptance tests under “tests” folder use Mocha.
a. Main Containers/Components
• User’s Web Browser (client device)
• Nginx (static host for the SPA) or direct Vite dev server in dev mode
• React SPA frontend (pages, components, context, state stores)
• Node/Express backend API (app.ts → server.ts)
• PostgreSQL Database (hosted in Docker)
• External Email Service (e.g., SendGrid via SMTP or other API)
• Firebase (authentication, push notifications)
• CI/CD Runner (GitHub Actions)
b. Relationships and Data Flows
• Browser → (HTTP/HTTPS) → Nginx/SPA → (AJAX/Fetch) → Backend API
• Backend → (SQL) → PostgreSQL (queries, migrations)
• Backend → (SMTP/API) → Email Service
• Frontend → (Firebase SDK) → Firebase Auth/Realtime services
• CI Pipeline → (runs) → Backend Tests → Report status to GitHub
c. Architectural Patterns & Design Principles
• Monolithic backend using MVC/feature modules.
• RESTful API layer with controllers → services → models.
• Feature‐based folder layout to isolate domain logic (events, users, shifts, notifications).
• React Context and custom hooks for state management on the frontend.
• Environment‐based configuration (dotenv in backend, .env in frontend).
• Containerization: each major component runs in its own Docker container.
• Migration‐first database schema management.
d. Key Technologies
• Frontend: React, TypeScript, Vite, Tailwind/CSS Modules, React Router
• Backend: Node.js, Express, TypeScript, Jest (unit tests), Umzug/TypeORM/knex‐like migrations
• Database: PostgreSQL
• External: Firebase SDK, Email provider
• DevOps: Docker, docker-compose, GitHub Actions
• Controllers (handle routes)
• Services (business logic)
• Models (database schemas)
• Middlewares (auth, logging)
• Config & Utils
• Pages (Account, Calendar, EventDetails, etc.)
• Shared Components (Layout, Dialogs, Snackbar)
• State Stores & Context Providers
• Utility modules (fetch wrappers, auth helper)