← Selected work
Internal production platformInternal production

NexFlow

A lead pipeline platform that replaced conflicting spreadsheets across four business entities with one auditable, role-aware workflow.

RoleSole product engineer
Timeline2024–present
Verified2026-08-11
Session, role, business-unit, department, and field filtering converge before PostgreSQL.

The problem

Marketing and Sales were working from separate Excel files with conflicting versions, weak ownership, and no reliable answer to what happened to a lead.

4 entitiesunified in one pipelineowner-verified evidence
Zero duplicatesreported after REQ-coded intake replaced Excelowner-verified evidence
Hours → minuteslead entry and routing workflowowner-verified evidence

The constraints shaped the system

  • Four entities needed shared infrastructure with isolated operational views.
  • Sensitive Marketing fields could never be sent to Sales clients.
  • Existing Excel history had to migrate without losing auditability.

The engineering decisions

01

Server-side field permissions

Restricted fields are stripped before the response leaves the API, rather than hidden in the browser.

A UI-only permission check would leave sensitive data in network payloads.
02

Atomic REQ identifiers

A transactional sequence table prevents duplicate daily identifiers under concurrent submissions.

MAX + 1 was rejected because concurrent writers could observe the same value.
03

Migration with operational continuity

Column mapping, preview validation, conflict detection, and historical flags let the team move from Excel safely.

The import flow was designed as a controlled workflow, not a one-off script.

Architecture

NexFlow uses a single Next.js application, PostgreSQL, and Prisma. Every protected request crosses session, role, business-unit, department, and field-filter checks before data is returned.

  • JWT session with role and business-unit scope
  • PostgreSQL transactions for conflict-free identifiers
  • Immutable lead history for field-level accountability

Security and reliability

The important security boundary is the API response. A Sales user cannot receive Marketing-only keys, even if they construct a request outside the normal interface. The audit trail records who changed what, when, and from which value.

What I would improve next

The next step is replacing handoff links with a provider adapter that can support the WhatsApp Business API without changing the workflow call sites.

commit_

A curriculum tracker that turns study sessions into commits, progress into a contribution graph, and unfinished learning into a visible completion loop.

Read next