How crishenrique/be_thehero works
Project type and purpose
• This is a full-stack, tri-client application (“Be The Hero”) consisting of:
• A Node.js/Express backend with an SQLite database (via Knex).
• A React single-page web frontend.
• A React Native (Expo) mobile app.
• Purpose: Let NGOs register and manage “incidents” via web or mobile clients.
File structure
• Top-level directories:
• backend/ – Express server, controllers, routes, database (Knex + SQLite), tests.
• frontend/ – React app with pages, CSS, API service layer.
• mobile/ – Expo/React Native app mirroring the web’s services and pages.
• Patterns:
• Backend follows an MVC-ish structure: routes → controllers → database.
• Clients both import a shared api.js service for HTTP calls.
• Config files: knexfile.js, package.json in each client, Babel config for mobile.
README
• Confirms tech stack: Node.js, Express, React, Expo.
Detailed breakdown of the backend component
• Routes (routes.js)
• Controllers (ProfileController, SessionController, OngController, IncidentController)
• Database module (connection.js + migrations)
• That migrations define tables for “ongs” and “incidents” (Knex migrations).