Full-stack Express + React app with:
- public website/landing,
- authenticated web app,
- installable PWA.
- Recommended:
Node.js 20.19.x LTS(Windows x64) - Verify:
node -vnpm -v
- Open project root:
cd "c:\Users\Mihir Modi\Downloads\Asset-Manager-Pro\Asset-Manager-Pro\Asset-Manager-Pro"
- Install dependencies:
npm install
- Create
.envfrom.env.example. - Minimum local
.env:
DATABASE_URL=file:./dev.db
DISABLE_AUTH=true
AUTH_PROVIDER=local
SESSION_SECRET=change-me
USE_JSON_DB=false
UPLOADS_DRIVER=local
UPLOAD_SCAN_MODE=basic
ASSEMBLYAI_API_KEY=- Start app:
npm run dev
- Open:
http://127.0.0.1:5000
- Dev bypass mode:
DISABLE_AUTH=truegives local test user (local-user).
- Real account mode:
- Set
DISABLE_AUTH=false, keepAUTH_PROVIDER=local. - Use
/loginto sign up/sign in.
- Set
- Included auth capabilities:
- Email/password login and signup
- Session-based auth with rotation (
/api/auth/session/rotate) - Password reset flow (
/api/auth/password/request-reset,/api/auth/password/reset) - Optional MFA (TOTP + recovery codes)
DATABASE_URL=file:./dev.db- Tables auto-initialize on startup.
DATABASE_URL=postgres://...- Migrations:
npm run db:generatenpm run db:migrate
- Included SQL migration:
migrations/0001_platform_hardening.sql
- DB mode is used when
DATABASE_URLis set. - Force JSON fallback only with:
USE_JSON_DB=true
UPLOADS_DRIVER=local- Files served from
/uploads/*.
UPLOADS_DRIVER=s3- Required vars:
S3_ENDPOINTS3_BUCKETS3_ACCESS_KEY_IDS3_SECRET_ACCESS_KEYS3_REGIONPUBLIC_UPLOADS_BASE_URL
UPLOAD_SCAN_MODE=basic|strict|offbasic: EICAR signature checkstrict: EICAR + file header validation
- API version alias:
/api/v1/*rewrites to/api/*
- API docs:
GET /api/openapi.json- Source:
docs/openapi.json
- Health and metrics:
GET /api/healthGET /api/metrics(setMETRICS_TOKENfor production)
- Profile/privacy/compliance:
GET|PUT /api/profilePOST /api/privacy/consentGET /api/privacy/exportDELETE /api/privacy/delete-account
- Start app in DB mode (
DATABASE_URL=file:./dev.db,USE_JSON_DB=false). - Upload/analyze in Live Coaching.
- Confirm history API:
http://127.0.0.1:5000/api/live-coaching/history?limit=10
- Stop server, start again:
npm run dev
- Reload history endpoint and verify entries still exist.
- Build:
npm run build
- Start production server:
npm start
- Uses
PORTandHOSTenv vars (default host behavior included).
- Build and package Windows installer:
npm run desktop:win
- Output installer:
release/SingBetter AI Setup 1.0.0.exe
- Portable unpacked app folder:
release/win-unpacked/
- Run desktop app from source (build + launch Electron):
npm run desktop:dev
- Desktop app starts an embedded local server on
127.0.0.1:5510. - App data is stored in your Windows user app-data folder:
- SQLite DB:
%APPDATA%/SingBetter AI/singbetter.db - Upload files:
%APPDATA%/SingBetter AI/uploads/
- SQLite DB:
- Auth provider defaults to local account auth in desktop mode.
- On first desktop run, app attempts one-time DB migration copy (if needed) from:
./dev.db./prod-local.db- legacy
%APPDATA%/SingBetter AI/desktop.db
docker build -t asset-manager-pro .docker run --rm -p 5000:5000 --env-file .env asset-manager-pro
docker compose up --build
- Create a new Web Service from this repo.
- Build command:
npm install && npm run build - Start command:
npm start - Set environment variables:
NODE_ENV=productionHOST=0.0.0.0PORT=5000DATABASE_URL=postgres://...(Render Postgres)SESSION_SECRET=<strong-secret>DISABLE_AUTH=falseAUTH_PROVIDER=localUPLOADS_DRIVER=s3plus S3/R2 envs
- Run migration once against production DB:
npm run db:migrate
- Build or run dev (
npm run dev/npm run build && npm start) - Open app in Chromium browser
- Use install prompt or browser install button
- Manifest:
client/public/manifest.webmanifest
- Rate limiting is enabled (global + auth endpoints).
- Request correlation IDs and structured logs are enabled.
- Data retention cleanup job runs in background.
- Backup/restore scripts:
npm run backup:sqlitenpm run restore:sqlite -- backups/<file>.db
- Security audit:
npm run security:audit
- Operations runbook:
docs/operations.md
- Release prep:
npm run release:prep
- Release smoke checks:
npm run release:smoke
- Print version + commit:
npm run print-version
- Validate env templates:
npm run env:validate
- Launch checklists and deployment docs:
docs/LAUNCH_CHECKLIST.mddocs/DEPLOYMENT_WEB.mddocs/DEPLOYMENT_DESKTOP.mddocs/ROLLBACK.mdSECURITY.mdCHANGELOG.md
- CI workflow:
.github/workflows/ci.yml
- Deployment workflow scaffold:
.github/workflows/deploy.yml
- Dependabot:
.github/dependabot.yml
- Run all tests:
npm run test
- Type-check:
npm run check