mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
✨ 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:
parent
1e025b7e72
commit
c2842e2546
15 changed files with 756 additions and 102 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ export { StorageClient } from './client';
|
|||
export {
|
||||
createStorageClient,
|
||||
getStorageConfig,
|
||||
createManaCoreStorage,
|
||||
createPictureStorage,
|
||||
createChatStorage,
|
||||
createManaDeckStorage,
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue