feat(auth): add avatar upload with S3/MinIO and subscription plans seed

- Add StorageModule for avatar uploads via S3/MinIO
- Create presigned URL endpoint for direct browser uploads
- Create direct upload endpoint (multipart/form-data)
- Add manacore-storage bucket to shared-storage package
- Add manacore-storage bucket to docker-compose.dev.yml
- Create subscription plans seed script (pnpm db:seed:plans)
- Plans: Free (150 credits), Pro (2000/€9.99/mo), Enterprise (10000/€49/mo)
- Update TODO list with completed tasks
This commit is contained in:
Till-JS 2026-02-13 23:06:24 +01:00
parent 1e025b7e72
commit c2842e2546
15 changed files with 756 additions and 102 deletions

View file

@ -66,6 +66,16 @@ export function createStorageClient(
return new StorageClient(storageConfig, bucketConfig);
}
/**
* Create a storage client for the Mana Core Auth project (avatars, etc.)
*/
export function createManaCoreStorage(publicUrl?: string): StorageClient {
return createStorageClient({
name: BUCKETS.MANACORE,
publicUrl: publicUrl ?? process.env.MANACORE_STORAGE_PUBLIC_URL,
});
}
/**
* Create a storage client for the Picture project
*/

View file

@ -5,6 +5,7 @@ export { StorageClient } from './client';
export {
createStorageClient,
getStorageConfig,
createManaCoreStorage,
createPictureStorage,
createChatStorage,
createManaDeckStorage,

View file

@ -76,6 +76,7 @@ export interface FileInfo {
* Predefined bucket names for each project
*/
export const BUCKETS = {
MANACORE: 'manacore-storage',
PICTURE: 'picture-storage',
CHAT: 'chat-storage',
MANADECK: 'manadeck-storage',