♻️ refactor(storage): unify bucket names and add calendar/contacts

- Rename buckets to consistent {project}-storage pattern
- Add calendar-storage and contacts-storage buckets
- Add createCalendarStorage() and createContactsStorage() factory functions
- Update docker-compose and documentation
This commit is contained in:
Till-JS 2025-12-02 12:59:22 +01:00
parent ef8fd6a101
commit 29aaaec4fa
7 changed files with 70 additions and 26 deletions

View file

@ -105,3 +105,17 @@ export function createNutriPhiStorage(publicUrl?: string): StorageClient {
export function createPresiStorage(): StorageClient {
return createStorageClient({ name: BUCKETS.PRESI });
}
/**
* Create a storage client for the Calendar project
*/
export function createCalendarStorage(): StorageClient {
return createStorageClient({ name: BUCKETS.CALENDAR });
}
/**
* Create a storage client for the Contacts project
*/
export function createContactsStorage(): StorageClient {
return createStorageClient({ name: BUCKETS.CONTACTS });
}

View file

@ -10,6 +10,8 @@ export {
createManaDeckStorage,
createNutriPhiStorage,
createPresiStorage,
createCalendarStorage,
createContactsStorage,
} from './factory.js';
// Utilities

View file

@ -76,11 +76,13 @@ export interface FileInfo {
* Predefined bucket names for each project
*/
export const BUCKETS = {
PICTURE: 'picture-images',
CHAT: 'chat-files',
MANADECK: 'manadeck-assets',
NUTRIPHI: 'nutriphi-meals',
PRESI: 'presi-slides',
PICTURE: 'picture-storage',
CHAT: 'chat-storage',
MANADECK: 'manadeck-storage',
NUTRIPHI: 'nutriphi-storage',
PRESI: 'presi-storage',
CALENDAR: 'calendar-storage',
CONTACTS: 'contacts-storage',
} as const;
export type BucketName = (typeof BUCKETS)[keyof typeof BUCKETS];