User Management Microservice

E-Learning / Corporate Training

PHP 8.1

Migration completed

50%

Faster user operations

SSO

Enterprise SSO integration

Overview

Circusstreet's monolithic PHP application was struggling to meet the demands of enterprise clients requiring SSO integration. I designed and built a new user management microservice from scratch while leading the PHP7 to PHP8.1 migration across the entire platform.

Business Context

Circusstreet provides digital marketing training to enterprise clients including major corporations. Their monolithic PHP application worked well for small clients but couldn't meet enterprise requirements. Large organizations needed Single Sign-On (SSO) integration with their identity providers (Azure AD, Okta), user provisioning via SCIM, and detailed audit logging. The existing tightly-coupled user management code made these features nearly impossible to implement safely.

Challenge

Monolithic application couldn't scale for enterprise clients. User management was tightly coupled and needed extraction into a separate service with SSO support.

  • Tightly coupled user management in legacy monolith
  • Enterprise clients requiring SAML/OAuth2 SSO
  • Outdated PHP7 codebase with security concerns

Solution

We extracted user management into a standalone Symfony microservice with full OAuth2/SAML support, then systematically upgraded all services to PHP8.1.

  • Designed and built user management microservice from scratch
  • Led PHP7 to PHP8.1 migration across all services
  • Implemented OAuth2/SSO for enterprise clients

Approach & Methodology

We took a microservice extraction approach, first identifying the user management bounded context using Event Storming. We designed clean API boundaries and built the new service using Symfony with a hexagonal architecture. The migration happened gradually - new SSO users went through the new service while existing users continued using the monolith. Once stable, we migrated existing users in batches.

Implementation Details

User Management Microservice

Built a new Symfony-based microservice handling all user operations, authentication, and authorization. Implemented clean API boundaries using DDD aggregates.

Enterprise SSO Integration

Implemented full OAuth2 and SAML 2.0 support for enterprise clients, enabling seamless single sign-on integration with Azure AD, Okta, and other identity providers.

Key Decisions

  • Extracted user management as the first microservice to establish patterns and tooling for future extractions
  • Chose Symfony over Laravel for the microservice due to better support for enterprise authentication standards
  • Implemented the PHP8 migration alongside the extraction to avoid doing two risky changes sequentially

Tech Stack

PHP 8.1 Symfony PostgreSQL RabbitMQ OAuth2 Docker

Related Services

The following services were utilized in this project to deliver successful outcomes.

Lessons Learned

  • Enterprise SSO requirements are more complex than they appear - plan for edge cases like SCIM provisioning, JIT user creation, and group syncing
  • PHP8 migration was smoother than expected thanks to PHPStan and Rector - automated tooling is essential for large codebases
  • Having a dedicated user management service enabled features (like user analytics) that would have been impossible in the monolith

Project Information

Timeline

5 months for service + migration

Team

3 developers (I was tech lead)

Results

PHP 8.1

Migration completed

50%

Faster user operations

SSO

Enterprise SSO integration

Have a Similar Challenge?

Let's discuss how I can help your project succeed with proven architecture and AI solutions.