Repository Structure
text
neemias/
├── app/ # SPA frontend (React + Vite + Dexie)
│ └── src/
│ ├── app/ # Pages, contexts, components, UI
│ ├── db/ # Dexie schema + repositories
│ └── modules/ # auth, attendance, reports, students, sync, users
├── workers/ # Cloudflare Workers backend (active)
│ └── src/
│ ├── db/ # D1 wrapper + query helpers
│ ├── modules/ # auth (password, session tokens), idempotency
│ ├── middleware/ # auth guard, CORS, CSP, handler wrapper
│ ├── routes/ # endpoint handlers
│ ├── schemas.ts
│ ├── router.ts # route handlers
│ └── index.ts # entrypoint
├── packages/ # Shared workspace packages
│ ├── permissions/ # RBAC (roles + permissions)
│ ├── plugin-registry/ # Plugin contract + registry
│ ├── schemas/ # Zod entity schemas + utilities
│ └── seed-data/ # Development seed data
├── migrations/ # D1 SQL migrations
├── docs/ # Documentation portal (VitePress)
├── .specs/ # Spec-driven development docs
├── scripts/ # Deploy and automation scripts
├── pnpm-workspace.yaml
└── wrangler.toml # Workers + D1 configuration (workers/)Workspaces
| Workspace | Description |
|---|---|
app/ | Frontend SPA (React + Vite + shadcn/ui) |
workers/ | Active backend (Cloudflare Workers + D1) |
packages/permissions | RBAC roles and permissions |
packages/schemas | Zod entity schemas + utilities |
packages/plugin-registry | Plugin contract and registry |
packages/seed-data | Development seed data |