| Name | ID | Github username |
|---|---|---|
| Jovan Gavranovic | 40282175 | jGavranovic |
| Jeslyn Sorotsky | 40277100 | JenLys |
| Kevin Liu | 40281197 | Ke-Li02 |
| Kevin Ung | 40259218 | Pengukev |
Install dependencies for both frontend and backend:
npm run install:alldocker compose up -dThis starts a PostgreSQL 16 container on port 5432. The database and schema are created automatically on first run.
npm run seedThis runs the backend seed script from the project root.
Backend-only equivalent:
cd backend
npm run seedNote: the seed script drops and recreates the ownerships, vehicles, and users tables before inserting sample data.
npm run devThis concurrently starts:
- Frontend dev server (Vite) —
http://localhost:5173 - Backend dev server (Express) —
http://localhost:3000
Both services restart automatically on code changes.
docker compose downTo also remove the stored data:
docker compose down -vcd frontend
npm install leaflet react-leaflet
npm install -D @types/leaflet
If you prefer to run frontend and backend separately:
cd frontend
npm install
npm run devcd backend
npm install
npm run devEcoFlow follows an MVC (Model-View-Controller) architecture across both the frontend and backend.
EcoFlow/
├── backend/
│ ├── index.js # Entry point – starts the Express server
│ ├── package.json
│ ├── controllers/ # Handle incoming request logic & send responses
│ ├── models/ # Data models & database schemas (e.g. Mongoose)
│ ├── routes/ # Route definitions – map URLs to controllers
│ └── services/ # Business logic, decoupled from controllers
│
└── frontend/
└── src/
├── assets/ # Static files (images, fonts, icons)
├── components/ # VIEW – Reusable UI components
│ ├── common/ # Generic shared components (buttons, inputs, etc.)
│ └── layout/ # Structural components (navbar, sidebar, footer)
├── pages/ # VIEW – Page-level components, one per route
├── controllers/ # CONTROLLER – Handles user interaction & app logic
│ └── hooks/ # Custom React hooks (encapsulate stateful logic)
├── models/ # MODEL – TypeScript interfaces, types & data shapes
│ └── types/ # Shared type definitions used across the app
├── services/ # API calls & external service communication
├── store/ # Global state management (Redux / Zustand / etc.)
├── utils/ # Pure helper / utility functions
├── App.tsx # Root component – sets up routing & providers
└── main.tsx # Entry point – mounts the React app to the DOM