feat: add google drive dam foundation

This commit is contained in:
2026-05-08 11:36:30 -04:00
parent 2eb54b9228
commit 0fbb30bb4f
28 changed files with 3622 additions and 26 deletions

View File

@@ -0,0 +1,56 @@
# Digital Asset Management
## Status
Draft
## Goal
Provide a workspace media library backed by the organization's configured Google Drive.
The DAM is not a standalone storage system in v1. When an organization has Google Drive configured, Google Drive is the backing store for media files and Socialize stores metadata, workflow relationships, revisions, and audit history.
## Backing Store
Google Drive configuration belongs to the organization.
An organization Google Drive configuration includes:
- enabled state
- root folder id
- root folder name
- root folder URL
Workspace media is organized inside the organization Drive root by workspace slug:
```txt
<organization-drive-root>/<workspace-slug>/
```
Each workspace must have a stable slug. Slugs are unique within the owning organization and should not change casually because they map to an external DAM folder.
## Workspace DAM
The workspace DAM view should expose:
- whether Google Drive is configured for the owning organization
- the workspace slug
- the resolved workspace DAM folder name and path
- linked media assets for the workspace
- asset revisions and source references
## Business Rules
- Organization connector settings are managed by users with `ManageConnectors`.
- Workspace slugs are required and unique within an organization.
- Asset metadata remains workspace-scoped.
- Content item assets can point at Google Drive files in the workspace DAM folder.
- Socialize must not claim to upload or sync files until the Google Drive API integration exists.
## Out Of Scope For First Slice
- Google OAuth consent and refresh-token storage.
- Creating folders in Google Drive through the Drive API.
- Uploading files to Google Drive.
- Background Drive synchronization.
- Moving existing files between Drive folders.

View File

@@ -0,0 +1,45 @@
# Task: Add Google Drive backed DAM foundation
## Feature
`docs/FEATURES/digital-asset-management.md`
## Goal
Make the DAM model aware of organization-level Google Drive backing storage and workspace slug folders.
## Scope
- Add organization Google Drive configuration metadata.
- Add a required workspace `Slug`, unique within the owning organization.
- Generate a slug from workspace name during workspace creation.
- Allow workspace managers to update a workspace slug.
- Add DAM metadata to workspace asset responses.
- Add a workspace DAM endpoint that returns backing-store configuration, workspace folder information, and workspace assets.
- Keep actual Google Drive API folder creation, uploads, and sync out of scope.
## Likely Files
- `backend/src/Socialize.Api/Modules/Organizations/`
- `backend/src/Socialize.Api/Modules/Workspaces/`
- `backend/src/Socialize.Api/Modules/Assets/`
- `backend/src/Socialize.Api/Data/AppDbContext.cs`
- `frontend/src/features/content/views/MediaLibraryView.vue`
- `frontend/src/features/content/stores/`
## Validation
```bash
dotnet build backend/Socialize.slnx
dotnet test backend/Socialize.slnx
cd frontend && npm run build
```
## Acceptance Criteria
- [x] Organization responses include Google Drive DAM configuration metadata.
- [x] Organization connector managers can save Google Drive DAM configuration.
- [x] Workspace responses include a stable slug.
- [x] New workspaces receive a unique slug based on the workspace name.
- [x] Workspace DAM data resolves to `<drive-root>/<workspace-slug>`.
- [x] Existing manually linked Google Drive content assets remain supported.