@bizniz/shared

v0.2.0

Published

Shared TypeScript types and API client for BizNiz web, backoffice, and mobile apps.

Downloads

47

Readme

@bizniz/shared

Shared TypeScript types and API client, published privately to npm and consumed by bizniz-web, bizniz-backoffice, and bizniz-mobile so request/response shapes only live in one place.

Note on scope: cross-platform UI component sharing (React web + React Native) is a separate decision — likely React Native Web or a library like Tamagui/NativeBase — and is deliberately not tackled here yet. This package currently only covers types and API client code, which are trivially shareable. Revisit once real screens are being built.

Versioning & publishing

  • Package: @bizniz/shared, published privately (restricted access) under the @bizniz npm org.
  • Semver: bump version in package.json per change; consuming apps pin a version range in their own package.json.
  • One-time setup required before first publish (not done by this scaffold): the bizniz npm org must exist and you must be logged in locally (npm login), and the org's plan must support private packages.
  • To publish: npm run build && npm publish.

Layout

src/types/        shared domain types
src/api-client/   typed HTTP client for bizniz-backend

Status

User type + createApiClient() (create/get user) implemented, matching bizniz-backend's users endpoints. Not published to npm yet — until the bizniz npm org exists, consuming apps depend on it via "@bizniz/shared": "file:../bizniz-shared" (see e.g. bizniz-web's package.json). Switch that to a real published version once publishing is set up.