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
Business apps / Enterprise SaaS
Platform services: reusable, each with its own data
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).
- Upload
- Human Review
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.
- 1Components 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.
- 2Each 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.
- 3The components do not share one technology
Extraction becomes Python on AWS Lambda. I made that separation the pattern instead of the exception.
- 4Identity and Payment deserve hard walls
They hold the riskiest data, so each has its own data store and its own access rules.
- 5It 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.
- DocFlow asks Upload to store the file
- DocFlow asks Extraction to start a job
- Extraction tells DocFlow the job finished
- DocFlow asks Review to open a task
- DocFlow asks Payment to create an order
- Payment tells DocFlow the order was paid
- 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
- AWS Cognito through standard OIDC
- Own sessions and account management
- Hand-built passwordless: magic links and codes
- Passkeys, recovery codes, re-authentication
- An identity provider for other apps: SSO, provisioning, roles
LLM Extraction
- One model call with a strict schema
- Orchestration: multi-step, fan-out, resume
- Guardrails: schema, rule checks, source verification
- Cost-efficient model routing
- Latency management
- Logs and observability
- 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