Architecture
How Sypnia Files is built: its parts, where Rust runs, and how they connect.
- Your app or a tool calls the Files API with a token, a key or S3 signatures.
- The engine checks the token and runs the policy in Postgres.
- Metadata goes to
sypnia_filesin Postgres; bytes go to S3-compatible storage. - Visitors get files and transforms from the content host through the CDN.
Read this diagram as text
Apps, S3 tools and agents call the Files API. The engine is one Rust binary with an auth module, the object API, the tus upload server, the S3 gateway, the image transformer and the MCP server. It keeps metadata and policies in Postgres and bytes in S3-compatible storage. The content host, behind the CDN, serves public files and image transforms and checks signed URLs.
| Part | Language | Open source |
|---|---|---|
| Files engine: API, tus, S3 gateway, transforms, MCP | Rust (axum, libvips for images) | yes |
@sypnia/files | TypeScript | yes |
| Content edge in Sypnia Cloud | CloudFront + Lambda running the engine’s transform module | the module, yes |
| Console | TypeScript (React) | no |
An upload, a private download and an image transform, call by call.
The sypnia_files schema: buckets, objects, uploads in progress, S3 keys and the functions policies use.
Reference implementation on AWS
Every AWS service Files uses in Sypnia Cloud, and how.
What happens when storage, the database or scanning fails, and how Files grows.
How the open-source repository is organized.