EBsoft HMSBuild & Architecture Guide

Build Guide / 07

Local setup

Getting a working copy running on a machine, from clone to a browser tab open on the dashboard.

  1. Install prerequisites

    Node.js (LTS) and npm. No local database or PHP runtime is required for the app itself — Firestore is remote.

  2. Install dependencies

    npm install
  3. Set environment variables

    Create .env.local at the project root:

    .env.local
    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
  4. Start the dev server

    npm run dev

    This 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 at http://localhost:3000.

  5. Type-check as you go

    npm run lint

    This is a tsc --noEmit pass, 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).