How webfamily-06/masterhrms works
The repository appears to combine a multi-tenant HRMS with a React client and an Express API, alongside a Laravel HRMS application and a small task-demo package. A typical user flow is to sign in, enter the authenticated workspace, and use domain screens that call tenant-aware API routes; those routes apply authentication and access policy, then use Prisma-backed services and data. The tree also shows payroll, accounting, biometric attendance, and storage capabilities. The README is empty, and unsampled route wiring is not inferred.
Main entry points: api.ts API client · biometric.routes.ts Biometric routes · User.php HR domain models · session.ts Session client
Components 27
React workspace
- Session client
src/lib/session.ts - API client
src/lib/api.ts - Workspace shell
src/routes/_authenticated/_app/route.tsx - CRM pipeline
src/routes/_authenticated/_app/pipeline.tsx - Bank accounts
src/components/accounting/bank-accounts-manager.tsx - Super admin
src/routes/_authenticated/super/route.tsx
Tenant API
- API authentication
server/src/middleware/auth.ts - Biometric routes
server/src/routes/biometric.routes.ts - Accounting routes
server/src/routes/accounting.routes.ts - Workspace policy
server/src/services/workspace-policy.service.ts - Payroll engine
server/src/services/payroll-engine.service.ts - Encrypted storage
server/src/services/storage/local-encrypted-storage.service.ts - ZK device protocol
server/src/services/zk-protocol.ts - Storage types
server/src/services/storage/storage.types.ts
Laravel HRMS
- Laravel middleware setup
hrms-flow/bootstrap/app.php - Laravel sign-in
hrms-flow/app/Http/Controllers/Auth/AuthenticatedSessionController.php - Employee reviews
hrms-flow/app/Http/Controllers/EmployeeReviewController.php - Review cycles
hrms-flow/app/Http/Controllers/ReviewCycleController.php - Payment settings
hrms-flow/app/Http/Controllers/Settings/PaymentSettingController.php - Dynamic storage
hrms-flow/app/Services/DynamicStorageService.php - Storage settings UI
hrms-flow/resources/js/pages/settings/components/storage-settings.tsx - Inertia client entry
hrms-flow/resources/js/app.tsx - Storage config service
hrms-flow/app/Services/StorageConfigService.php
Domain and persistence
- Prisma access
server/src/prisma.ts - HR domain models
hrms-flow/app/Models/User.php - Permission model
hrms-flow/app/Models/Permission.php
Other components
- HRMS user
Connections 24
- HRMS user → Session client: signs in
- Session client → API client: uses
src/lib/session.ts - HRMS user → Workspace shell: opens workspace
- Workspace shell → Session client: checks session
src/routes/_authenticated/_app/route.tsx - CRM pipeline → API client: requests data
src/routes/_authenticated/_app/pipeline.tsx - Bank accounts → API client: requests data
- Super admin → API client: uses API
src/routes/_authenticated/super/route.tsx - API client → API authentication: sends bearer token
- API authentication → Biometric routes: guards routes
server/src/routes/biometric.routes.ts - Biometric routes → Workspace policy: checks capacity
server/src/routes/biometric.routes.ts - Biometric routes → ZK device protocol: pulls device logs
server/src/routes/biometric.routes.ts - Biometric routes → Prisma access: stores punches
server/src/routes/biometric.routes.ts - Accounting routes → Prisma access: queries data
server/src/routes/accounting.routes.ts - Accounting routes → API authentication: uses authentication
server/src/routes/accounting.routes.ts - Encrypted storage → Prisma access: uses database
server/src/services/storage/local-encrypted-storage.service.ts - Encrypted storage → Storage types: uses storage types
server/src/services/storage/local-encrypted-storage.service.ts - Laravel middleware setup → Laravel sign-in: configures routing
- Laravel sign-in → HR domain models: loads user
hrms-flow/app/Http/Controllers/Auth/AuthenticatedSessionController.php - Employee reviews → HR domain models: uses employees
hrms-flow/app/Http/Controllers/EmployeeReviewController.php - Employee reviews → Review cycles: uses review cycle
hrms-flow/app/Http/Controllers/EmployeeReviewController.php - HR domain models → Permission model: references permissions
hrms-flow/app/Models/User.php - Dynamic storage → Storage config service: loads storage config
hrms-flow/app/Services/DynamicStorageService.php - Inertia client entry → Storage settings UI: loads pages
- Payment settings → HR domain models: uses user model
hrms-flow/app/Http/Controllers/Settings/PaymentSettingController.php