Components¶
Crate Structure¶
hafiz/
├── crates/
│ ├── hafiz-core/ # Core types
│ ├── hafiz-s3-api/ # S3 API
│ ├── hafiz-storage/ # Storage backends
│ ├── hafiz-metadata/ # Database layer
│ ├── hafiz-auth/ # Authentication
│ ├── hafiz-crypto/ # Encryption
│ ├── hafiz-cluster/ # Clustering
│ ├── hafiz-admin/ # Admin API
│ └── hafiz-cli/ # CLI tool
hafiz-core¶
Foundation crate with shared types:
Bucket,Object,ObjectMetadataHafizError- Error typesConfig- Configuration
hafiz-s3-api¶
HTTP layer using Axum:
- 76+ S3 API endpoints
- XML parsing
- Middleware
hafiz-storage¶
Storage abstraction:
FilesystemStorageS3ProxyStorage
hafiz-metadata¶
Database layer using SQLx:
SqliteRepositoryPostgresRepository
hafiz-auth¶
Authentication:
- AWS Signature V4
- LDAP integration
- Policy evaluation
hafiz-crypto¶
Encryption:
- AES-256-GCM
- Key derivation
- Hashing