mirror of
https://git.meshkee.com/Meshkee/dashboards.git
synced 2026-08-11 22:30:58 +04:30
Includes business, customer, and super-admin apps with shared packages and production deploy scripts. Co-authored-by: Cursor <cursoragent@cursor.com>
71 lines
1.4 KiB
Markdown
71 lines
1.4 KiB
Markdown
# Meshkee Dashboard Shared Packages
|
|
|
|
Shared code for the three Meshkee admin UIs.
|
|
|
|
## Monorepo layout
|
|
|
|
```
|
|
MeshkeeApp/
|
|
apps/
|
|
super-admin/ # @meshkee/super-admin — port 5174
|
|
business/ # @meshkee/business-dashboard — port 5173
|
|
customer/ # @meshkee/customer-dashboard — port 5175
|
|
packages/
|
|
dashboard-core/ # @meshkee/dashboard-core
|
|
dashboard-ui/ # @meshkee/dashboard-ui
|
|
```
|
|
|
|
## Packages
|
|
|
|
### `@meshkee/dashboard-core`
|
|
- `createApiClient()` — parameterized token keys per app
|
|
- Auth types (`AuthUser`, `LoginResponse`, …)
|
|
- Utils (`cellNumber`, `irtPrice`)
|
|
- Subdomain helpers (`getCustomerDashboardHost`, …)
|
|
- Design tokens CSS (`styles/tokens.css`)
|
|
|
|
### `@meshkee/dashboard-ui`
|
|
- `Breadcrumbs`, `SectionCard`, `Pagination`
|
|
- `ToastProvider` / `useToast`
|
|
- `RouteLoader`
|
|
- `createDomainGuard()` factory
|
|
|
|
## Using in an app
|
|
|
|
Apps in this monorepo declare workspace dependencies:
|
|
|
|
```json
|
|
{
|
|
"dependencies": {
|
|
"@meshkee/dashboard-core": "*",
|
|
"@meshkee/dashboard-ui": "*"
|
|
}
|
|
}
|
|
```
|
|
|
|
Run `npm install` from the **MeshkeeApp** root (not inside the app alone).
|
|
|
|
Import tokens:
|
|
|
|
```css
|
|
@import '@meshkee/dashboard-core/styles/tokens.css';
|
|
```
|
|
|
|
## Migration status
|
|
|
|
| App | Shared packages |
|
|
|-----|-----------------|
|
|
| Customer | ✅ wired |
|
|
| Super Admin | ⏳ pending |
|
|
| Business | ⏳ pending |
|
|
|
|
## Commands
|
|
|
|
From `MeshkeeApp/`:
|
|
|
|
```bash
|
|
npm install
|
|
npm run build:packages
|
|
npm run dev:customer
|
|
```
|