MUST Holdings – Recruitment BPA Data Flow

Business Process Automation Architecture & System Data Flow

Data Source / Storage
Processing / Logic
AI / Intelligence
Communication
Automation / Scheduling
System Overview
Data Sync Flow
AI Screening
Email Pipeline
Automation
Odoo ERP Server hr.applicant · hr.job · stages OdooClient + API XML-RPC · Thread-safe SupabaseSync Odoo → Supabase upsert Supabase PostgreSQL applicants · jobs · stages email_history · sync_log Desktop App (CustomTkinter) Dashboard · Pipeline · Analytics DataCache: auto-refresh 30s AI Screening Service Batch · Retry · Circuit Breaker Claude AI (Sonnet) 5-dim rubric scoring Email Service 5 templates · Batch send Resend API Automation (SSH) Cron: Digest 9AM · Backup 2AM XML-RPC pull sync_all() bulk upsert fast reads screen send emails Claude API write AI scores back crontab mgmt

Click any component to learn more

This diagram shows the complete data flow of the MUST Holdings Recruitment Monitor. Data flows from Odoo ERP through sync layers to Supabase, powering the desktop UI. Claude AI screens resumes, Resend handles email, and SSH cron automates daily tasks.

1

Data Ingestion

Pull recruitment data from Odoo ERP via XML-RPC: applicants, jobs, pipeline stages

XML-RPCOdoo 18
2

Sync & Cache

SupabaseSync upserts data into PostgreSQL. DataCache refreshes every 30s for UI

SupabasePostgreSQL
3

AI Screening

Claude AI scores resumes on 5 dimensions. Results written back to Odoo custom fields

Claude SonnetPydantic
4

Communication

Templated emails sent via Resend API. History tracked in Supabase for audit

ResendHTML Templates
5

Automation

SSH-managed cron: daily HR digest at 9AM, database backup at 2AM

ParamikoCrontab
hr.applicantCandidates + AI fields hr.jobOpen positions hr.recruitment.stagePipeline stages ir.attachmentResume PDFs ODOO ERP OdooClient Thread-safe XML-RPC Connection pooling RLock for concurrency search_read() SupabaseSync 1. _sync_stages() 2. _sync_jobs() 3. _sync_applicants() Denormalize + bulk upsert SUPABASE stages jobs applicants (+ AI fields) sync_log DataCache Background thread · 30s refresh fast reads UI Views Dashboard · Applicants Pipeline · Analytics on_update() Primary direction: Odoo → Supabase (one-way pull)

Data Synchronization Flow

The sync engine pulls data from Odoo ERP via XML-RPC and upserts it into Supabase PostgreSQL. This decouples the UI from Odoo's slow XML-RPC, enabling fast reads. The DataCache refreshes every 30 seconds in a background thread, firing callbacks to update UI views.

  • Stages sync – Pipeline stages with sequence ordering
  • Jobs sync – Open positions with description & requirements
  • Applicants sync – Candidates + denormalized job/stage names + AI fields
  • Audit trail – Every sync operation logged to sync_log table
ir.attachmentPDF Resume files PyMuPDF ExtractPDF → text · max 12KB hr.jobDescription + Requirements ScreeningAgent Job type detection 5-dimension rubric scoring Retry (3x) + Circuit Breaker Tool-use structured output Claude AI claude-sonnet-4 Few-shot calibration record_screening tool ScreeningResult (Pydantic) overall_score: 0–100 recommendation: ADVANCE | HOLD | REJECT strengths[] · concerns[] skills_identified · summary dimension_scores (5 categories) write_ai_score_full() hr.applicant (AI fields) x_ai_score (0-100) x_ai_summary x_ai_recommendation x_ai_strengths · x_ai_concerns Odoo ChatterAudit trail post 5-Dimension Rubric Experience Relevance 35% Skills Match 25% Education 20% Presentation Quality 10% Growth Potential 10%

AI Resume Screening Pipeline

Resumes are extracted from Odoo attachments via PyMuPDF, combined with job context, and sent to Claude AI (Sonnet) for structured scoring. The AI evaluates on 5 weighted dimensions, producing a 0–100 score with actionable recommendations.

  • ADVANCE (≥70) – Strong candidates move forward automatically
  • HOLD (40–69) – Needs HR review before decision
  • REJECT (<40) – Below threshold, archived with rationale
  • Resilience – 3 retries with exponential backoff, circuit breaker after 3 consecutive failures
Email Templates 📋 Interview Invitation 📋 Application Received 📋 Rejection Notice 📋 Stage Advancement 📋 Follow-up HTML + plain-text fallback Recipient Selection Filter by stage / job Email validation (regex) Variable Substitution {candidate_name} {job_title} {stage} {department} EmailService Resend API integration Rate limit: 0.2s / email Resend Delivery From: hello@must-job.com SMTP delivery network Candidate Inbox email_history (Supabase) Status: sent | failed | bounced | delivered record_send() Progress Callback UI progress bar + results

Email Communication Pipeline

HR selects a template and recipients (filtered by stage/job). Variables are substituted, then emails are sent via Resend API with rate limiting. Every send is tracked in Supabase for audit and duplicate prevention.

  • 5 pre-built templates – Interview Invitation, Application Received, Rejection, Stage Advancement, Follow-up
  • Batch send – Process multiple recipients with 0.2s rate limiting
  • Full tracking – email_id, status, error_message, sent_at stored per recipient
Cron Job Editor (UI) Add · Edit · Toggle jobs Cron expression builder SSHManager (Paramiko) 152.42.226.158:22 get/set crontab Server Crontab 0 9 * * * send_daily_digest.py 0 2 * * * backup_database.py 9:00 AM Daily Daily HR Digest KPIs · New applicants Pipeline summary · AI stats Email delivery metrics Supabase Read all tables for report Resend → HR Team nathan@ · sky@ · design@ 2:00 AM Daily Database Backup Docker pg_dump + gzip Retention: 1 daily + 3 weekly Email Notification Success/failure alert automation_log Execution audit trail

Automation & Scheduling

The system manages server-side cron jobs via SSH (Paramiko). Two automated tasks run daily:

  • 9:00 AM – Daily HR Digest: Pulls all data from Supabase, builds HTML report with KPIs, new applicants, pipeline stats, and AI screening metrics. Sent to HR team via Resend.
  • 2:00 AM – Database Backup: Runs pg_dump inside Docker container, compresses with gzip, manages retention (1 daily + 3 weekly), sends success/failure notification.
  • UI Cron Editor: Non-technical HR staff can add/edit/toggle cron jobs without SSH access.