How redmonkin/core-hr-hub works
CoreHR Hub is a role-based HR management application. Users authenticate and enter protected pages, then manage employee records and move through leave, attendance, payroll, performance, asset, and document workflows; reporting and notifications support those operations. The frontend uses Supabase for authentication and persistence, with Edge Functions for email and scheduled reminders. The graph follows explicit routing and sampled hook/component interactions where available; broader feature paths and integrations are grounded in the README, so uncertain page-to-hook wiring is not shown.
Main entry points: App.tsx App routing · client.ts Supabase client · functions Notification functions · usePayroll.ts Payroll data
Components 21
Application Access
- App routing
src/App.tsx - Authentication
src/contexts/AuthContext.tsx - Dashboard
src/pages/Index.tsx
People Operations
- Employee management
src/pages/Employees.tsx - Employee records
src/hooks/useEmployees.ts - Employee documents
src/components/documents/EmployeeDocuments.tsx
Time Management
- Leave management
src/pages/Leaves.tsx - Attendance tracking
src/pages/Attendance.tsx
Payroll Performance
- Payroll
src/pages/Payroll.tsx - Payroll data
src/hooks/usePayroll.ts - Salary structures
src/components/payroll/SalaryStructureManager.tsx - Performance reviews
src/pages/Performance.tsx - Goals and reviews
src/hooks/usePerformance.ts - Goal management
src/components/performance/GoalsManager.tsx - Team review management
src/components/performance/TeamReviewsManager.tsx
Data And Messaging
- Supabase client
src/integrations/supabase/client.ts - Supabase services
- Notification functions
supabase/functions - Resend email
Other components
- HR users
- Cron scheduler
Connections 21
- HR users → App routing: uses
- App routing → Authentication: provides auth
- App routing → Dashboard: routes to
- App routing → Employee management: routes to
- App routing → Leave management: routes to
- App routing → Attendance tracking: routes to
- App routing → Payroll: routes to
- App routing → Performance reviews: routes to
- Employee management → Employee records: manages records
- Payroll → Payroll data: manages payroll
- Salary structures → Payroll data: uses payroll data
- Goal management → Goals and reviews: reads and mutates
- Team review management → Goals and reviews: mutates reviews
- Employee records → Supabase client: queries
- Payroll data → Supabase client: queries
- Goals and reviews → Supabase client: queries
- Authentication → Supabase client: auth access
- Supabase client → Supabase services: connects
- Cron scheduler → Notification functions: invokes scheduled
- Notification functions → Supabase services: accesses data
- Notification functions → Resend email: sends email