This repository has been archived on 2026-08-11. You can view files and clone it, but cannot push or open issues or pull requests.
Gishen-B2B/README.md
kirukib 3778801ef5 Ship Gishen B2B institutional portal with polished layout and mock-backed flows.
Deliver role-aware shell (sidebar, breadcrumbs, quick search, tables, detail/create layouts), locale-ready pages, shared backend/feature docs, and Vercel project config so HR, finance, and members can demo against typed mocks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 21:18:23 +03:00

3.1 KiB

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 specs
  • docs/backend/ — entities, endpoints, events, OVERVIEW
  • docs/features/INDEX.md — feature → pages → entities → endpoints
  • docs/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)

  1. Install and authenticate CLI: npm i -g vercel && vercel login
  2. From this repo: vercel link (project name e.g. gishen-b2b)
  3. vercel env pull (optional)
  4. 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.