Closure Record: Workspace Modular Monolith

Context

This inquiry began as a practical question:

Is there a lightweight, serverless-friendly backend layer (“X”)
that works cleanly with PostgreSQL and frontend-first development?

The initial scope was technical and comparative:
SQLite vs cloud DBs, BaaS options, thin gateways, authentication methods, and serverless constraints.

However, repeated exploration revealed a pattern:
each candidate solution reduced one form of friction while reintroducing another elsewhere.

The question did not converge through optimization.


Exploration Path (Condensed)

The inquiry proceeded depth-first through several branches:

  • Cloud SQLite / libSQL → Lightweight, but diverged from PostgreSQL tooling
  • Supabase / Hasura → PostgreSQL-native, but operationally heavy and opinionated
  • PostgREST + thin gateway (X) → Architecturally sound, but recreated recurring glue logic
  • Authentication minimization
    • Basic Auth
    • Tokens
    • OTP
    • Passkeys
      → Each step reduced risk but increased structural weight

At each stage, the same tension remained:

Reducing per-application friction increased global complexity.


Structural Inflection Point

Closure emerged not from a new technology, but from reframing the boundary.

Instead of asking:

“What is the ideal X between frontend and PostgreSQL?”

The question shifted to:

“Why is X assumed to be external at all?”

This led to a recognition:

  • The applications shared the same user group
  • Authentication, database access, and deployment concerns were identical
  • Separation was habitual, not structurally required

At this point, further exploration stopped producing new distinctions.

The structure stabilized.


Resulting Architecture

Workspace Modular Monolith (WMM)

A Workspace Modular Monolith is an architectural pattern where:

  • A single deployable application
  • Serves a single, consistent user group
  • Provides multiple applications or tools
  • With shared authentication, database, and infrastructure
  • While preserving modular boundaries at the application level

In practice:

  • One SvelteKit application
  • One authentication flow
  • One PostgreSQL connection
  • Multiple internal apps, grouped by purpose—not by deployment

This eliminated the need for an external “X” entirely.


Why This Was Closure

  • No further backend abstraction changed the structure
  • Authentication choices became implementation details, not design drivers
  • The problem space collapsed from “system design” to “project organization”

At this point, exploration became circular.

That circularity was recognized—not forced—as closure.


Outcome

The result was not a compromise, but a placement:

  • Operational simplicity over architectural purity
  • Shared responsibility over duplicated isolation
  • Explicit modularity without premature service boundaries

The inquiry ended not with a best option,
but with a stable architectural reference point.


Final Note

This closure did not produce a universal pattern.

It produced a situationally inevitable one.

The correct boundary was not between systems,
but around the user workspace itself.

— Closure recorded.