# Krishna Sales Vite + React + TypeScript frontend for **sandbox app 434** on the Zino platform. - Base URL: `https://sandbox.getzino.in` - Dev: `npm run dev` · Build: `npm run build` (`tsc -b && vite build`) ## Layout - `src/api/client.ts` — `ZinoClient`, the HTTP client for the Zino gateway. Constructor is `new ZinoClient(baseUrl, workflowUuid, onAuthError?)`. Auth (login/logout/currentUser) + view/activity/upload calls. JWT persists in localStorage. - `src/api/config.ts` — all app-434 ids: `APP_ID`, `BASE_URL`, and per-workflow uuids/activities/fields/views. - `src/api/types.ts` — shared API response types. - `src/docs/api/*.md` — the source API docs (one per workflow) these ids come from. ## Workflows (app 434) The app has **three workflows**, each with its own `workflow_uuid`. `APP_ID` (434) is shared; every route is app-scoped (`/app/434/...`) except `/usr/login`. Instantiate one client per workflow: `new ZinoClient(BASE_URL, WORKFLOWS..workflowUuid)`. | Slug (config) | Name | Init activity | Other activities | | --- | --- | --- | --- | | `orderBooking` | Order Booking | Log Visit | Place Order, Productivity of Visit, Potential Mining, Close Order | | `store` | Store | Init Activity | Edit Store | | `dailyReports` | Daily Reports | Init Activity | Punch Out | Field ids differ per activity even for the "same" field (e.g. Store's fields carry a `_2` suffix on init, `_3` on edit). Grid columns are noted in inline comments in `config.ts`. Always source ids from `config.ts`, never hardcode. ## Conventions - Init activity → `POST /app/434/start`; subsequent activities → `POST /app/434/activity`. Both take `{workflow_uuid, activity_id, data, instance_id?}`. - File/image fields: `POST /app/434/upload` (multipart) first, then send the returned `blob_path` as the field value. - In-form option sources vary by field type: `wf-lookup/records`, `dataset-options`, `app-user/records` — see the per-workflow doc. - When workflows/fields change, update `config.ts` from the docs in `src/docs/api/`.