Repository navigation
Shared Packages
Ankit Upadhyay edited this page Aug 25, 2026
·
3 revisions
The packages/ workspaces hold code shared across apps, so a type or utility is defined once and imported everywhere. Changing a shared package ripples across the monorepo - see monorepo-ops for the build/validation order.
| Package | Purpose | Notable consumers |
|---|---|---|
database |
Prisma schema, migrations, the Postgres client, and schema-per-tenant provisioning (src/tenant.ts). The schema source of truth. |
backend, developer platform |
fhir |
FHIR R4 converters and compatibility helpers - maps core entities to FHIR resources. | backend, web, mobile |
fhirtypes |
FHIR R4 type definitions. | fhir, types, all apps |
types |
Shared TypeScript form/domain types (appointments, invoices, companions, encounters, forms, and more) and FHIR-adjacent shapes. Published as @yosemite-crew/types. |
web, mobile, backend |
lib |
Shared errors and reusable utilities. | all apps |
auth |
Shared auth helpers used across the auth boundary. | backend, web, mobile |
design-tokens |
Intended shared token layer, but unbuilt and unconsumed: its entry points target a dist/ no workflow builds, and no app source imports it (web declares it as an unused workspace devDependency). The live tokens are in apps/frontend/src/app/globals.css and apps/mobileAppYC/src/theme/colors.ts. A known cleanup item. |
none at runtime |
-
One definition, many clients. FHIR resources and domain types are shared so the web, mobile, and backend can't drift apart on a shape. (The realtime event contract is documented in
docs/guide/realtime-backend.mdrather than a shared package.) See Realtime and Notifications and FHIR and Interoperability. -
databaseis the schema authority. Keeping Prisma schema + migrations + client in one package makes ADR-0001's "Prisma Migrate is the source of truth" enforceable, and hosts the tenant primitive behind ADR-0004. -
design-tokensnever became the styling vocabulary. The package was meant to feed both design systems but has zero runtime consumers; each app's token layer is its own source of truth - see Design System and Tokens.
-
Mocking
@yosemite-crew/typesin frontend tests: spreadjest.requireActual('@yosemite-crew/types')in the mock, orforms.tscrashes at load. See Frontend Testing. -
Worktree validation: bare
npx tsc/eslintfail in a fresh worktree because the Prisma client isn't generated - usepnpm --filter <ws> run type-check/lint. See Getting Started.
Home · Architecture · ADRs · Plans · Roadmap · Contributing · Main repo · DeepWiki · Discord
Yosemite Crew is a product of DuneXploration UG (haftungsbeschränkt). This wiki mirrors the repository; where a page and the repo disagree, the repo wins. See the Wiki Style Guide.
Product & Domain
Architecture
Applications
- Backend — Overview
- Frontend / PIMS Web — Overview
- Mobile — Overview
- Desktop PIMS Shell
- Developer Portal
- SuperAdmin
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Meta
Canonical code & docs: main repo · Auto-generated companion: DeepWiki