You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The backend uses a centralized configuration module (server/config/index.js) powered by Joi schema validation. This ensures the app fails fast at startup if critical environment variables are missing or incorrectly formatted.
Important: You must not access process.env directly in the backend codebase (outside of server/config/index.js). All environment variables must be registered in the schema and accessed through the exported config object.
// Example usage:constconfig=require('./config');console.log(config.database.url);
Quick Start
Prerequisites
Node.js ≥ 18
Python 3.11 (for AI service)
MongoDB Atlas cluster
1. Clone & install
git clone <repo-url> HawkWatch
cd HawkWatch
npm run install:all
2. Configure environment
# Server
cp server/.env.example server/.env
# Edit server/.env with your MongoDB URI, JWT secrets, AWS keys# Client
cp client/.env.example client/.env # (optional—proxy handles API)
3. Start dev servers
npm run dev
# Frontend: http://localhost:5173# Backend: http://localhost:5000# Health: http://localhost:5000/api/health
4. Start Python AI service (optional — stubs work without it)