Skip to content
Back to projects
EnterpriseJan 2025 – Present

Bepunct V2 — HR Solution

Second-generation HR management platform with modernized architecture, migrated from MySQL to PostgreSQL with Laravel Octane for high-performance operations.

LaravelLaravel OctanePostgreSQLCloudflareDockerNginx

Context

Bepunct is an employee management system that automatically synchronizes employee status changes across systems for seamless HR management. After several years of operation, the original Bepunct V1 had accumulated technical debt — its MySQL-based architecture struggled with increasingly complex reporting queries, and the traditional PHP request lifecycle created performance bottlenecks during peak HR synchronization periods. The V2 project was a ground-up modernization applying current architectural best practices.

Constraints

  • Migration from legacy Bepunct V1 without disrupting active users and existing HR workflows
  • Backward compatibility for existing integrations with third-party HR and payroll systems
  • Performance improvement targets for growing user base and increased synchronization volume
  • Database migration from MySQL to PostgreSQL requiring careful data mapping and validation
  • Modern security and infrastructure standards expected for a platform handling employee PII

Architecture

Rebuilt on Laravel with Laravel Octane for high-performance request handling, PostgreSQL as the primary data store for improved query capabilities and data integrity, and Cloudflare at the edge for caching, WAF, and DDoS protection.

Backend: Laravel Octane with persistent workers — particularly effective for the frequent, short-lived synchronization API calls that characterize HR data operations. Database: PostgreSQL replacing MySQL — enabling complex aggregation queries for HR reporting, native JSON column support for flexible employee metadata, and stronger transactional integrity. Edge: Cloudflare providing CDN, WAF rules, and DDoS mitigation as the first line of defense.

Key Decisions

  • Laravel Octane adoption: The persistent worker model eliminated the per-request bootstrap overhead that V1 suffered from during high-frequency synchronization operations. For an HR system processing many small, frequent API calls, this directly translated to measurable latency reduction.
  • PostgreSQL over MySQL: Moved from MySQL to PostgreSQL for three specific reasons: better handling of complex reporting queries (HR analytics), native JSON operations for flexible employee record metadata, and stronger data integrity guarantees through proper constraint enforcement on financial and PII data.
  • Cloudflare integration: Added WAF rules and DDoS protection at the edge layer — important for a SaaS platform exposed to the public internet handling sensitive employee data. Edge caching for static assets reduced origin load.
  • Clean-slate rebuild over incremental migration: Rather than progressively refactoring V1, a full rebuild allowed the team to design the data model and API contracts correctly from the start, without being constrained by legacy decisions.

Security & Reliability

  • Cloudflare WAF providing edge-level protection against common attack vectors (OWASP Top 10)
  • Secure handling of employee PII with encryption at rest and in transit
  • Role-based access control for HR administrators, managers, and read-only audit users
  • PostgreSQL constraint enforcement for data integrity on financial and personal records
  • API authentication with token-based authorization for third-party integration endpoints

Execution

  • Designed the modernized V2 architecture and migration strategy
  • Built the new platform on Laravel Octane with PostgreSQL, replacing the legacy MySQL-based system
  • Executed database migration with data validation and integrity checks
  • Integrated Cloudflare for edge caching, WAF, and DDoS protection
  • Produced technical documentation covering architecture decisions and integration specifications

Outcome

  • Modernized HR platform with measurable performance improvements over V1 through Octane's persistent worker model
  • PostgreSQL migration unlocked complex HR analytics and reporting capabilities not feasible on the previous MySQL setup
  • Cloudflare integration improved security posture with WAF and DDoS protection at the edge
  • Clean architecture positioned the platform for long-term growth and easier onboarding of new developers
Bepunct V2 — HR Solution — Hafiq Iqmal — Hafiq Iqmal