How milad-mma/faipco-portal works
FAIPCO Portal is an organization-wide HR and employee self-service portal. Users enter through the React PWA, authenticate, and use routed portal features backed by a FastAPI API and PostgreSQL; employee records can also be synchronized from heterogeneous site databases. The README documents additional workflows including notices/payroll, GPS attendance, leave and loan approvals, evaluations, backups, and push notifications. Some feature implementations were not sampled, so their relationships are shown only where the README documents them; source-level links are limited to indexed or excerpted evidence.
Main entry points: main.jsx React portal · auth_service.py Authentication service · sync_service.py Employee sync · App.jsx Portal routes
Components 20
Portal client
- React portal
frontend/src/main.jsx - Portal routes
frontend/src/App.jsx - Session context
frontend/src/context/AuthContext.jsx - API client
frontend/src/api/client.js
API and identity
- API router
backend/app/api/v1/router.py - Authentication API
backend/app/api/v1/endpoints/auth.py - Authentication service
backend/app/services/auth_service.py - Device sessions
backend/app/services/session_service.py
People and operations
- Employee records
backend/app/models/employee.py - HR workflows
backend/app/services - Notices and payroll
backend/app/api/v1/endpoints/notices.py - GPS attendance
backend/app/api/v1/endpoints/attendance.py - Performance evaluation
backend/app/api/v1/endpoints/evaluation_process.py - Office automation
backend/app/api/v1/endpoints/automation.py
Site integrations
- Employee sync
backend/app/sync_engine/sync_service.py - Site databases
Portal platform
- Portal database
backend/app/db/session.py - Backup and recovery
backend/app/api/v1/endpoints/backup.py - Web Push
backend/app/api/v1/endpoints/push.py
Other components
- Employees
Connections 19
- Employees → React portal: uses
README.md - React portal → Portal routes: renders
frontend/src/main.jsx - Portal routes → Session context: guards routes
frontend/src/App.jsx - Session context → API client: requests identity
frontend/src/context/AuthContext.jsx - React portal → API router: calls API
README.md - API router → Authentication API: registers
backend/app/api/v1/router.py - Authentication API → Authentication service: delegates
backend/app/api/v1/endpoints/auth.py - Authentication service → Device sessions: manages sessions
backend/app/services/auth_service.py - Authentication service → Portal database: queries
- Employee sync → Site databases: reads employees
- Employee sync → Employee records: synchronizes
backend/app/sync_engine/sync_service.py - Employee records → Portal database: stored in
backend/app/models/employee.py - Employees → HR workflows: uses
README.md - Employees → Notices and payroll: reads notices
README.md - Employees → GPS attendance: records attendance
README.md - Employees → Performance evaluation: completes evaluations
README.md - Employees → Office automation: submits requests
README.md - Employees → Backup and recovery: uses administration
README.md - Employees → Web Push: receives alerts
README.md