Repository navigation
Backend Users RBAC Dashboard
User accounts, the organization-membership join that powers role-based access control, and dashboard aggregation. Part of Backend Overview; the authorization model is also covered in Multi-Tenancy and RBAC.
Web and mobile users, the UserOrganization mapping (which user has which role in which org, plus per-user permission grants/revocations and an effective-permission cache), the role/permission vocabulary, workspace context, and dashboard aggregation. Web session and MFA live here too (SuperTokens).
user.router.ts, user-profile.router.ts, user-organization.router.ts, authUserMobile.router.ts, workspace.router.ts, dashboard.router.ts, auth.router.ts (SuperTokens /v1/auth/me + /v1/auth/mfa/*).
web/user.controller.ts, web/user-profile.controller.ts, web/user-organization.controller.ts, app/authUserMobile.controller.ts, web/workspace.controller.ts, web/dashboard.controller.ts, web/mfa.controller.ts.
user.service.ts, user-profile.service.ts, user-organization.service.ts, authUserMobile.service.ts (legacy mobile Cognito verification lives here), workspace.prisma.service.ts, dashboard.service.ts.
Models: user-profile.ts, user-organization.ts, and role-permission.ts — the RBAC source of truth (user account entities live solely in the Prisma schema since PR #1819):
-
RoleCode:
OWNER,ADMIN,SUPERVISOR,VETERINARIAN,TECHNICIAN,ASSISTANT,RECEPTIONIST. -
Permission strings follow
domain:action:scope— e.g.appointments:view:any,appointments:edit:own,billing:edit:limited,inventory:edit:any,labs:view:any,subscription:edit:any,audit:view:any,analytics:view:clinical. -
ROLE_PERMISSIONSis the baseline table each role inherits.
middlewares/rbac.ts is the enforcement layer: withOrgPermissions() resolves the caller's UserOrganization mapping (org id from params / x-org-id header / query / body, injection-safe) and computes effectivePermissions = baseline + extra − revoked; requirePermission(perm | perm[]) enforces (OR semantics). Entity-scoped variants derive the org from a resource id. See Multi-Tenancy and RBAC.
-
MFA is real today:
mfa.controller.ts+ SuperTokens back/v1/auth/mfa/*, part of the auth-hardening direction (Plans: Authentication). - The dashboard service aggregates cross-subsystem metrics for the PMS home; the frontend dashboard renders them.
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