================================================================ Sehat Sahoolat — Windows offline setup Bundle generated for direct USB / network transfer ================================================================ This zip contains EVERYTHING needed to run the project offline: - Full source code (no node_modules — they get installed fresh) - Docker config (docker-compose.yml at root + deploy/dockerfiles/) - Database snapshot (database/dev-snapshot.sql) - Backend .env with all your real API keys (backend/.env) - Migrations, seeds, deploy scripts What's NOT in this zip (will be installed by the commands below): - node_modules (recreated by `npm install`) - Postgres + Redis + Whisper (run inside Docker on first up) ---------------------------------------------------------------- ONE-TIME SETUP (install these once on the Windows PC) ---------------------------------------------------------------- 1. Docker Desktop for Windows https://docs.docker.com/desktop/setup/install/windows-install/ 2. Node.js 22 LTS https://nodejs.org/en/download/ (pick "LTS — Windows Installer") 3. Git for Windows (includes Git Bash — used by docker-compose volumes) https://git-scm.com/download/win 4. After installing all three: log out + log back in (refreshes PATH). ---------------------------------------------------------------- STEP 1 — Extract this zip ---------------------------------------------------------------- IMPORTANT: extract to a path NOT under OneDrive. Good: C:\code\sehat-sahoolat Bad: C:\Users\\OneDrive\sehat-sahoolat (corrupts node_modules) C:\Users\\Desktop\sehat-sahoolat (also OneDrive on most setups) Recommended: open File Explorer, go to C:\, create a new folder "code", extract the zip into it. Final path should be C:\code\sehat-sahoolat\ ---------------------------------------------------------------- STEP 2 — Bring up the backend stack (one command) ---------------------------------------------------------------- Open PowerShell as Administrator, then: cd C:\code\sehat-sahoolat docker compose up -d First run takes ~3-5 minutes (builds Docker images). Watch progress: docker compose logs -f backend Wait for "Nest application successfully started" then press Ctrl+C to exit the log follower (the backend keeps running). ---------------------------------------------------------------- STEP 3 — Load the rich dev snapshot (optional but recommended) ---------------------------------------------------------------- This populates 67 tables with synthetic users, doctors, appointments, EMR records, medicines (1376 rows), CMS content, etc. Without it the app only has 3 seed users + 3 packages. Get-Content -Encoding UTF8 database\dev-snapshot.sql | docker compose exec -T postgres psql -U sehat -d sehat_sahoolat ---------------------------------------------------------------- STEP 4 — Set the Agora credentials (for video calls) ---------------------------------------------------------------- Your Agora keys are NOT in the snapshot (encryption-key issue). Set them with the included script: docker compose exec backend node ./dist/scripts/set-agora-creds.js After that, video calls work end-to-end. ---------------------------------------------------------------- STEP 5 — Run the three frontends ---------------------------------------------------------------- In three separate PowerShell terminals: --- Terminal A (Patient portal — port 3001) --- cd C:\code\sehat-sahoolat\web npm install # ~1-2 min, one time cd apps\patient-portal npx next dev -p 3001 --- Terminal B (Admin portal — port 3003) --- cd C:\code\sehat-sahoolat\web\apps\admin-portal npx next dev -p 3003 --- Terminal C (Doctor portal — port 3002) --- cd C:\code\sehat-sahoolat\web\apps\doctor-portal npx next dev -p 3002 ---------------------------------------------------------------- STEP 6 — Open in browser + log in ---------------------------------------------------------------- Patient: http://localhost:3001 Email: patient1@sehat.local Password: PatientPass1! Admin: http://localhost:3003 Email: admin@sehat.local Password: AdminPass1! Doctor: http://localhost:3002 Email: derma@sehat.local Password: DoctorPass1! ---------------------------------------------------------------- COMMON COMMANDS ---------------------------------------------------------------- Stop everything: docker compose down Stop + delete all data: docker compose down -v See backend logs: docker compose logs -f backend Open a shell inside the backend: docker compose exec backend sh Restart backend only: docker compose restart backend Update Agora cert later: docker compose exec backend node ./dist/scripts/set-agora-creds.js ---------------------------------------------------------------- IF SOMETHING BREAKS ---------------------------------------------------------------- - "Cannot find module" errors in frontends → OneDrive is corrupting node_modules. Move the folder OFF OneDrive (System Settings → Backup → Manage backup → uncheck Desktop & Documents). - Backend exits with "column does not exist" → migrations didn't run. Force them: docker compose exec backend node ./node_modules/typeorm/cli.js migration:run -d ./dist/src/data-source.js - Port already in use (5432, 3000, etc) → stop the conflicting service or edit docker-compose.yml to use a different port. - Whole project status / module list → open PROJECT_STATUS.md - Production deploy guide → open deploy/README.md ================================================================ Generated: 2026-05-25 · See PROJECT_STATUS.md for full memory ================================================================