June 1, 2023

eProcess

Workflow-Driven Sales Management Platform — configurable multi-step approval flows with an event-sourced backend on PostgreSQL + Marten.

Involvement Details

Stack

Next.js 15 · React 19 · ASP.NET Core 9 · PostgreSQL · Marten (event store)

Event Sourcing Architecture

  • Designed and implemented an event-sourced backend using Marten on PostgreSQL, where all state changes are persisted as immutable domain events rather than mutable rows
  • Aggregates replay from events at runtime, giving the system a full audit trail and the ability to time-travel to any historical state
  • Async projection daemons rebuild read models in the background, keeping query-side views eventually consistent without blocking the write path

Configurable Workflow Engine

  • Built a multi-step workflow engine where admins define steps, field definitions, and transition rules through a configuration UI — no code changes required to ship new approval flows
  • Each workflow instance tracks field values, designer tasks, internal drafts, and approval decisions across an arbitrary number of steps
  • Workflow versions are immutable; in-flight jobs always run against the version they were started on, preventing mid-flight schema drift

Performance & Read Model Optimization

  • Eliminated a 3-hop database query (jobs → steps → assignments) by designing a MultiStream projection that aggregates all dashboard data into a single denormalized document fetch
  • Projection is maintained in real time by an async daemon, so the dashboard always reflects the latest job state without on-demand joins
  • Reduced per-document payload by an estimated 60–85% for complex workflows by replacing embedded step arrays with slim denormalized fields, improving fetch and serialization throughput
  • Maintained backwards compatibility for existing consumers during the optimization refactor

$ ls ./related

More Web Projects

PersonalWeb

Social Media Query App

An interactive app where users can ask questions with two options, and admins respond by selecting the best choice to provide instant clarity and decisions.

PersonalWeb

Memorial Media App

Unites family and friends during crises, celebrating journeys of life by preserving cherished moments.