Shared frontend platform
API, design system, authentication, deployment, realtime, offline, i18n, and testing packages.
Package map
| Package | Public contract |
|---|---|
@smartgare/api | HTTP client and generated OpenAPI types |
@smartgare/ui | Semantic tokens and owned shadcn/ui source |
@smartgare/auth | Browser OIDC for supervision and counter |
@smartgare/deployment | Safe configuration exposed to applications |
@smartgare/realtime | SSE subscriptions for live surfaces |
@smartgare/offline | Counter outbox and storage ports |
@smartgare/i18n | French catalog and future Arabic/RTL boundary |
@smartgare/testing | Vitest, MSW, render helpers, and fakes |
@smartgare/config | Shared TypeScript and tooling configuration |
API contract
The backend OpenAPI document generates a committed TypeScript declaration. Builds consume that reviewed contract rather than depending on a live generator.
Features validate required response fields at their server boundary before exposing data to browser routes. Multipart requests preserve browser-generated boundaries and support one authenticated refresh retry.
Design system
@smartgare/ui owns semantic variables and copied shadcn/ui source. It remains
below applications and features in the dependency graph.
Shipped primitives include Button, Input, Label, Textarea, Badge, Card, and Separator. Feature-specific compositions remain with the feature.
Realtime and offline
@smartgare/realtime owns SSE plumbing; business projections stay in features.
@smartgare/offline defines counter-local state and queued-mutation ports. The
existence of the package does not imply that offline selling or the Tauri
storage adapter is shipped.