Back to project hub
Project node

TraceFlow Decision Engine

Experimental

A workspace-based decision engine that handles decision state and access control together, recording how authorization models and deployment structure evolve in production.

Workspace access control, decision lifecycle, membership plus access state, Web/API authorization consistency, deployment sequencing

Project website

Project explanation

Overview

TraceFlow is a system for managing decisions at the workspace level. It is closer to a decision engine that handles decision lifecycle and access control together than a simple CRUD app that stores decisions. Beyond feature description, this project records how an authorization model and deployment stability evolve together in an operating system.

Core Concept

Membership alone is not enough to cover authorization requirements in a production environment. TraceFlow separates workspace access into membership plus access_state, and uses a dual access control model that combines Web middleware with API permission validation.

What It Handles

The project covers workspace-level access control, decision lifecycle management, authorization consistency across separated Web and API structures, decision state transitions from draft to proposed, approved, or rejected, owner-based transition rules, membership plus access_state access control, Web middleware as the first gate plus API authorization as final enforcement, and deployment order management when authorization models change in production.

Key Lessons

Decision lifecycle should be handled as a state machine. Access control does not end with membership alone. Middleware is the first gate controlling entry paths, while final authorization validation must be enforced by the API. In Next.js middleware, the built matcher string determines actual behavior, not only the source code. Deployment structure and authorization models are tightly connected, and in production the running build and process state matter more than source code alone.

Operational Notes

A single incorrect middleware matcher escape can leave protected paths uncovered, so .next/server/middleware-manifest.json must be inspected to verify actual matcher behavior. In a systemd environment, port-based kill plus nohup restart can conflict with Restart=always, so process control should be unified through systemd. When introducing access_state, the correct deployment order is DB migration, shared/database build, API deploy, then Web deploy. That order is a runtime contract connecting DB schema, API contract, and Web expectation.

Project metadata

Tags
  • decision-engine
  • workspace
  • access-control
  • membership
  • access-state
  • nextjs
  • deployment
Connected systems
  • Workspace
  • Decision Lifecycle
  • Web Middleware
  • API Authorization
  • Next.js Middleware
  • systemd
  • Runtime Deployment
External links
Latest linked activity

Documented TraceFlow decision engine workspace access control, decision lifecycle, and operational deployment order as a public project node.

Operational history

Recent project stream

View all stream
  • ArchiveRegistered the public TraceFlow Decision Engine project node

    Connected the traceflow-decision-engine repository as the public archive path for a workspace-based decision engine covering state and access control.

    2026-05-22T19:00:00+00:00
  • DecisionAccess control contract: membership plus access state

    Combines membership with access_state for workspace access, applying Web middleware as the first gate and API authorization as the final enforcement point.

    2026-05-22T18:50:00+00:00
  • Implementation logOperational note: runtime contract between authorization model and deployment order

    Records the deployment order for access_state changes because DB schema, API contract, and Web expectations are linked at runtime.

    2026-05-22T18:40:00+00:00

Linked archive records

View all archive records
  • Registered the public TraceFlow Decision Engine project node

    Connected the traceflow-decision-engine repository as the public archive path for a workspace-based decision engine covering state and access control.

    Open
  • Access control contract: membership plus access state

    Combines membership with access_state for workspace access, applying Web middleware as the first gate and API authorization as the final enforcement point.

    Open
  • Operational note: runtime contract between authorization model and deployment order

    Records the deployment order for access_state changes because DB schema, API contract, and Web expectations are linked at runtime.

    Open