@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@bizniznpm org. - Semver: bump
versioninpackage.jsonper change; consuming apps pin a version range in their ownpackage.json. - One-time setup required before first publish (not done by this
scaffold): the
bizniznpm 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-backendStatus
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.