How menendezon/fabrirh works
Fabri RH is an internal HR-management application. The main user workflow is signing in, entering the authenticated workspace, and managing employee records; the README also documents dashboards, contracts and departures, documents, organization charts, and administration. The sampled code confirms authentication gating, the employee-list query/export flow, and API-key validation. Other documented capabilities are represented as product areas, but their internal call relationships are not inferred from unsampled source.
Main entry points: index.tsx Employee directory · employees.ts Employee data access · client.ts Supabase · route.tsx Session and MFA gate
Components 29
Access and workspace
- Sign-in
src/routes/auth.tsx - Session and MFA gate
src/routes/_authenticated/route.tsx - Auth context
src/lib/auth-context.tsx - App shell
src/components/app-shell.tsx - Session expiry
src/lib/session-expiry.ts - Button UI
src/components/ui/button.tsx - Input UI
src/components/ui/input.tsx - Label UI
src/components/ui/label.tsx - Loading and error states
src/components/states.tsx - Branding
src/components/brand.tsx
Employee management
- Employee directory
src/routes/_authenticated/employes/index.tsx - Employee records
src/routes/_authenticated/employes/$employeeId.tsx - Employee data access
src/lib/employees.ts - Employee validation
src/lib/employee-schemas.ts - Employee form elements
src/components/employees/common.tsx
HR operations
- Contracts and departures
src/lib/contracts.ts - Employee documents
src/lib/documents.ts - Organization chart
src/lib/org-chart.ts - Dashboard and metrics
src/lib/dashboard.ts - Performance reviews
src/lib/reviews.ts
Administration and API
- Administration
src/routes/_authenticated/utilisateurs.tsx - Public API routes
src/routes/api/v1/employees/index.tsx - API access service
src/lib/api/server.ts - API key handling
src/lib/api/keys.ts
Data and policy
- Permissions
src/lib/permissions.ts - Roles
src/lib/roles.ts - HR referentials
src/lib/referentials.ts - Supabase
src/integrations/supabase/client.ts
Other components
- HR user
Connections 28
- HR user → Sign-in: signs in
src/routes/auth.tsx - Sign-in → Session and MFA gate: opens session
- Session and MFA gate → Supabase: checks user
src/routes/_authenticated/route.tsx - Session and MFA gate → App shell: renders
src/routes/_authenticated/route.tsx - Session and MFA gate → Auth context: provides auth
src/routes/_authenticated/route.tsx - Employee directory → Employee data access: queries employees
src/routes/_authenticated/employes/index.tsx - Employee data access → Supabase: reads and writes
src/lib/employees.ts - Employee directory → Employee validation: uses validation
src/routes/_authenticated/employes/index.tsx - Employee directory → Employee form elements: renders forms
src/routes/_authenticated/employes/index.tsx - Employee form elements → Employee data access: uses employee data
src/components/employees/common.tsx - HR user → Employee directory: manages staff
README.md - HR user → Employee records: views records
README.md - HR user → Contracts and departures: manages contracts
README.md - HR user → Employee documents: manages documents
README.md - HR user → Organization chart: views organization
README.md - HR user → Dashboard and metrics: reviews dashboard
README.md - HR user → Administration: administers users
README.md - Administration → Permissions: manages access
- HR user → Public API routes: requests API data
README.md - Public API routes → API access service: authenticates request
src/routes/api/v1/employees/index.tsx - API access service → API key handling: validates keys
src/lib/api/server.ts - API access service → Supabase: reads key and logs
src/lib/api/server.ts - Auth context → Roles: loads current user
src/lib/auth-context.tsx - Roles → Supabase: queries roles
src/lib/roles.ts - Permissions → Supabase: checks permissions
src/lib/permissions.ts - Employee data access → HR referentials: uses referentials
src/lib/employees.ts - Employee data access → Employee validation: uses schemas
src/lib/employees.ts - Employee directory → App shell: appears within
src/routes/_authenticated/employes/index.tsx