update frontend ui chages

This commit is contained in:
2026-08-17 23:45:32 +05:30
parent 9a7852c8a2
commit ff841f8b86
278 changed files with 14841 additions and 14597 deletions

View File

@@ -1,9 +1,54 @@
# Base44 Preview Template for MicroVM sandbox
# KROW Workforce Control Tower
This template is used by the server to preview user-apps.
A standalone frontend application. There is no backend, no external API and no
login: the app opens directly into the Control Tower UI, locally and when
deployed, and keeps working with no network at all.
## user files
server creates the user-app files in the __components__, __pages__ folders
```
Frontend → local data / React state / localStorage → KROW UI
```
## server injected data
server injects app related data to __app.config.js__, which is used by App.jsx to render the components in the files.
## Running it
```bash
npm install
npm run dev # http://localhost:5174
npm run build # static bundle in dist/
npm run preview # serve the production build locally
```
Deployment is a static-file deploy: serve `dist/` with any web server, with a
SPA fallback so deep links (`/Events`, `/Schedule`, …) resolve to `index.html`.
The included `Dockerfile` + `nginx.conf` do exactly that.
## Where the data lives
Everything the UI reads and writes goes through one object — `krow`, exported
from [`src/api/client.js`](src/api/client.js):
| Area | Local implementation |
| --- | --- |
| `krow.entities.*` | [`src/api/local/store.js`](src/api/local/store.js) — collections held in memory and mirrored into `localStorage` |
| Starting data | [`src/api/local/seedData.js`](src/api/local/seedData.js) — the bundled demo dataset, copied in on first read |
| Data model | [`src/api/local/schemas.json`](src/api/local/schemas.json) — entity schemas, loaded on demand for `.schema()` |
| `krow.auth` | [`src/api/local/auth.js`](src/api/local/auth.js) — a single local operator profile; no sign-in |
| `krow.integrations.Core` | [`src/api/local/integrations.js`](src/api/local/integrations.js) — uploads become local data/object URLs; email/SMS are recorded locally |
| `krow.agents` | [`src/api/local/agents.js`](src/api/local/agents.js) — assistant threads stored locally, answered by [`src/lib/owliver/owliverEngine.js`](src/lib/owliver/owliverEngine.js) |
Edits persist per browser. `krow.resetLocalData()` (from the console, or any
code) clears local data and restores the bundled demo dataset.
Collections with no seed data start empty, which is the empty state the pages
already render — so adding an entity needs no wiring, only a key in
`seedData.js` if it should start with rows.
## Layout
```
src/
api/ the local client (client.js) and its implementation (local/)
pages/ one file per route, auto-registered via pages.config.js
components/ feature components and the ui/ primitives
lib/ shared helpers, the Owliver engine and page registry
Layout.jsx the Control Tower shell: header, sidebar, Owliver
```