The control plane for the PyroGuardian system. This Node.js application manages user authentication, real-time fire reporting, and communicates with the MongoDB database.
- Runtime: Node.js (v18)
- Framework: Express.js
- Database: MongoDB (via Mongoose)
- Frontend: Server-side rendered HTML/JS (Vanilla)
- Testing: Jest, Supertest
- Node.js v18+
- MongoDB (Local or Atlas)
cp .env.example .env
# Edit .env with your local Mongo URI and secretsnpm install# Development mode (Nodemon)
npm run dev
# Production mode
npm startnpm testcontrollers/: Request logic (Auth, Fire Reports).models/: Mongoose schemas.routes/: API endpoint definitions.public/: Static assets (HTML, CSS, Client-side JS).middlewares/: Auth verification, Upload handling.
- Helmet: Sets secure HTTP headers.
- Rate Limiting: Protects
/loginagainst brute-force attacks. - JWT: Stateless authentication.