Keep the living API sheet aligned with demo personas, avatars, ID-card QR scan, list filters, and Admin/Ecom coordination. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|---|---|---|
| docs | ||
| public | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| components.json | ||
| eslint.config.mjs | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.mjs | ||
| README.md | ||
| tsconfig.json | ||
| vercel.json | ||
| vercel.ts | ||
Gishen B2B
Institutional portal for Gishen corporate medical benefits clients (Feature Requirements §3).
Organisations hold the contract and credit limit. HR enrols people and configures packages. Finance sees covered spend and statements (no clinical detail). Members use their allowance, orders, and prescriptions.
Stack
- Next.js 16 (App Router) + React 19 + TypeScript
- Tailwind CSS 4 + shadcn/ui
- next-intl (
en/am) - TanStack Query + typed mock API adapters
- Hosting: Vercel
Run locally
npm install
npm run dev
Open http://localhost:3000 — you will be redirected to /en/login.
Demo login
On /login, pick a persona:
| Role | Access |
|---|---|
| SUPER_USER | Full portal (including clinical/Rx for support) |
| HR_ADMIN | Org, departments, members, packages, migration — no clinical |
| FINANCE | Spend, statements, approvals — no clinical |
| MEMBER | Own benefits, orders, prescriptions |
Use Switch demo user in the topbar profile menu to return to the role selector.
Language switcher is on login and in the topbar (English / አማርኛ).
Routes
| Area | Paths |
|---|---|
| Auth / signup | /login, /register/organisation, /register/request, /join, /invite/[token] |
| Org | /organisation, /departments, /settings/verification |
| People | /members, /members/import, /members/[id] |
| Packages | /packages, /packages/[id] |
| Migration | /migration, /migration/new, /migration/[jobId] |
| Finance | /finance, /finance/approvals, /statements |
| Member | /me, /me/orders, /prescriptions, /prescriptions/new |
All app routes are locale-prefixed (/en/..., /am/...).
Backend specs (standing rule)
This frontend ships against mocks typed to a living shared-backend spec:
docs/README.md— how to extend specsdocs/backend/— entities, endpoints, events, OVERVIEWdocs/features/INDEX.md— feature → pages → entities → endpointsdocs/coordination/— Admin / Ecom / open items
Whenever UI changes, update docs/backend/ and docs/features/INDEX.md in the same change.
Environment
Copy .env.example to .env.local:
cp .env.example .env.local
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_APP_URL |
Public URL |
NEXT_PUBLIC_API_BASE_URL |
Shared API (unused while mocks are on) |
NEXT_PUBLIC_USE_MOCKS |
Keep true until shared backend exists |
Deploy (Vercel)
- Install and authenticate CLI:
npm i -g vercel && vercel login - From this repo:
vercel link(project name e.g.gishen-b2b) vercel env pull(optional)- Preview:
vercel· Production:vercel --prod
Config: vercel.json. Connect the Gitea remote via Vercel Git integration when available.
Scripts
npm run dev # development
npm run build # production build
npm run start # serve production build
npm run lint # eslint
Brand
Gishen mint / black palette and logo from Gishen-Ecom (public/brand/gishen-logo.png, src/data/brand.ts). Layout patterns follow Fortune Admin ui (PageShell, collapsible sidebar, topbar) built with shadcn only.