feat: Add Unsplash stock photo integration#55
Open
cominop wants to merge 1 commit into
Open
Conversation
- Add apps/unsplash Django app with search, import, and folder management - Unsplash API client with error handling and attribution - Frontend modal (Alpine.js) for photo search/import in composer - MediaAsset external_id field for tracking stock photo provenance - Workspace integration_settings JSON field for per-workspace config - DRF dependency added for Unsplash REST endpoints - CSP allows Unsplash CDN images via existing https: img-src directive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a self-contained Unsplash stock photo integration to BrightBean Studio, allowing users to search and import photos directly from the composer.
What's included
apps/unsplash/— new Django app with:GET /api/v1/media/unsplash/search/)POST /api/v1/media/unsplash/import/)MediaAsset.external_idfield — tracks stock photo provenance (e.g., Unsplash photo ID)Workspace.integration_settingsJSON field — for per-workspace integration configDependencies
djangorestframeworkto requirements. The plugin uses DRF for its REST views. Happy to rewrite using Django Ninja if you'd prefer consistency — just let me know.Configuration
Requires
UNSPLASH_ACCESS_KEYin.env(free Developer tier is sufficient). Without it, the integration gracefully degrades — the modal renders empty and API endpoints return clear errors.Testing
Screenshots
The integration adds a "Search Unsplash" button next to "Media Library" in the composer toolbar. Clicking it opens a modal with search, pagination, and one-click import with attribution.