Build Guide / 07
Local setup
Getting a working copy running on a machine, from clone to a browser tab open on the dashboard.
-
Install prerequisites
Node.js (LTS) and npm. No local database or PHP runtime is required for the app itself — Firestore is remote.
-
Install dependencies
npm install -
Set environment variables
Create
.env.local.env.localat the project root:GEMINI_API_KEY=your_gemini_api_key FIREBASE_PROJECT_ID=ebsoft-hms-25f69 # Plus any VITE_FIREBASE_* client config keys read by src/lib/firebase.ts -
Start the dev server
npm run devThis runs
tsx server.ts, which starts Express with Vite's dev middleware attached (hot module reload included) and kicks off the cron scheduler in the background. The app is served athttp://localhost:3000. -
Type-check as you go
npm run lintThis is a
tsc --noEmitpass, not a stylistic linter — it catches type errors across the ~90 page modules before they reach the build step.
There's a separate command for linting the Firestore rules themselves:
npm run lint:rules (runs eslint against
firestore.rules / DRAFT_firestore.rules with the
Firebase security-rules plugin).