How skaslam1407/saas-hrms-frappe-hrms-sync works
This is a SaaS HRMS-to-Frappe HRMS synchronization service. Users can request a sync through the API, while a daily scheduler provides an automatic trigger; both lead to the sync service, which reads SaaS records and upserts them into Frappe. The workflow covers company and organizational masters, employees, compensation, and optional payroll generation. Mapping functions shape records for Frappe, and the REST client handles target-system operations. Source excerpts show the orchestration and integrations; unsampled implementation details are not inferred beyond documented stages.
Main entry points: sync_service.py Sync Orchestrator · frappe_client.py Frappe REST Client · main.py FastAPI Endpoints · saas_source.py SaaS Adapter
Components 16
Triggers and API
- FastAPI Endpoints
main.py - Daily Scheduler
scheduler.py
Source and Mapping
- SaaS Adapter
saas_source.py - HRMS Records
models.py - Frappe Mappers
mappers.py
Sync Workflows
- Sync Orchestrator
sync_service.py - Organization Masters
sync_service.py - Employee Sync
sync_service.py - Compensation Sync
sync_service.py - Payroll Generation
sync_service.py - Sync Results
models.py
Target Integration
- Frappe REST Client
frappe_client.py - Runtime Settings
config.py
Other components
- SaaS User
- SaaS HRMS
- Frappe HRMS
Connections 23
- SaaS User → FastAPI Endpoints: requests sync
main.py - FastAPI Endpoints → Sync Orchestrator: runs sync
main.py - FastAPI Endpoints → Daily Scheduler: starts scheduler
main.py - Daily Scheduler → Sync Orchestrator: runs daily
scheduler.py - FastAPI Endpoints → Frappe REST Client: checks health
main.py - SaaS Adapter → SaaS HRMS: reads records
saas_source.py - SaaS Adapter → HRMS Records: yields records
saas_source.py - Sync Orchestrator → SaaS Adapter: loads records
sync_service.py - Sync Orchestrator → Organization Masters: syncs masters
sync_service.py - Sync Orchestrator → Employee Sync: syncs employees
sync_service.py - Sync Orchestrator → Compensation Sync: syncs compensation
sync_service.py - Sync Orchestrator → Payroll Generation: optionally runs
sync_service.py - Organization Masters → Frappe Mappers: maps payloads
sync_service.py - Employee Sync → Frappe Mappers: maps payloads
sync_service.py - Compensation Sync → Frappe Mappers: maps payloads
sync_service.py - Organization Masters → Frappe REST Client: upserts masters
sync_service.py - Employee Sync → Frappe REST Client: upserts employees
sync_service.py - Compensation Sync → Frappe REST Client: upserts compensation
sync_service.py - Payroll Generation → Frappe REST Client: creates payroll
sync_service.py - Sync Orchestrator → Sync Results: returns report
sync_service.py - Frappe REST Client → Frappe HRMS: REST operations
frappe_client.py - Frappe REST Client → Runtime Settings: reads credentials
frappe_client.py - SaaS Adapter → Runtime Settings: reads API settings
saas_source.py