How karremanoj5599-del/bh-fems works
FEMS is a field employee management system with an admin/employee web application, mobile app shells, and a FastAPI backend. The main workflow is users signing in, opening role-appropriate operational pages, and using the web client’s API layer to reach backend routes and persistent domain data. Operational areas include attendance and site execution, tasks, workforce organization, shifts, leave and expenses, and reporting. Source excerpts confirm authentication, task-page composition, attendance API calls, and backend route registration; several other domain links are documented only by the file structure, so they are not asserted as direct calls.
Main entry points: main.py API application · TasksPage.jsx Task workspace · auth.py Authentication routes · App.jsx Admin web app
Components 24
User clients
- Admin web app
web-admin/src/App.jsx - Task workspace
web-admin/src/pages/tasks/TasksPage.jsx - Task views
web-admin/src/pages/tasks/components - Attendance client
web-admin/src/services/attendanceService.js - HTTP client
web-admin/src/services/api.js - Admin mobile shell
mobile-admin/app/src/main/java/com/bh/fems/admin/MainActivity.kt - Employee mobile shell
mobile-employee/app/src/main/java/com/bh/fems/employee/MainActivity.kt
Identity and access
- Web auth state
web-admin/src/context/AuthContext.jsx - Authentication routes
backend/app/api/auth.py - Token security
backend/app/core/security.py
Field operations
- Attendance routes
backend/app/api/attendance - Task routes
backend/app/api/tasks - Task service
backend/app/services/task_service.py - Site routes
backend/app/api/sites.py - Shift routes
backend/app/api/shifts
Workforce management
- Leave routes
backend/app/api/leaves.py - Expense routes
backend/app/api/expenses.py - People and org routes
backend/app/api - Reporting routes
backend/app/api/reports
Backend platform
- API application
backend/app/main.py - Database sessions
backend/app/core/database.py - Domain models
backend/app/models - SQL database
Other components
- Staff users
Connections 26
- Staff users → Admin web app: use
web-admin/src/App.jsx - Admin web app → Web auth state: provides auth
web-admin/src/App.jsx - Web auth state → HTTP client: requests identity
web-admin/src/context/AuthContext.jsx - Admin web app → Task workspace: routes to
web-admin/src/App.jsx - Task workspace → Task views: renders
web-admin/src/pages/tasks/TasksPage.jsx - Task workspace → Task service: uses
web-admin/src/pages/tasks/TasksPage.jsx - Task workspace → Attendance client: uses
web-admin/src/pages/tasks/TasksPage.jsx - Attendance client → HTTP client: sends requests
web-admin/src/services/attendanceService.js - HTTP client → API application: HTTP requests
- Admin mobile shell → API application: uses API
- Employee mobile shell → API application: uses API
- API application → Authentication routes: registers routes
backend/app/main.py - API application → Attendance routes: registers routes
backend/app/main.py - API application → Task routes: registers routes
backend/app/main.py - API application → Site routes: registers routes
backend/app/main.py - API application → Shift routes: registers routes
backend/app/main.py - API application → Leave routes: registers routes
backend/app/main.py - API application → Expense routes: registers routes
backend/app/main.py - API application → People and org routes: registers routes
backend/app/main.py - API application → Reporting routes: registers routes
backend/app/main.py - Authentication routes → Database sessions: gets session
backend/app/api/auth.py - Authentication routes → Domain models: queries employees
backend/app/api/auth.py - Authentication routes → Token security: uses tokens
backend/app/api/auth.py - Database sessions → SQL database: opens sessions
backend/app/core/database.py - Domain models → SQL database: maps entities
backend/app/models/attendance.py - Task routes → Task service: delegates