# Codebase

> How the open-source repository is organized.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://files.docs.sypnia.com/architecture/codebase/

For agents: Files codebase: crates core, objects, tus, s3, transform (libvips), storage (S3-compatible, local), scan (GuardDuty, ClamAV), install (schema), server (binary, Lambda, CLI, MCP); packages/files (@sypnia/files); deploy (compose, AWS template); spec; docs.

```text
sypnia-files/
├── crates/
│   ├── core/        config, project registry, auth (JWKS, keys, S3 signatures), errors, audit
│   ├── objects/     buckets, objects, policies through Postgres, signed URLs
│   ├── tus/         the resumable upload server
│   ├── s3/          the S3-compatible gateway
│   ├── transform/   image transforms (libvips), EXIF removal
│   ├── storage/     backends: S3-compatible, local folder
│   ├── scan/        scanning hooks: GuardDuty events, ClamAV
│   ├── install/     the sypnia_files schema, versioned
│   └── server/      the binary, Lambda adapter, CLI, MCP
├── packages/files/  @sypnia/files (client, server, react, CLI)
├── deploy/          docker-compose, the AWS template
├── spec/            openapi.yaml
└── docs/            ARCHITECTURE.md
```
