How suporteeligi-cpu/eligi-fron-tend works
Eligi is a salon and barbershop management web app. A user signs in or registers, the auth hook fetches their account and routes them to onboarding or the dashboard; dashboard areas support scheduling, client management, sales, finance and other business operations. The sampled code shows shared API access and several feature-level data hooks, but most dashboard routes and integrations were not inspected, so their internal connections are omitted. Paths for unsampled capabilities point to exact directories from the tree.
Main entry points: apiClient.ts API client · useFinanceHub.ts Finance overview · useAuth.ts Auth workflow · auth.api.ts Auth requests
Components 23
Identity and access
- Auth workflow
src/hooks/useAuth.ts - Auth requests
src/lib/auth.api.ts - Account types
src/types/auth.types.ts
API platform
- API client
src/lib/apiClient.ts - Session refresh
src/lib/refreshSession.ts - Eligi API
Business operations
- Dashboard
src/app/dashboard/page.tsx - Appointment scheduling
src/features/agenda - Booking details
src/features/booking - Client management
src/features/clients - Service catalog
src/app/dashboard/servicos - Team management
src/app/dashboard/equipe - Stock management
src/features/stock - Client anamnesis
src/features/anamnesis
Finance and insights
- Point of sale
src/app/dashboard/caixa - Finance overview
src/features/finance-hub/useFinanceHub.ts - Expense tracking
src/features/expenses - Reports
src/features/reports - Commissions and payouts
src/features/payouts - Fiscal documents
src/features/fiscal
Business setup
- Business profile
src/features/settings/hooks/useBusinessProfileDraft.ts - Business onboarding
src/app/onboarding
Other components
- Business user
Connections 15
- Business user → Auth workflow: signs in
src/hooks/useAuth.ts - Auth workflow → Auth requests: requests auth
src/hooks/useAuth.ts - Auth requests → API client: sends requests
src/lib/auth.api.ts - Auth requests → Account types: returns account
src/lib/auth.api.ts - Auth workflow → Dashboard: routes by role
src/hooks/useAuth.ts - Auth workflow → Business onboarding: routes new businesses
src/hooks/useAuth.ts - API client → Eligi API: calls API
src/lib/apiClient.ts - API client → Session refresh: refreshes session
src/lib/apiClient.ts - Finance overview → API client: fetches finance data
src/features/finance-hub/useFinanceHub.ts - Finance overview → Reports: reads cash flow
src/features/finance-hub/useFinanceHub.ts - Finance overview → Point of sale: reads sales totals
src/features/finance-hub/useFinanceHub.ts - Finance overview → Commissions and payouts: reads payout data
src/features/finance-hub/useFinanceHub.ts - Expense tracking → API client: loads expenses
src/features/expenses/hooks/useExpenses.ts - Business profile → API client: loads profile
src/features/settings/hooks/useBusinessProfileDraft.ts - Client management → API client: loads client data