How hack4impact-uiuc/life-after-hate works
Main Components
• Frontend – Represented by the “frontend” directory, implemented in React with Redux state management. Key aspects include pages, components (such as modals, maps, and navigation), and testing (Cypress). Note that the frontend has its own Dockerfile.
• Backend – Represented by the “backend” directory, which contains an Express application that defines various API endpoints (e.g., for authentication, user, resource, etc.). Backend models (using Mongoose) and utilities (like authentication middleware, error handling, and resource parsing) should be highlighted.
• Database – The backend is configured to connect to a MongoDB instance (as seen in the .env file with the DB_URI).
• External Services – Include Google OAuth for authentication, Mapbox/MapQuest APIs for map rendering and geocoding, and possibly other third-party integrations.
• Containerization & DevOps – Docker and Docker Compose are used for development/testing and deployment. Also include CI/CD pipelines (GitHub Actions workflows and Codecov).
Relationships and Interactions
• Backend interacting with the Database (MongoDB) via Mongoose models.
• Connections from the Backend to external services (Google OAuth for user login and Mapbox/MapQuest for geospatial data).
• Optionally, include the testing infrastructure (Cypress scripts for the frontend and Mocha tests on the backend) to showcase how quality assurance is integrated.
• If desired, note the Docker orchestration as a surrounding layer that encapsulates the entire stack (frontend, backend, and database).
Architectural Patterns and Design Principles
• MVC Style / Layered Architecture – Highlight how the models, routes, controllers, and middleware within the backend follow an organized, layered pattern. On the frontend, show how components and Redux state management are structured.
• Microservice Considerations – Although this isn’t a microservice architecture per se, use containers (Docker) to indicate that each major component is decoupled and can be scaled separately.
• Security / Authentication – Emphasize the Passport-based authentication mechanism using Google OAuth along with authorization middleware.
Technologies, Frameworks, and Libraries
• Frontend: React, Redux, CSS/SCSS modules, DeckGL and MapboxGL for maps.
• Backend: Express, Mongoose (MongoDB), Passport for auth, Joi for validation, Fuse.js for fuzzy search, and Ramda for utilities.
• DevOps: Docker (with separate Dockerfiles for frontend and backend), Docker Compose, GitHub Actions for CI, and Codecov for code coverage.
Elements
• Use clear, descriptive labels for each component—for example, “Frontend (React/Redux)”, “Backend API (Express)”, “Database (MongoDB)”, “Auth Service (Google OAuth)”, “Map Services (Mapbox/MapQuest)”, and “DevOps (Docker Compose & CI/CD)”.