How mahah26/globalconnect_backend works
This is an Express API for workforce and employee operations, backed by Supabase. The principal workflow is an authenticated employee or manager request entering the API, passing route-level authorization, and reading or changing workforce records; routes return results to the caller. Distinct capabilities include attendance and summaries, leave, employee administration, progression, messaging, insights, reports, settings, and notifications. The README is empty, so capability and relationship evidence comes from the source index and excerpts; unsampled route details are represented only at subsystem level.
Main entry points: app.ts Express app · supabase.ts Supabase client · attendance.ts Attendance · leave.ts Leave management
Components 23
API entry and security
- Express app
src/app.ts - Auth routes
src/routes/auth.ts - Auth guard
src/middleware/auth.ts
Workforce operations
- Attendance
src/routes/attendance.ts - Attendance summaries
src/routes/attendanceSummary.ts - Leave management
src/routes/leave.ts - Employee management
src/routes/employees.ts - Office locations
src/routes/locations.ts - Progression routes
src/routes/progression.ts - Progress calculations
src/utils/progression.ts
Employee services
- Dashboard
src/routes/dashboard.ts - My profile
src/routes/me.ts - Team chat
src/routes/chat.ts - Notifications
src/routes/notifications.ts - Insights
src/routes/insights.ts - Reports and exports
src/routes/reports.ts - Settings routes
src/routes/settings.ts
Shared services
- Work settings
src/utils/settings.ts - Date utilities
src/utils/dates.ts - Notification delivery
src/utils/notify.ts - Supabase client
src/config/supabase.ts
Other components
- API caller
- Supabase data and auth
Connections 48
- API caller → Express app: sends request
src/app.ts - Express app → Auth routes: mounts auth
src/app.ts - Express app → Attendance: mounts attendance
src/app.ts - Express app → Attendance summaries: mounts summaries
src/app.ts - Express app → Leave management: mounts leave
src/app.ts - Express app → Employee management: mounts employees
src/app.ts - Express app → Office locations: mounts locations
src/app.ts - Express app → Progression routes: mounts progression
src/app.ts - Express app → Dashboard: mounts dashboard
src/app.ts - Express app → My profile: mounts profile
src/app.ts - Express app → Team chat: mounts chat
src/app.ts - Express app → Notifications: mounts notifications
src/app.ts - Express app → Insights: mounts insights
src/app.ts - Express app → Reports and exports: mounts reports
src/app.ts - Express app → Settings routes: mounts settings
src/app.ts - Auth routes → Auth guard: uses guard
src/routes/auth.ts - Attendance → Auth guard: requires auth
src/routes/attendance.ts - Leave management → Auth guard: requires auth
src/routes/leave.ts - Team chat → Auth guard: requires auth
src/routes/chat.ts - Auth guard → Supabase client: uses client
src/middleware/auth.ts - Attendance → Supabase client: uses client
src/routes/attendance.ts - Attendance summaries → Supabase client: uses client
src/routes/attendanceSummary.ts - Auth routes → Supabase client: uses client
src/routes/auth.ts - Leave management → Supabase client: uses client
src/routes/leave.ts - Employee management → Supabase client: uses client
src/routes/employees.ts - Office locations → Supabase client: uses client
src/routes/locations.ts - Progression routes → Supabase client: uses client
src/routes/progression.ts - Dashboard → Supabase client: uses client
src/routes/dashboard.ts - My profile → Supabase client: uses client
src/routes/me.ts - Team chat → Supabase client: uses client
src/routes/chat.ts - Notifications → Supabase client: uses client
src/routes/notifications.ts - Insights → Supabase client: uses client
src/routes/insights.ts - Reports and exports → Supabase client: uses client
src/routes/reports.ts - Settings routes → Supabase client: uses client
src/routes/settings.ts - Supabase client → Supabase data and auth: configures client
src/config/supabase.ts - Auth routes → Supabase data and auth: auth and profiles
src/routes/auth.ts - Attendance → Supabase data and auth: reads and writes
src/routes/attendance.ts - Leave management → Work settings: gets work settings
src/routes/leave.ts - Attendance → Work settings: gets work settings
src/routes/attendance.ts - Attendance summaries → Work settings: uses settings
src/routes/attendanceSummary.ts - Progression routes → Progress calculations: uses calculations
src/routes/progression.ts - Progress calculations → Date utilities: calculates months
src/utils/progression.ts - Progress calculations → Work settings: gets date settings
src/utils/progression.ts - Progress calculations → Supabase client: uses client
src/utils/progression.ts - Attendance → Notification delivery: sends alerts
src/routes/attendance.ts - Leave management → Notification delivery: sends alerts
src/routes/leave.ts - Employee management → Notification delivery: sends alerts
src/routes/employees.ts - Progress calculations → Notification delivery: alerts admins
src/utils/progression.ts