The FastAPI profile owns every command in local and CI runs. The public portfolio Site keeps its bounded D1 implementation until Python hosting is deliberately added.
System evidence packet · Revision 04
Engineering
record.
One narrow construction workflow, made inspectable from browser intent to business history. This page separates working proof from the architecture proposed for a real authenticated product.
FastAPI command trace · Verified locally
What happens when the field submits to Python
A synthetic request crosses five explicit boundaries. Each one owns a different kind of decision.
- 01
HTTP perimeter
POST /api/demo/tickets
Checks same-origin intent, validates the payload, and requires an idempotency key.Observable proofCross-origin mutations are rejected before application work begins.
- 02
Generated contract
createTicket(OpenAPI command)
The Next.js boundary sends one typed command and the opaque workspace identifier to FastAPI.Observable proofThe committed generated client is checked against the exported OpenAPI document in CI.
- 03
FastAPI application service
draft → submitted → response requested
The state machine permits only explicit transitions and rejects stale or invalid actions.Observable proofThe complete browser workflow runs against Python-owned commands in CI.
- 04
Repository port
mutate one isolated workspace
The process-memory adapter scopes tickets, tokens, retries, and sequence counters to one demo session.Observable proofCross-browser tests prove a scoped link can cross sessions without exposing another workspace.
- 05
Business history
append ticket events
The current state stays convenient to query while meaningful actions remain inspectable.Observable proofActor, time, transition, and human-readable detail travel with the record.
Architecture · Truth before aspiration
Running today. Designed next.
One configuration boundary selects the command owner. A request never writes to both runtimes.
The normalized PostgreSQL schema and isolation tests now run locally and in CI. Repository wiring, OIDC identity, private uploads, and outbox delivery remain explicit next steps.
Lifecycle contract
The UI does not invent status
draftsubmittedField records the requested scope.submittedresponse_requestedSystem issues one scoped response link.response_requestedacknowledged / declinedRequester sees only the safe projection.acknowledgedwork_completedOffice records labor, crew, material, and equipment actuals.work_completedpricedOffice records a proposed amount and basis.pricedapproved / disputedCommercial outcome is added without erasing disagreement.Decision register
Tradeoffs, recorded
Choices are tied to the current portfolio boundary and include an explicit review trigger.
Acknowledgment is not approval
The requester confirms the recorded description. The interface does not claim a signature, final price, or replacement for the parties’ contract.
Ports before providers
Ticket, response, evidence, notification, and packet behavior is expressed as narrow contracts before database or delivery SDKs enter the application.
Bounded D1 for the public demo
Each visitor gets an isolated 24-hour synthetic workspace. This is durable demo state, not the production tenant model.
Commands cross as one boundary
Create, respond, actuals, pricing, outcome, idempotency, transitions, and audit events move together. When FastAPI is configured, write failures stop at that boundary rather than falling through to a second command owner.
Database guardrails before database claims
The PostgreSQL migration is executed against a real database and proves RLS isolation, hashed-token constraints, and immutable events before FastAPI is allowed to select the durable adapter.
Failure ledger
Bad paths have an owner
The demo models failures that reveal architectural behavior without pretending to provide production operations.
Claim ledger
What this build proves—and does not
Recruiter-facing evidence is useful only when demonstrated, designed, and deferred work remain distinguishable.
Server-owned lifecycle
Pure state machine plus route and repository tests.
Visitor isolation
Opaque session cookie, bounded D1 snapshot, and cross-browser E2E coverage.
Requester data minimization
Public routes return a seven-field requester projection.
Real file evidence
R2 is not connected; evidence remains synthetic metadata.
Authenticated organizations
No accounts or production tenant authorization exist in this portfolio build.
FastAPI command ownership
All five commands, idempotency, isolation, audit events, live contract tests, and the full browser workflow.
PostgreSQL schema guardrails
Real migration replay, tenant RLS, hashed-token, and append-only-event integration tests.
Durable FastAPI repository
The Python command service still selects deterministic process memory.
Migration record
Move command truth without splitting it.
- 01
Complete · Contract FastAPI OpenAPI surface and generated TypeScript client.
- 02
Complete · Read path Workspace-scoped office listing through the generated client and BFF.
- 03
Complete · Command path Python owns lifecycle rules, idempotency, workspace isolation, and audit-event creation when configured.
- 04
Complete · Database guardrails Apply PostgreSQL migrations and prove tenant RLS, token hashing, and immutable events.
- 05
Next · Durable repository Replace process memory with transactional PostgreSQL commands before hosting the backend.