aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/routers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* feat: Add collaborative lists (#2146)Mohamed Bassem2025-11-175-272/+2121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: Add collaborative lists backend implementation This commit implements the core backend functionality for collaborative lists, allowing multiple users to share and interact with bookmark lists. Database changes: - Add listCollaborators table to track users with access to lists and their roles (viewer/editor) - Add addedBy field to bookmarksInLists to track who added bookmarks - Add relations for collaborative list functionality Access control updates: - Update List model to support role-based access (owner/editor/viewer) - Add methods to check and enforce permissions for list operations - Update Bookmark model to allow access through collaborative lists - Modify bookmark queries to include bookmarks from collaborative lists List collaboration features: - Add/remove/update collaborators - Get list of collaborators - Get lists shared with current user - Only manual lists can have collaborators tRPC procedures: - addCollaborator: Add a user as a collaborator to a list - removeCollaborator: Remove a collaborator from a list - updateCollaboratorRole: Change a collaborator's role - getCollaborators: Get all collaborators for a list - getSharedWithMe: Get all lists shared with the current user - cloneBookmark: Clone a bookmark to the current user's collection Implementation notes: - Editors can add/remove bookmarks from the list (must own the bookmark) - Viewers can only view bookmarks in the list - Only the list owner can manage collaborators and list metadata - Smart lists cannot have collaborators (only manual lists) - Users cannot edit bookmarks they don't own, even in shared lists * feat: Add collaborative lists frontend UI This commit implements the frontend user interface for collaborative lists, allowing users to view shared bookmarks and manage list collaborators. New pages: - /dashboard/shared: Shows bookmarks from lists shared with the user - Displays bookmarks from all collaborative lists - Uses SharedBookmarks component - Shows empty state when no lists are shared Navigation: - Added "Shared with you" link to sidebar with Users icon - Positioned after "Home" in main navigation - Available in both desktop and mobile sidebar Collaborator management: - ManageCollaboratorsModal component for managing list collaborators - Add collaborators by user ID with viewer/editor role - View current collaborators with their roles - Update collaborator roles inline - Remove collaborators - Shows empty state when no collaborators - Integrated into ListOptions dropdown menu - Accessible via "Manage Collaborators" menu item Components created: - SharedBookmarks.tsx: Server component fetching shared lists/bookmarks - ManageCollaboratorsModal.tsx: Client component with tRPC mutations - /dashboard/shared/page.tsx: Route for shared bookmarks page UI features: - Role selector for viewer/editor permissions - Real-time collaborator list updates - Toast notifications for success/error states - Loading states for async operations - Responsive design matching existing UI patterns Implementation notes: - Uses existing tRPC endpoints (getSharedWithMe, getCollaborators, etc.) - Follows established modal patterns from ShareListModal - Integrates seamlessly with existing list UI - Currently uses user ID for adding collaborators (email lookup TBD) * fix typecheck * add collaborator by email * add shared list in the sidebar * fix perm issue * hide UI components from non list owners * list leaving * fix shared bookmarks showing up in homepage * fix getBookmark access check * e2e tests * hide user specific fields from shared lists * simplify bookmark perm checks * disable editable fields in bookmark preview * hide lists if they don't have options * fix list ownership * fix highlights * move tests to trpc * fix alignment of leave list * make tag lists unclickable * allow editors to remove from list * add a badge for shared lists * remove bookmarks of user when they're removed from a list * fix tests * show owner in the manage collab modal * fix hasCollab * drop shared with you * i18n * beta badge * correctly invalidate caches on collab change * reduce unnecessary changes * Add ratelimits * stop manually removing bookmarks on remove * some fixes * fixes * remove unused function * improve tests --------- Co-authored-by: Claude <noreply@anthropic.com>
* tests: Fix failing testMohamed Bassem2025-11-081-12/+16
|
* feat: Add support for user uploaded files (#2100)Mohamed Bassem2025-11-082-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add user file upload support for bookmarks Add a new "user-uploaded" asset type that allows users to upload and attach their own files to bookmarks from the attachment box in the bookmark preview page. Changes: - Add USER_UPLOADED asset type to database schema - Add userUploaded to zAssetTypesSchema for type safety - Update attachment permissions to allow attaching/detaching user files - Add fileName field to asset schema for displaying custom filenames - Add "Upload File" button in AttachmentBox component - Display actual filename for user-uploaded files - Allow any file type for user uploads (respects existing upload limits) - Add Upload icon for user-uploaded files Fixes #1863 related asset attachment improvements * fix: ensure fileName is returned and remove edit button for user uploads - Fix attachAsset mutation to fetch and return complete asset with fileName instead of just returning the input (which lacks fileName) - Remove replace/edit button for user-uploaded files - users can only delete and re-upload instead - This ensures the filename displays correctly in the UI immediately after upload Fixes fileName propagation issue for user-uploaded assets * fix asset file name * remove filename from attach asset api --------- Co-authored-by: Claude <noreply@anthropic.com>
* fix: browser service connection check using dns instead. Fixes #2080Mohamed Bassem2025-11-021-6/+8
|
* refactor: generalize tidy assets queue into admin maintenance (#2059)Mohamed Bassem2025-10-261-14/+16
| | | | | * refactor: generalize admin maintenance queue * more fixes
* feat: Add source field to track bookmark creation sources (#2037)Mohamed Bassem2025-10-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: Add source field to track bookmark creation sources Add a new 'source' field to the bookmarks table to track where bookmarks were created from. Possible values: api, web, cli, mobile, singlefile, rss. Changes: - Add source field to bookmarks table schema - Update Zod schemas to include source field - Update tRPC createBookmark procedure to store source - Update all callsites to pass appropriate source value: - api: Default to "api" if not provided - singlefile: Set to "singlefile" - rss: Set to "rss" in feedWorker - cli: Set to "cli" - mobile: Set to "mobile" in all mobile app bookmark creation - browser-extension: Set to "web" - web: Set to "web" in all web app bookmark creation - Create migration file for database schema change Fixes #2036 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Mohamed Bassem <MohamedBassem@users.noreply.github.com> * feat: Add extension source type for browser extension - Add 'extension' to bookmark source enum - Update browser extension to use 'extension' instead of 'web' Co-authored-by: Mohamed Bassem <MohamedBassem@users.noreply.github.com> * fix CI * fix CI * fix the migration file * add import source * make source nullish --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Mohamed Bassem <MohamedBassem@users.noreply.github.com>
* feat: Add service dependency checks in the server overview pageMohamed Bassem2025-10-121-0/+116
|
* feat: Revamp import experience (#2001)Mohamed Bassem2025-10-044-1/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: import v2 * remove new session button * don't redirect after import * store and lint to root list * models + tests * redesign the progress * simplify the import session for ow * drop status from session schema * split the import session page * i18n * fix test * remove pagination * fix some colors in darkmode * one last fix * add privacy filter * privacy check * fix interactivity of import progress * fix test
* feat: recursive list delete (#1989)Mohamed Bassem2025-09-282-11/+357
|
* feat: Add tag search and pagination (#1987)Mohamed Bassem2025-09-282-50/+606
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: Add tag search and use in the homepage * use paginated query in the all tags view * wire the load more buttons * add skeleton to all tags page * fix attachedby aggregation * fix loading states * fix hasNextPage * use action buttons for load more buttons * migrate the tags auto complete to the search api * Migrate the tags editor to the new search API * Replace tag merging dialog with tag auto completion * Merge both search and list APIs * fix tags.list * add some tests for the endpoint * add relevance based sorting * change cursor * update the REST API * fix review comments * more fixes * fix lockfile * i18n * fix visible tags
* fix: optimize memory usage of tag listingMohamed Bassem2025-09-211-0/+74
|
* refactor: Move callsites to liteque to be behind a pluginMohamed Bassem2025-09-143-12/+12
|
* feat: Regen api keysMohamed Bassem2025-09-142-1/+64
|
* refactor: strongly type the search plugin interfaceMohamed Bassem2025-09-141-5/+6
|
* fix: fix 5xx on invalid api keyMohamed Bassem2025-09-071-1/+5
|
* fix: fix tag flicker caused by tag sortingMohamed Bassem2025-09-071-4/+8
|
* refactor: Extract quota logic into its own classMohamed Bassem2025-09-061-21/+12
|
* refactor: Move highlights object into modelsMohamed Bassem2025-08-311-131/+17
|
* refactor: Move feed object into modelsMohamed Bassem2025-08-311-94/+15
|
* refactor: Move webhook, users and tags into modelsMohamedBassem2025-08-028-1118/+347
|
* feat: Drop support for time bounded invitationsMohamedBassem2025-08-022-78/+22
|
* refactor: Extract meilisearch as a pluginMohamedBassem2025-07-272-11/+10
|
* fix: Drop legacy container noticeMohamed Bassem2025-07-261-3/+2
|
* fix: Remove bcrypt from the api key validation routeMohamed Bassem2025-07-213-8/+527
|
* fix(test): Fix subscription.testMohamed Bassem2025-07-201-0/+1
|
* fix(stripe): Allow promotion codesMohamed Bassem2025-07-201-0/+1
|
* feat: Allow setting browserless crawling per userMohamed Bassem2025-07-192-1/+13
|
* Revert "fix: Fix the types of the bookmark types in the db query"Mohamed Bassem2025-07-131-3/+3
| | | | This reverts commit 4ba3e8047a5b1f160169617187436c09e91662ec.
* fix: Fix the types of the bookmark types in the db queryMohamed Bassem2025-07-131-3/+3
|
* feat: Add stripe based subscriptionsMohamed Bassem2025-07-134-0/+1312
|
* feat: Add delete account supportMohamed Bassem2025-07-131-1/+52
|
* fix: Drop auth failure loggerMohamed Bassem2025-07-131-21/+8
|
* fix: Add ratelimiting to bookmark recrawl and summarizationMohamed Bassem2025-07-121-1/+15
|
* fix: Prioritize crawling user added links over bulk imports. fixes #1717Mohamed Bassem2025-07-122-22/+55
|
* refactor: Move db interactions into the trpc routesMohamed Bassem2025-07-123-7/+60
|
* feat: Support forget and reset passwordMohamed Bassem2025-07-122-4/+443
|
* feat: Add API ratelimitsMohamed Bassem2025-07-103-2/+62
|
* feat: Add invite user supportMohamed Bassem2025-07-103-0/+940
|
* feat: Add support for email verificationMohamed Bassem2025-07-101-1/+89
|
* feat: Store large html content in the asset dbMohamed Bassem2025-07-061-6/+15
|
* fix(tests): Fix broken user setting testMohamed Bassem2025-07-061-0/+2
|
* feat: Add a new timezone user settingMohamed Bassem2025-07-061-24/+33
|
* feat: Add per user storage quotaMohamed Bassem2025-07-062-0/+6
|
* feat: Add new user stats page. Fixes #1523Mohamed Bassem2025-07-062-1/+552
|
* feat: Add per user bookmark count quotaMohamed Bassem2025-07-044-6/+308
|
* fix(tags): normalise leading hashes in tag names (#1317) (#1351)Mostafa Wahied2025-06-222-3/+40
| | | | | | | | | | | * fix(tags): normalise leading hashes in tag names (#1317) * move the transformation to zod * fix openapi spec --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
* chore: migrate away from eslint to oxlint (#1642)xuatz2025-06-221-1/+1
| | | | | | | * chore: migrate away from eslint to oxlint * revert turbo task name lint * it seems like we can remove the seemingly default globals
* fix: Fix webhook not firing on deletion. Fixes #1613Mohamed Bassem2025-06-211-1/+1
|
* fix: Fix oauth creation failure due to missing UserSettings table. Fixes #1583Mohamed Bassem2025-06-211-12/+34
|
* fix: Use a new public list metadata endpoint for metadata generationMohamed Bassem2025-06-071-1/+23
|