Version History
Follow the journey of CGCP Saathi. Track features, stability upgrades, and release updates.
Staff access control and production hardening
Hardens tenant isolation and staff permissions so custom roles, HR, and Accounts follow granted access instead of coarse system-role shortcuts. Print and application downloads stay available to the applicant and authorised staff.
🔐 Access control
- Custom staff roles use the permissions assigned in HRMS rather than inheriting Admin, Accounts, or HRMS access from unrelated keys.
- HR reaches Accounts only when the organisation enables HR acting as accountant. Approving payment advice is limited to Admin, Accountant, or explicit approve permissions.
- Organisation calendar changes require calendar update permission, not view-only access.
🛡️ Application print & tenant routing
- Application PDF print requires a signed link from submit/track, a staff session, or the student who owns the application.
- Internal print jobs use the server PDF engine so Linux production hosts no longer depend on Windows Edge.
Center-Scoped Admin Assistant Role & HRMS Integration
Patch release introducing the Admin Assistant staff role, offering mapped center administrative capabilities, strict zero-deletion boundaries, HRMS addon conditionality, and HR onboarding & payroll support.
👔 Admin Assistant Staff Role & Governance
- Introduced the "Admin Assistant" role categorized under Admin Staff, with administrative operations scoped strictly to their mapped center.
- Enforced zero-deletion rules across UI components and server actions (cannot delete centers, batches, schedules, reports, or records).
- Restricted role availability to tenants with the HRMS Addon enabled.
- Blocked access to Staff Management, HRMS system controls, and Accounts pages while allowing staff onboarding and payroll participation.
- Positioned Admin Assistant above Coordinators in organizational hierarchy views and center node maps.
AI-Powered Selfie Liveness Clock-In Verification
Patch release introducing secure, fail-safe AI liveness detection on selfie check-ins for the trainee and staff portals.
🛡️ AI-Powered Selfie Liveness Detection
- Replaced landmark-based blink verification with a streamlined, model-free camera interface running at 60 FPS.
- Integrated the verifySelfieLivenessWithGeminiAction server action using the project's default gemini-3.1-flash-lite model.
- Implemented automated screen moiré, tablet reflection, and printed-photo spoof detection.
- Enforced a fail-secure verification block: check-ins are strictly blocked on API errors or spoof detection.
HRMS Pillars, Recruitment Pipeline, and Organization Calendar Redesign
Major release consolidating the HRMS architecture with 4 Core Pillar Hubs, a complete Recruitment & Onboarding pipeline, and a fully interactive, automated Organization Calendar.
💼 Human Resource Management System (HRMS) & Onboarding
- Consolidated the HRMS module into 4 Core Pillar Hubs (Onboarding, Attendance, Payroll, Claims) with full backward compatibility for non-HRMS tenants.
- Implemented a robust visual Recruitment Pipeline under the "Hire" tab to track candidates through Stage Transitions (Resume Uploaded, Interview Scheduled, Offer Offered, Onboarded).
- Added candidate document management with resume PDF file uploads, preview facility, and RBAC restrictions.
- Integrated A4 format Rich Text Editors for company policies and offer letter templates with live preview and placeholders insertion.
- Added email notification flows for interviews, offer proposals, document signing requests, credentials generation, and HR alerts.
- Implemented secure candidate digital signing with OTP-based verification for offer acceptance and countersigning.
- Simulated live communication by introducing a real-time auto-refresh polling loop across HRMS and My Portal dashboards.
📅 Organization Calendar & Timetable Integrations
- Redesigned the Organization Calendar with a modern filter header, dialogs for working/holiday declarations, and grouped registries.
- Integrated Nager.Date and Google Official Live Indian Holiday API feeds for automatic holiday fetching with review & accept/reject workflows.
- Enforced Financial/Academic Year (April 1 - March 31) boundaries for holiday registry and calendar settings.
- Linked organization calendar rule sets, holidays, and working days directly to Timetables, scheduling modals, and MT reports verification.
🤖 Saathi AI Copilot & Governance Auditing
- Consolidated the Governance Hub and added Saathi AI copilot with canvas-style inline text editing.
- Enforced Master Trainer report approval hierarchies, IST class hours validation, and calendar awareness rules.
HRMS Executed Document PDF Download Fix
Resolves an issue where executed document PDF downloads were failing with 404 errors due to strict client-side routing interceptions during the server-side generation process.
📄 PDF Document Generation
- Fixed a bug causing executed HRMS documents to download as a 404 page by bypassing client-side authentication redirects during background PDF generation.
- Optimized the PDF generator to correctly identify and connect to the active port in production environments (like Nixpacks/Coolify defaults).
HRMS Automated Onboarding Email and Signing Workflow
Introduced an automated email notification workflow for HRMS onboarding document signing, countersigning requests, and distribution of fully executed documents.
📧 Automated Onboarding Mailers
- Added email notifications sent immediately to newly onboarded staff instructing them to sign their contracts and agreements.
- Implemented automated countersign requests sent to the HR team when staff signs (routing to the Admin team instead if the onboarded staff is an HR member).
- Configured central executed document email broadcast dispatching completed agreements to the Employee, HR, and Admin teams.
Staff Invitation and Welcome Link Fix
Resolves access issues with staff invitations by generating secure password reset tokens and updating links to route to the correct password setup actions instead of broken pages.
🔑 Secured Staff Password Setup
- Fixed welcome/invitation links pointing to a nonexistent /reset-password route by routing to the correct /auth/action URL.
- Implemented secure token generation and database persistence of reset tokens for newly created staff users and approved candidates.
Police Verification Upload and AI Audit Verification Flow
Introduced optional Police Verification document upload during candidate application with a custom warning dialog, added re-upload & feedback loops on the Trainee profile dashboard settings, and integrated the document with the Smart Saathi AI audit engine.
👮 Police Verification Document Upload
- Added optional Police Verification PDF upload field to Step 6 of the Application Wizard.
- Implemented a custom warning dialog notifying the applicant that job placement requires verification, allowing them to proceed or upload immediately.
- Created an upload and review widget in the Trainee dashboard profile settings displaying approved, pending, and flagged document states.
🤖 Smart Saathi AI Document Auditing
- Extended the AI review engine to detect, download, and audit Police Verification documents when present.
- Cleaned up MIME type headers to ensure proper Gemini API compatibility and prevent Bad Request exceptions.
✉️ Verification Transactional Emails
- Implemented confirmation emails when students upload or re-upload documents.
- Added approval and rejection notification emails to candidates with remarks from administrators.
Dynamic Tenant PWA Manifests and Secured Control Panel Routing
A platform security and PWA enhancement patch ensuring dynamic manifest generation for each tenant portal, proper PWA application scope separation, and strict super-admin verification for all Control Panel routes.
📱 Dynamic Tenant PWA & Manifests
- Removed default static manifest that incorrectly loaded the Control Panel app on tenant domains.
- Implemented context-aware dynamic manifest rendering that targets each tenant's branding, colors, logos, and portal links.
- Disabled PWA installs and service worker scripts on the Super Admin Control Panel and Government Portals.
🔒 Secured Control Panel Routing & Access
- Updated router middleware to strictly protect all Control Panel sub-paths, preventing unauthorized access from normal tenant user sessions.
- Enforced email-based checks restricting access to the Super Admin email address (anup.ramprasad@gmail.com).
⚙️ Tenant HRMS Context Fixes
- Fixed fallback tenant resolution where local development domains defaulted to ssvs, allowing successful testing of HRMS, Accounts, and My Portal features.
Automated Multi-Tenant Database Sync in Build Pipeline
A build pipeline optimization automation ensuring all dynamic multi-tenant databases are automatically synchronized and updated with any new database schema modifications upon production deployments.
🔄 Build Pipeline Database Automation
- Integrated automated multi-tenant database synchronization scripts directly into the Next.js production build command (`npm run build`).
- Ensures zero-downtime database schema migration pushes to all registered tenant databases automatically during deployment.
Dynamic Tenant Branding on Email Templates
A platform patch ensuring all email dispatch templates render the dynamic tenant logo, organization name, and footer copyright statements dynamically, removing default platform branding indicators.
📧 Dynamic Email Branding & Logos
- Configured central email dispatch header to dynamically load the active tenant's official logo URL and name.
- Replaced hardcoded platform footer strings across all templates (2FA OTP, reset links, welcome emails, application confirmations, and document requests) with tenant organization details.
- Removed the static CGCP suffix from email sender display names to allow fully customized sender branding.
Role & Report Progression Workflow & Dynamic Tab Rearrangement
A major HRMS update introducing Role & Report Progression workflows for promotion/demotion requests, dynamic tab/page sorting matching operational usage, and onboarding/joining-date alignment checks for selective payroll runs.
📈 Role & Report Progression Workflow
- Implemented multi-step approval workflow for employee promotions and demotions.
- Added request manager allowing HR to select employees, propose new roles, designate reporting managers, enter salary structures, and state promotion reasons.
- Added administrator review gates for approval or rejection (with remarks) and HR processing flow.
🗂️ Strategic Tab Rearrangement
- Optimized sidebar layouts to display HRMS and Accounts sub-menus based on frequency of daily tasks.
- Set default landing tabs to Attendance Register and Onboarding & Exits.
💰 Intelligent Payroll Eligibility
- Enforced strict selective payroll filters matching onboarding status and joining dates (including fallbacks parsing appointment letters).
IST Timezone Enforcement & Hydration Stability
A platform patch enforcing IST timezone across all logs, exporters, and dashboard components, resolving React hydration mismatches on mobile Safari.
⏰ IST Timezone Standardization
- Enforced Indian Standard Time (IST) formatting for all date/time log displays, reports, and digital signatures.
- Fixed date shifts in biometric webhook logs and attendance records when running on UTC servers.
🐛 Mobile Hydration & Stability
- Resolved critical client-side React hydration errors (#418) on iOS Safari across staff dashboard cards and trainee schedule pages.
Crashes Panel Bulk updates, Geolocation & Verification Maps
A stability and feature update extending the control panel crashlytics logging options, adding support for selfie punch GPS geo-mapping, and reverse-geocoding coordinates to street addresses.
🛠️ Crashes Diagnostic Tools & Fatal Rules
- Added multi-selection and bulk status updates for exception logs in the app control panel.
- Restricted automated email alerts to fatal uncaught runtime errors to reduce server admin email warnings.
📍 GPS Location Mapping & Address Resolution
- Added interactive OpenStreetMap geolocation dialogs to inspect employee check-in location map pins.
- Integrated reverse geocoding via Nominatim to display and save street addresses automatically upon selfie clock-in.
- Reorganized the center policy card into a responsive multi-column grid supporting multiple training center configurations cleanly.
🐛 Bug Fixes & Stability
- Fixed a critical React Hydration error (#418) caused by iOS Safari auto-linking dates and phone numbers in the footer.
- Patched a silent memory crash on older iPhones when uploading high-resolution camera photos by capping canvas dimensions.
- Resolved a JavaScript TypeError crash during step navigation in the Apply Form on older mobile browsers unsupported by smooth scrolling.
- Corrected text baseline overlaps and fixed squished image aspect ratios within the dynamically generated PDF User Guide.
Footer Navigation Optimization & Mobile Polish
A minor polish release to optimize the layout responsiveness of footer navigation containers and resolve tab selectors alignment on mobile screens.
🎨 Layout & Navigation Polish
- Optimized footer navigation links spacing, text size, and colors to prevent double-line wrapping on narrow layouts.
- Fixed horizontal alignments and enabled touch side-scrolling for sub-tab lists across HRMS and Accounts screens.
Staff 2FA, HR Security Gates & API Hardening
The standard stable release of the CGCP Saathi platform. Introduces multi-factor login verification for organization staff, enforces administrative signature override locks, and secures all bulk export API channels.
🔐 Multi-Step 2FA Security
- Enforced Two-Factor Authentication (2FA) for all staff login attempts: generates and sends a single-use 6-digit email OTP dynamically if HRMS is enabled for the center.
- Added credentials pre-verification to safeguard pre-auth checks and prevent next-auth authentication loops.
🛡️ HR Signature Restrictions
- Enforced authorization controls blocking HR managers from request-signing or counter-signing their own onboarding/exit forms.
- Required Admin credentials to authorize and sign HR-profile onboarding papers.
🔒 API Access & Data Protection
- Hardened bulk data exports (OJT reports, outreach records, and student registers) to block unauthorized anonymous access.
- Secured file upload pipelines, ID card generators, and database seeding APIs with NextAuth session validation checks.
📋 Onboarding & Document Automation
- Automated overall staff onboarding status calculation dynamically when checklist tasks are updated.
- Integrated A4 margin-optimized printables with text-parsing fallback logic to extract signatures and timestamps directly from legacy OpenSign audit seals.
Baseline Platform Core & Architecture
The foundation build of the application offering multi-center academic batch directories, trainee portals, and dynamic database routing proxies.
🏢 Operations & Student Portals
- Created dynamic database connection proxies to isolate organization records securely.
- Built student portals for daily community outreach visits and on-the-job training logs.