Context
Users should be able to favorite projects by clicking a star icon on the project card. Favorited projects sort to the top of any list they appear in.
Desired behavior
Star icon
- Empty star icon on every project card (visible to authenticated users only)
- Clicking toggles favorite status (empty star → filled yellow star, and vice versa)
- Optimistic UI update with rollback on API error
- Favorite status is per-user, per-project
Sorting
- Favorited projects sort to the top within any tab (My Projects, Public, Private, All)
- Within the favorited group, maintain the existing sort order (created_at desc)
- Non-favorited projects follow in the normal order
No separate tab
- Favorites do not get their own tab — they appear within existing tabs with sort priority
- The "My Projects" tab is the natural home for quick access to favorited projects
Implementation
Frontend
- Add star icon to
ProjectCard component
- Call
POST /api/v1/projects/{id}/favorite or DELETE on toggle
- Read
is_favorited from project response to render filled/empty star
- Sort favorited projects to top in the project list
Backend dependency
Related
Context
Users should be able to favorite projects by clicking a star icon on the project card. Favorited projects sort to the top of any list they appear in.
Desired behavior
Star icon
Sorting
No separate tab
Implementation
Frontend
ProjectCardcomponentPOST /api/v1/projects/{id}/favoriteorDELETEon toggleis_favoritedfrom project response to render filled/empty starBackend dependency
Related