How santyx-afk/avtoxisobchidimed works
Dimed Salary is an HR payroll application for managing staff and calculating monthly pay from Hikvision IVMS attendance reports. The main workflow is to sign in, maintain employee terms, import an attendance report, calculate and save a month, then inspect results or history; advances and settings affect payroll calculations. Supabase is the production backend, with browser-local DEMO storage and a separate desktop mode. The README documents additional dashboard, rankings, export, and scheduled agent-upload capabilities; edges for unsampled relationships are limited to those documented or visible in indexed references.
Main entry points: db.js Data access layer · App.jsx Application routes · runCalculation.js Calculation orchestration · Calculate.jsx IVMS report import
Components 25
Access and workspace
- Application routes
src/App.jsx - Sign-in
src/pages/Login.jsx - Authentication
src/lib/auth.jsx
Workforce management
- Employee records
src/pages/Employees.jsx - Rate groups
src/components/RateGroups.jsx
Payroll workflow
- IVMS report import
src/pages/Calculate.jsx - Report file decoding
src/lib/readReportFile.js - Calculation orchestration
src/lib/runCalculation.js - IVMS parsing
src/lib/ivmsParser.js - Salary calculation
src/lib/salaryCalc.js - Advances
src/pages/Advances.jsx - Salary details
src/components/SalaryDetail.jsx - Month locking
src/lib/monthLock.js
Data and integrations
- Data access layer
src/lib/db.js - Supabase database
src/lib/realDb.js - Local demo data
src/lib/mockDb.js - IVMS upload agent
agent/ivms_agent.py - Agent report sync
src/lib/agentStorage.js - Supabase report storage
Reporting and insights
- Dashboard
src/pages/Dashboard.jsx - Monthly history
src/pages/History.jsx - Staff rankings
src/pages/Ratings.jsx - Payroll settings
src/pages/Settings.jsx - Excel export
src/lib/excel.js
Other components
- HR staff
Connections 36
- HR staff → Application routes: uses
- Application routes → Sign-in: routes to
src/App.jsx - Application routes → Dashboard: routes to
src/App.jsx - Application routes → Employee records: routes to
src/App.jsx - Application routes → IVMS report import: routes to
src/App.jsx - Application routes → Advances: routes to
src/App.jsx - Application routes → Monthly history: routes to
src/App.jsx - Application routes → Staff rankings: routes to
src/App.jsx - Application routes → Payroll settings: routes to
src/App.jsx - Sign-in → Authentication: authenticates with
- Authentication → Supabase database: uses auth
src/lib/auth.jsx - Employee records → Data access layer: manages records
src/pages/Employees.jsx - Employee records → Rate groups: opens
src/pages/Employees.jsx - Rate groups → Data access layer: reads settings
src/components/RateGroups.jsx - IVMS report import → Report file decoding: decodes report
src/pages/Calculate.jsx - IVMS report import → Calculation orchestration: processes report
src/pages/Calculate.jsx - Calculation orchestration → IVMS parsing: parses attendance
src/lib/runCalculation.js - Calculation orchestration → Salary calculation: calculates pay
src/lib/runCalculation.js - Calculation orchestration → Data access layer: loads and saves
src/lib/runCalculation.js - IVMS report import → Salary details: shows details
src/pages/Calculate.jsx - Salary details → Data access layer: edits attendance
- Advances → Calculation orchestration: recalculates month
src/pages/Advances.jsx - IVMS report import → Month locking: locks month
src/pages/Calculate.jsx - Month locking → Data access layer: reads settings
src/lib/monthLock.js - Dashboard → Data access layer: reads statistics
src/pages/Dashboard.jsx - Dashboard → Agent report sync: checks agent reports
src/pages/Dashboard.jsx - Monthly history → Data access layer: reads reports
src/pages/History.jsx - Monthly history → Excel export: exports workbook
src/pages/History.jsx - Staff rankings → Data access layer: reads payroll data
- Payroll settings → Data access layer: updates settings
src/pages/Settings.jsx - Data access layer → Supabase database: selects backend
src/lib/db.js - Data access layer → Local demo data: selects backend
src/lib/db.js - IVMS upload agent → Supabase report storage: uploads reports
README.md - Agent report sync → Supabase report storage: lists and downloads
src/lib/agentStorage.js - Agent report sync → Calculation orchestration: processes new reports
src/lib/agentStorage.js - Agent report sync → Data access layer: checks and updates
src/lib/agentStorage.js