This guide walks you from a fresh clone to a running SIMAP Digital dev server with demo data pre-loaded for all five roles.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AdriP-maker/JAAR_Antigravity/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have the following installed:- Node.js ≥ 18 — nodejs.org
- npm (bundled with Node.js)
- A Supabase project for cloud sync (optional for purely offline local testing — the app runs without it)
Installation
Create your environment file
Copy the provided example environment file to create your local The
.env..env.example file ships with the following variables:Configure Supabase credentials
Open You can find both values in your Supabase dashboard under Project Settings → API.
.env in your editor and replace the placeholder values with your real Supabase project credentials.VITE_ prefixed variables are bundled into the client-side JavaScript by Vite and are therefore visible in the browser. Use only your anon (public) key here — never your service_role secret key.Demo credentials
The app seeds IndexedDB with demo accounts on first launch (defined insrc/utils/constants.js). Use these to explore each role’s interface:
| Role | Username | Password | Description |
|---|---|---|---|
admin | admin | admin123 | Full system control — users, finances, audit logs, system config. |
cobrador | cobrador | 1234 | Field collector — offline payments, AI route suggestions, jornales. |
minsa | minsa | 1234 | Read-only MINSA inspector — download official Excel and PDF reports. |
cliente | cliente | 1234 | Resident/neighbour view — payment history, points balance, notices. |
dev | dev | admin123 | Audit log only — no access to financial data or resident PII. |
Available npm scripts
| Script | Command | Description |
|---|---|---|
| Dev server | npm run dev | Starts Vite dev server at http://localhost:5173 with HMR. |
| Production build | npm run build | Compiles and bundles the app into the dist/ directory. |
| Preview build | npm run preview | Serves the production dist/ build locally for pre-deploy testing. |
| Lint | npm run lint | Runs ESLint across the source tree. |
Offline-first behaviour
Once the app has loaded at least once, it operates fully without internet access:- All data (residents, payments, expenses, jornales) is stored in IndexedDB on the device via Dexie.js.
- Any write made while offline is queued in the
pendingSynctable. - When the browser detects an
onlineevent, SIMAP Digital automatically flushes the pending queue to Supabase.