[FEAT] Integrate Unsplash and Upload (minio) for images - #15
Merged
martian56 merged 3 commits intoMar 8, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds end-to-end image capabilities (upload to MinIO + serving), Unsplash search proxying, and a “favorite projects” feature across the API and UI to support avatars, cover images, workspace logos, and project icon/cover customization.
Changes:
- Introduces authenticated file upload + file serving endpoints backed by an optional MinIO client.
- Adds Unsplash search proxy endpoint and UI modal for selecting cover images (Unsplash or upload).
- Implements user favorite projects API + UI wiring (sidebar + project list).
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/types/index.ts | Extends User type with coverImageUrl. |
| ui/src/services/workspaceService.ts | Allows updating workspace logo from the UI. |
| ui/src/services/uploadService.ts | Adds UI image upload helper calling /api/upload. |
| ui/src/services/projectService.ts | Extends project update payload with cover/icon fields. |
| ui/src/services/instanceService.ts | Adds Unsplash proxy client method + result typing. |
| ui/src/services/favoriteService.ts | Adds UI client for favorites list/add/remove endpoints. |
| ui/src/pages/SettingsPage.tsx | Integrates cover/avatar/logo upload + project cover/icon modals. |
| ui/src/pages/ProjectsListPage.tsx | Adds favorites UI (star toggle) and cover/icon display on cards. |
| ui/src/lib/utils.ts | Adds getImageUrl helper to resolve relative API image paths. |
| ui/src/contexts/AuthContext.tsx | Maps cover_image from API into UI User. |
| ui/src/components/layout/Sidebar.tsx | Displays workspace logo + user avatar via getImageUrl; filters favorites section by favorite IDs. |
| ui/src/components/UploadImageModal.tsx | New modal for selecting and uploading an image. |
| ui/src/components/ProjectIconModal.tsx | New modal + renderer for choosing emoji or icon/color. |
| ui/src/components/CoverImageModal.tsx | New modal for Unsplash search + upload-based cover selection. |
| ui/src/api/types.ts | Extends API types for workspace logo, project cover/icon fields, and user cover image/avatar updates. |
| api/internal/store/user_favorite.go | Adds persistence operations for favorited projects. |
| api/internal/service/workspace.go | Allows updating workspace logo in service layer. |
| api/internal/service/project.go | Allows updating project cover image + emoji/icon_prop in service layer. |
| api/internal/router/router.go | Wires new upload, Unsplash search, and favorites endpoints; injects optional MinIO client. |
| api/internal/model/user.go | Adds cover_image field mapping on the User model. |
| api/internal/model/project.go | Adds cover_image field mapping on the Project model. |
| api/internal/minio/minio.go | Adds convenience helpers for put/get object in the configured bucket. |
| api/internal/handler/workspace.go | Accepts logo in workspace update endpoint. |
| api/internal/handler/upload.go | New upload + file-serving handler using MinIO. |
| api/internal/handler/project.go | Accepts project cover/icon updates and maps into service update call. |
| api/internal/handler/instance.go | Adds authenticated Unsplash search proxy endpoint. |
| api/internal/handler/favorite.go | Adds list/add/remove favorite project endpoints. |
| api/internal/handler/auth.go | Allows updating avatar/cover image on /users/me/ and returns cover_image in response. |
| api/cmd/api/main.go | Initializes MinIO optionally and injects it into the router. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request introduces several new features and enhancements related to user profile, project, and workspace image handling, as well as new API endpoints for file uploads, Unsplash image search, and user favorite projects. It also integrates MinIO for file storage and updates relevant data models and handlers to support these capabilities.
File Uploads and Image Handling
UploadHandlerwith endpoints to upload images to MinIO and serve files, supporting avatars, cover images, and logos. The MinIO client is now initialized optionally and injected into the router and handlers. (api/internal/handler/upload.go,api/cmd/api/main.go,api/internal/minio/minio.go,api/internal/router/router.go) [1] [2] [3] [4] [5]User), project (Project), and workspace models and update handlers to supportavatar,cover_image, andlogofields, allowing users and projects to have associated images. (api/internal/model/user.go,api/internal/model/project.go,api/internal/handler/auth.go,api/internal/handler/project.go,api/internal/handler/workspace.go) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]API and Integration Enhancements
api/internal/handler/instance.go)User Favorites Feature
FavoriteHandlerand supporting store/service to allow users to list, add, and remove favorite projects via API endpoints. (api/internal/handler/favorite.go,api/internal/router/router.go) [1] [2] [3]Supporting Changes
api/internal/minio/minio.go)api/internal/router/router.go,api/internal/handler/project.go,api/internal/handler/instance.go) [1] [2] [3]These changes collectively provide a robust foundation for handling user and project images, file uploads, and favorites management in the application.
Closes #12