Add medication Items catalogue, counter POS/QR purchase, profile/login, detail pages, loyalty ledger, Cmd+K nav, KPI strips/charts, avatars, and i18n; document the new APIs and open questions for the shared backend team. Co-authored-by: Cursor <cursoragent@cursor.com>
61 lines
2.0 KiB
Markdown
61 lines
2.0 KiB
Markdown
# Gishen Admin Console
|
|
|
|
Internal ops console for Gishen Pharmacy — Pharmacist, Stock, Procurement, Finance, Marketing, Operations/Dispatch, Super Admin. Built as a React (Vite) SPA with **shadcn/ui**, Gishen branding, and **English / Amharic** i18n.
|
|
|
|
## Stack
|
|
|
|
- React 19 + Vite + TypeScript
|
|
- Tailwind + shadcn-style Radix components
|
|
- Zustand, React Router, Axios-ready, Recharts, Sonner
|
|
- i18next (en / am)
|
|
- Mocks by default (`VITE_USE_MOCKS=true`)
|
|
|
|
## Quick start
|
|
|
|
```bash
|
|
npm install
|
|
npm run dev
|
|
```
|
|
|
|
Demo password for all accounts: `demo123`
|
|
|
|
| Email | Role |
|
|
| --- | --- |
|
|
| admin@gishen.et | Super Admin |
|
|
| pharmacist@gishen.et | Pharmacist (Bole branch) |
|
|
| stock@gishen.et | Stock Manager |
|
|
| procurement@gishen.et | Procurement |
|
|
| finance@gishen.et | Finance |
|
|
| marketing@gishen.et | Marketing Manager |
|
|
| ops@gishen.et | Operations |
|
|
|
|
## Navigation registry
|
|
|
|
`src/config/navigation.ts` is the single source of truth for every navigable page and quick action. The sidebar and the topbar command palette (**⌘K / Ctrl+K**) both read from it, and results are filtered by the signed-in role.
|
|
|
|
**Adding a page? Register it there** alongside its route in `src/app/AppRoutes.tsx` — otherwise it will not show up in the sidebar or in search.
|
|
|
|
## Docs
|
|
|
|
Living backend contract: [`docs/admin-backend-spec.md`](docs/admin-backend-spec.md) — updated whenever modules are finalized.
|
|
|
|
## Deploy
|
|
|
|
- Live: **[https://gishen-admin.vercel.app](https://gishen-admin.vercel.app)** (Vercel project `yaltopiatech/gishen-admin`)
|
|
- `vercel.json` SPA rewrites for React Router
|
|
- Build: `npm run build` → `dist`
|
|
- Git remote: `https://gitea.yaltopia.com/Gishen/Gishen-Admin.git`
|
|
- Redeploy: `npx vercel --prod --yes --scope yaltopiatech` (Gitea is not auto-linked; use CLI or mirror to GitHub for Git integration)
|
|
|
|
Env:
|
|
|
|
```
|
|
VITE_USE_MOCKS=true
|
|
VITE_API_BASE_URL=
|
|
```
|
|
|
|
## Related repos
|
|
|
|
- Gishen-Ecom — customer storefront
|
|
- Gishen-B2B — institutional portal (org self-register UI lives there; Admin creates/approves orgs)
|