Platform
Apps Architecture
An app is a thin conductor. It holds its pages, one process record and the order in which it calls the services. Everything a second app could use lives in a service.
DocFlow First app
A person signs in, uploads a document, Claude extracts the data, a person reviews what is uncertain, pays, and receives the results. See the product vision for the whole journey, and Platform Architecture for the services it calls.
The order it calls the services
Every arrow goes through the gateway at 01scale.com/api.
| # | From | To | What | Carries |
|---|---|---|---|---|
| 1 | DocFlow | Upload | create file, confirm upload | person token |
| 2 | DocFlow | Extraction | start job, held for DocFlow | delegated token |
| 3 | Extraction | Identity | token for the owner | — |
| 4 | Extraction | Upload | fetch the file | delegated token |
| 5 | Extraction | DocFlow | Event: job completed | Signed event |
| 6 | DocFlow | Identity | token for the owner | — |
| 7 | DocFlow | Extraction | read fields | delegated token |
| 8 | DocFlow | Review | create review task, held for DocFlow | delegated token |
| 9 | DocFlow | Extraction | re-check corrected values | person token |
| 10 | DocFlow | Review | complete task | person token |
| 11 | DocFlow | Upload | store result.json and result.csv | person token |
| 12 | DocFlow | Payment | create order at $5.00 | delegated token |
| 13 | Payment | DocFlow | Event: order paid | Signed event |
| 14 | DocFlow | Extraction | release the job's results | delegated token |
| 15 | DocFlow | Review | release the task's fields | delegated token |
| 16 | DocFlow | Delivery | send email | delegated token |
| 17 | Delivery | Identity | look up email | service token |
| 18 | DocFlow | Payment | is it paid? (on every download) | person token |
| 19 | DocFlow | Upload | 5-minute download link | person token |
A person token is the signed-in person's own. A delegated token is a 5-minute token for that person, issued by Identity to the acting service, used when no one is present and always for Payment and Delivery. A service token is the service acting as itself, never for a user's data. Read from the sequence diagram in the architecture document.
The process record
DocFlow keeps one table, docflow.documents, holding only the IDs of records other services own, and a status:
pending_uploaduploadedrejectedextractingextraction_failedneeds_reviewreviewedpaid
DocFlow's own modules
Later apps
Coming Soon...
AI-drafted replies to Google reviews, with its own agent graph (ARCHITECTURE.md §13). Designed; its Architecture & System Design comes with AUTOREP-V1-E1-02.
P2PFlow (Procure-to-Pay)
Coming Soon...
Purchase orders, invoices and payments, reusing the same services.
Order-to-Cash
Coming Soon...
Orders, invoicing and collection, reusing the same services.