← back to projects
CQRS Portfolio Backend

CQRS Portfolio Backend

GogRPCCQRS

Problem

A single portfolio content API mixed writes and reads on the same models, coupling read scaling to write consistency and making the data layer harder to reason about as the schema evolved.

Solution

Split the service into two independent Go microservices under a CQRS pattern: portfolio-cmd-be owns writes through a base repository layer (create/update/delete) with JWT tokens validated over gRPC against a dedicated auth service, while portfolio-query-be owns reads through its own usecase/handler layer, both serving the same education, project and work-experience domains.

Challenges

Keeping the command and query services aligned on the same domain models without sharing a database layer, and wiring gRPC-based token validation into the command service without coupling it tightly to the auth service internals.

Results

Two independently deployable Go services that decouple write and read paths, letting each scale and evolve on its own schedule.