Skip to content

Hub Worker Sync and Security

hinditutorpoint edited this page Nov 29, 2026 · 1 revision

Hub ↔ Worker Sync & Security

CIMS Pro operates as a restricted LAN worker against the IMS Pro Hub (port 8356).


Table Replication Rules

Pull-Only (ims-pro → cims-pro)

  • Identity & Academics: bussiness, users (filtered to role_id IN (2, 4) — Students & Teachers only), departments, courses, syllabus, batches, labs, theories, practicals, sessions, notifications
  • Student & Fee Data: institute_students, institute_academics, institute_student_fee, institute_payments, institute_certificates, institute_attendance, lab_hour_adjustments
  • Examinations: question_bank, question_options (is_correct stripped on pull), question_courses, question_syllabus, institute_exams, exam_questions, exam_assignments, student_exam_records

Push-Allowed (cims-pro → ims-pro)

  • student_exam_records
  • institute_student_account (student password updates)
  • login_history (student PC session logs & usage_minute)

Excluded (Never Sent to Student PCs)

  • Internal accounting (financial_*), store/POS (institute_products, institute_purchases, institute_sales, institute_stocks), enquiries, kanban_tasks, roles, permissions, faculty, and coaching tables.

Real-Time + Offline Sync Flow

  1. Instant Wake: When Admin updates data in IMS Pro, a sync:wake signal is broadcast over WebSocket (9001).
  2. Background Fallback: CIMS Pro also polls /api/cims/pull every 5 seconds (even on the Login screen) to keep uiMode, exitPassword, student data, and fees current.
  3. Offline Queue (cims_sync_outbox): If the Hub is temporarily offline, student login history and exam submissions queue locally and auto-push when the Hub reconnects.

Fee Due Alerts & Access Control

  • 7 Days Before Due (0 <= diff <= 7): Bilingual (English & Hindi) Fee Payment Alert dialog appears before password entry, signed with By Order / आज्ञा से, {bussiness_name}.
  • Overdue (diff < 0): Login is blocked until fees are recorded in IMS Pro and synced.