Architecture
How the engine is built, where Rust runs and where the logic lives, how requests flow, what is stored, how it runs on AWS, what happens when something fails, and how it scales.
Sypnia Data is small on purpose: one program and your database. The program, the engine, is written in Rust and keeps nothing between requests: every user, session, key and setting lives in the project’s Postgres. Run one copy or fifty; they agree because the database is the only memory.
- Your app calls the project’s address with a publishable key and the user’s token.
- Agents and services sign in with OAuth and call the same address.
- Auth: sign-up, sign-in, sessions, tokens, e-mails.
- The Data API: a URL becomes one SQL statement, run as the caller’s role.
- Postgres: your tables,
sypnia_auth, and the policies that decide who sees what.
The engine's modules, what each one owns, and the services and libraries around them.
What happens, step by step, in a sign-in, a token refresh, a machine token request and a Data API query.
What the engine stores in your database, table by table, the roles it creates, and how row-level security ties them together.
A reference implementation on AWS, service by service
Every AWS service Sypnia Data uses, what it does, where the Rust runs, its limits, and what it costs at small scale.
What happens, and what you see, when the database, the e-mail provider, a key, a provider or the engine itself fails.
Scaling and connection pooling
How many database connections the engine uses, how to size it, and when to add a pooler.
How the repository is organised, how to build and test it, and where to start reading.
Where Rust runs and where the logic lives
| What | Where | Language |
|---|---|---|
| Checking credentials, issuing and verifying tokens, sessions, e-mails, OAuth, DPoP | the engine | Rust |
| Turning a URL into SQL, running SQL and migrations | the engine | Rust |
| Which rows a caller may see or change | your database, row-level security | SQL policies you write |
| What your app does for a person | your code, with any ORM or none | TypeScript, or anything |
| Sending e-mail, signing with KMS, the address | managed services or your providers | — |
The engine never filters rows itself. That single rule is why the Data API, your server’s ORM and an agent with SQL access all obey the same permissions.