How gabriel-oliveira27/fs-escala works
FS Escala Operacional is a multi-branch workforce scheduling and HR application. A branch manager configures staffing and schedules, maintains employee data, and reviews coverage, time banks, leave, and resolutions; regional staff compare branches, while employees use self-service for timekeeping and requests. The Next.js application separates user-facing features, pure scheduling and HR rules, server-side access and actions, and persistence/integrations. The README documents the product capabilities; sampled excerpts show selected auth, API, and repository links, so other connections are omitted or marked unverified rather than inferred as calls.
Main entry points: [filialId] Branch operations · app Next.js application · acoes.ts Server actions · mapa-mensal.ts Monthly schedule map
Components 27
User workflows
- Next.js application
src/app - Branch operations
src/app/f/[filialId] - Regional oversight
src/app/regional - Employee self-service
src/app/meu-ponto - Administration
src/app/desenvolvimento - Mobile app
celular/App.tsx
Scheduling and HR rules
- Schedule rules
src/domain/escalas-especificas.ts - Sunday planning
src/domain/domingos.ts - Time bank
src/domain/banco-horas.ts - Continuity planning
src/domain/continuidade.ts - Monthly schedule map
src/domain/mapa-mensal.ts - Absences and leave
src/domain/afastamentos.ts - Schedule model
src/domain/tipos.ts - Access rules
src/domain/acesso.ts
Server services
- Server actions
src/server/acoes.ts - Session and permissions
src/server/acesso/dal.ts - Session lifecycle
src/server/acesso/sessao.ts - Google sign-in
src/app/auth/google/route.ts - Google callback
src/app/auth/google/callback/route.ts - Data API client
src/server/api-dados/cliente.ts
Persistence and integrations
- Operational repository
src/server/dados/repo.ts - Access repository
src/server/dados/repo-acessos.ts - PostgreSQL
src/server/db/schema.ts - Cloud migration
src/server/nuvem/migracao.ts - ERP integration
src/server/erp/servico.ts - File storage
src/server/arquivos/index.ts
Other components
- Branch workforce
Connections 32
- Branch workforce → Next.js application: uses
README.md - Next.js application → Branch operations: opens branch
README.md - Next.js application → Regional oversight: opens regional view
README.md - Next.js application → Employee self-service: opens self-service
README.md - Next.js application → Administration: opens administration
README.md - Branch workforce → Mobile app: uses
README.md - Branch operations → Server actions: submits changes
- Regional oversight → Server actions: requests reports
- Employee self-service → Server actions: submits requests
- Branch operations → Schedule rules: manages schedules
README.md - Branch operations → Sunday planning: plans Sundays
README.md - Branch operations → Time bank: manages balances
README.md - Branch operations → Continuity planning: plans substitutes
README.md - Branch operations → Monthly schedule map: views month
README.md - Branch operations → Absences and leave: records absences
README.md - Schedule rules → Schedule model: uses model
src/domain/escalas-especificas.ts - Monthly schedule map → Absences and leave: uses leave data
src/domain/mapa-mensal.ts - Monthly schedule map → Sunday planning: uses Sunday rules
src/domain/mapa-mensal.ts - Sunday planning → Schedule model: uses model
src/domain/domingos.ts - Server actions → Session and permissions: checks access
- Google sign-in → Session and permissions: checks current user
src/app/auth/google/route.ts - Google sign-in → Google callback: redirects callback
- Google callback → Access repository: reads and records access
src/app/auth/google/callback/route.ts - Google callback → Session lifecycle: uses session helpers
src/app/auth/google/callback/route.ts - Session and permissions → Session lifecycle: reads session
src/server/acesso/dal.ts - Session lifecycle → Access repository: manages sessions
src/server/acesso/sessao.ts - Operational repository → PostgreSQL: queries and writes
src/server/dados/repo.ts - Access repository → Data API client: dispatches data calls
src/server/repo-acessos.ts - Server actions → Operational repository: persists operations
- Next.js application → Cloud migration: imports legacy data
src/app/api/v1/migracao/route.ts - Branch operations → ERP integration: uses ERP integration
- Branch operations → File storage: serves attachments