Commit graph

4 commits

Author SHA1 Message Date
Till JS
01c4d3a9d1 feat(storage): cleanup buckets, add file-size validation and bulk delete
- Remove archived LIGHTWRITE and NUTRIPHI from BUCKETS
- Add missing PLANTA and PROJECTDOC buckets (were in Docker init but not in code)
- Add maxSizeBytes option to upload() and uploadMultipart() for size enforcement
- Add deleteMany() with automatic batching (1000 keys per S3 request)
- Add factories for createPlantaStorage() and createProjectDocStorage()
- Update tests (62 passing)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:27:42 +01:00
Till JS
41fbd2f035 feat(storage): improve shared-storage robustness, scalability, and DX
- Fix exists() to only catch 404/NotFound, rethrow real errors
- Add downloadStream() for memory-efficient large file downloads
- Add uploadMultipart() using @aws-sdk/lib-storage for large files
- Add automatic pagination to list() via continuation tokens
- Add CDN URL support (cdnUrl in BucketConfig, getCdnUrl() method)
- Reduce factory boilerplate with generic createStorage() function
- Add MinIO lifecycle rules for tmp/ prefixes (chat 90d, calendar 30d, picture 7d)
- Add vitest setup with 56 tests covering client, factory, and utils

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:52:34 +01:00
Till-JS
1a88dec0a5 🔧 fix(shared-storage): update build configuration for CommonJS
- Change module from ESNext to CommonJS for NestJS compatibility
- Update moduleResolution from bundler to node
- Add build script and dist exports to package.json
- Remove .js extensions from imports for better compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 14:40:55 +01:00
Wuesteon
2cfa09c84d feat(storage): add MinIO local storage and @manacore/shared-storage package
- Add MinIO service to docker-compose.dev.yml with auto-bucket initialization
- Create @manacore/shared-storage package with S3-compatible client
- Add factory functions for each project (Picture, Chat, ManaDeck, etc.)
- Include file utilities (generateFileKey, getContentType, validators)
- Update environment variables for S3/MinIO configuration
- Document storage architecture in CLAUDE.md

Local dev uses MinIO, production will use Hetzner Object Storage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 01:00:42 +01:00