Platform

Platform Architecture

01scale is a set of independent platform services. Apps are assembled from them. This is how it fits together and why I built it this way.

The platform

A service knows nothing about the apps that use it. Upload stores files, not invoices. That is what lets the next app reuse it. How each app uses the services is in Apps Architecture.

Platform Core

The shared components every service is built on, so no service rebuilds them.

The services, one by one

Each link opens the Architecture & System Design section of that module's page. The sections are filled in module by module (story 01SCALE-V1-E0-20).

Identity
Upload
LLM Extraction
Human Review
Payment
Delivery

The three options I compared

Option 1 · Modular monolith

One app, strict boundaries

One deployment and one database, with rules that keep components apart.

Fastest and cheapest, and the right answer for a single app.

Option 2 · Packaged monolith

Separate packages

Each component is its own versioned package, still deployed together.

Better boundaries, but still one release and one runtime.

Option 3 · DistributedChosen

Separate services

Each component is its own service with its own data, contract and release.

My choice. It costs more to build and run, and I accepted that.

Why I chose separate services

The question I asked myself: is 01scale one app, or a platform that many apps consume? For one app I would have chosen option 1. My goal is a platform.

  1. 1
    Components are products, apps are customers

    Identity or Extraction must stand alone, with its own release, demo and documentation. A second app adopts it by calling it, not by being built inside the first app.

  2. 2
    Each component has a long evolution ahead

    The inside gets replaced many times while the contract stays stable. Old and new versions can run side by side so each app moves when it is ready.

  3. 3
    The components do not share one technology

    Extraction becomes Python on AWS Lambda. I made that separation the pattern instead of the exception.

  4. 4
    Identity and Payment deserve hard walls

    They hold the riskiest data, so each has its own data store and its own access rules.

  5. 5
    It shows the real work of a platform

    Contracts, versioning, backward compatibility and service ownership only become real when the components are actually separate.

The cost I accepted

  • More to build before the first app works. I contain it with one service template every service copies.
  • No single transaction across services. I rely on safe-to-repeat calls, events that cannot be lost, and a process record that can resume.
  • Harder debugging. One request ID travels through every service.
  • The reason is reuse and independent evolution, not scale. This is a one-person project with low traffic, and I say so.

How services talk

The app is the conductor. It calls each service in order, and a service reports back when something finishes. Services never call the app's logic and stay unaware of each other.

  1. DocFlow asks Upload to store the file
  2. DocFlow asks Extraction to start a job
  3. Extraction tells DocFlow the job finished
  4. DocFlow asks Review to open a task
  5. DocFlow asks Payment to create an order
  6. Payment tells DocFlow the order was paid
  7. DocFlow asks Delivery to send the email

Data is strongly consistent inside a service and catches up within seconds between services. Where money is involved, the system checks at the moment of use and never guesses.

How each service evolves

Every service starts by wrapping an external cloud service and grows into providing the capability itself. The apps keep calling the same contract throughout.

Identity

  1. AWS Cognito through standard OIDC
  2. Own sessions and account management
  3. Hand-built passwordless: magic links and codes
  4. Passkeys, recovery codes, re-authentication
  5. An identity provider for other apps: SSO, provisioning, roles

LLM Extraction

  1. One model call with a strict schema
  2. Orchestration: multi-step, fan-out, resume
  3. Guardrails: schema, rule checks, source verification
  4. Cost-efficient model routing
  5. Latency management
  6. Logs and observability
  7. LLM-as-judge, compared with human decisions

Decisions at a glance

Architecture
Independent services behind one gateway
Repository
One repository, one folder per service, each with its own pipeline and version
Hosting
One Vercel project per service; Extraction moves to AWS Lambda
Database
One Neon project, a schema and login per service, nothing shared
Communication
The app orchestrates with API calls, all through the gateway; services report completion with signed events, sent only to the app that started the work. Event-driven when the second app arrives
Acting for a person
When no one is signed in, a service gets a 5-minute token for that person from Identity, marked with who is acting
Consistency
Strong inside a service, eventual between services, never optimistic about money
Every service ships
UI components, an API, MCP tools for AI agents, and its own demo page
Read the full architecture document