How gaberuseff/isnad works
This is a React/TypeScript administrative application with role-based login and separate admin and call-center areas. The main supported workflow is app startup, authentication and role-based routing, then access to employee or user management; employee data operations are exposed through Supabase-backed services. The tree also includes customer and request routes and Supabase user-management functions, but their behavior is not shown in the sampled source. Dashed edges mark those unverified integrations; other links are limited to references visible in excerpts or the source index.
Main entry points: useAuth.ts Auth state · main.tsx App entry · routeTree.gen.ts Route tree · route.tsx Admin area
Components 22
Application Shell
- App entry
src/main.tsx - App providers
src/Providers.tsx - Route tree
src/routeTree.gen.ts - Admin area
src/routes/_authenticated/admin/route.tsx - Call-center area
src/routes/_authenticated/call-center/route.tsx - Shared header
src/layouts/Header.tsx - Admin navigation
src/layouts/Nav.tsx - Query cache
src/lib/queryClient.ts - Theme provider
src/lib/theme.tsx
Authentication
- Login page
src/routes/login/index.tsx - Login form
src/features/auth/components/LoginForm.tsx - Auth state
src/features/auth/hooks/useAuth.ts - Auth API
src/services/apiAuth.ts
Administration
- Employee management
src/features/admin/employees/components/EmployeeLayout.tsx - Employee operations
src/features/admin/employees/hooks - User management
src/features/admin/users/components/UsersLayout.tsx - User operations
src/features/admin/users/hooks
Data Services
- Supabase client
src/services/supabase.ts - Employee API
src/services/apiEmployees.ts - User API
src/services/apiUsers.ts - User functions
supabase/functions
Other components
- Staff user
Connections 26
- Staff user → App entry: opens app
- App entry → App providers: renders
src/main.tsx - App entry → Route tree: configures router
src/main.tsx - App entry → Auth state: loads auth
src/main.tsx - App providers → Query cache: uses cache
src/Providers.tsx - App providers → Theme provider: provides theme
src/Providers.tsx - Route tree → Admin area: routes to
src/routeTree.gen.ts - Route tree → Call-center area: routes to
src/routeTree.gen.ts - Route tree → Login page: routes to
src/routeTree.gen.ts - Login page → Login form: renders
src/routes/login/index.tsx - Login page → Auth state: checks auth
src/routes/login/index.tsx - Auth state → Auth API: loads current user
src/features/auth/hooks/useAuth.ts - Auth API → Supabase client: calls auth and profiles
src/services/apiAuth.ts - Admin area → Auth state: checks role
src/routes/_authenticated/admin/route.tsx - Admin area → Shared header: renders
src/routes/_authenticated/admin/route.tsx - Admin area → Admin navigation: renders
src/routes/_authenticated/admin/route.tsx - Call-center area → Auth state: checks role
src/routes/_authenticated/call-center/route.tsx - Call-center area → Shared header: renders
src/routes/_authenticated/call-center/route.tsx - Shared header → Theme provider: uses toggle
src/layouts/Header.tsx - Employee management → Employee operations: uses operations
- Employee operations → Employee API: calls operations
src/features/admin/employees/hooks/useCreateEmployee.ts - Employee API → Supabase client: reads and writes
src/services/apiEmployees.ts - User management → User operations: uses operations
- User operations → User API: calls operations
src/features/admin/users/hooks/useCreateUser.ts - User API → Supabase client: reads and writes
src/services/apiUsers.ts - User functions → Supabase client: manages accounts