Copy disabled (too large)
Download .txt
Showing preview only (10,653K chars total). Download the full file to get everything.
Repository: karakeep-app/karakeep
Branch: main
Commit: fba7108b1e29
Files: 1606
Total size: 9.9 MB
Directory structure:
gitextract_zd_j__6h/
├── .claude/
│ └── settings.json
├── .dockerignore
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ ├── feature_request.yml
│ │ └── question.yml
│ └── workflows/
│ ├── android.yml
│ ├── ci.yml
│ ├── claude.yml
│ ├── cli.yml
│ ├── docker.yml
│ ├── extension.yml
│ ├── ios.yml
│ ├── mcp.yml
│ └── sdk.yml
├── .gitignore
├── .husky/
│ └── pre-commit
├── .npmrc
├── .oxfmtrc.json
├── .oxlintrc.json
├── AGENTS.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── apps/
│ ├── browser-extension/
│ │ ├── .gitignore
│ │ ├── .oxlintrc.json
│ │ ├── components.json
│ │ ├── index.html
│ │ ├── manifest.json
│ │ ├── package.json
│ │ ├── postcss.config.js
│ │ ├── src/
│ │ │ ├── BookmarkDeletedPage.tsx
│ │ │ ├── BookmarkSavedPage.tsx
│ │ │ ├── CustomHeadersPage.tsx
│ │ │ ├── Layout.tsx
│ │ │ ├── Logo.tsx
│ │ │ ├── NotConfiguredPage.tsx
│ │ │ ├── OptionsPage.tsx
│ │ │ ├── SavePage.tsx
│ │ │ ├── SignInPage.tsx
│ │ │ ├── Spinner.tsx
│ │ │ ├── background/
│ │ │ │ ├── background.ts
│ │ │ │ └── protocol.ts
│ │ │ ├── components/
│ │ │ │ ├── BookmarkLists.tsx
│ │ │ │ ├── ListsSelector.tsx
│ │ │ │ ├── NoteEditor.tsx
│ │ │ │ ├── TagList.tsx
│ │ │ │ ├── TagsSelector.tsx
│ │ │ │ └── ui/
│ │ │ │ ├── badge.tsx
│ │ │ │ ├── button.tsx
│ │ │ │ ├── command.tsx
│ │ │ │ ├── dialog.tsx
│ │ │ │ ├── dynamic-popover.tsx
│ │ │ │ ├── input.tsx
│ │ │ │ ├── popover.tsx
│ │ │ │ ├── select.tsx
│ │ │ │ ├── switch.tsx
│ │ │ │ └── textarea.tsx
│ │ │ ├── index.css
│ │ │ ├── main.tsx
│ │ │ ├── utils/
│ │ │ │ ├── ThemeProvider.tsx
│ │ │ │ ├── badgeCache.ts
│ │ │ │ ├── css.ts
│ │ │ │ ├── providers.tsx
│ │ │ │ ├── settings.ts
│ │ │ │ ├── storagePersister.ts
│ │ │ │ ├── trpc.ts
│ │ │ │ ├── type.ts
│ │ │ │ └── url.ts
│ │ │ └── vite-env.d.ts
│ │ ├── tailwind.config.js
│ │ ├── tsconfig.json
│ │ └── vite.config.ts
│ ├── cli/
│ │ ├── .gitignore
│ │ ├── .npmignore
│ │ ├── .oxlintrc.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── commands/
│ │ │ │ ├── admin.ts
│ │ │ │ ├── bookmarks.ts
│ │ │ │ ├── dump.ts
│ │ │ │ ├── lists.ts
│ │ │ │ ├── migrate.ts
│ │ │ │ ├── tags.ts
│ │ │ │ ├── whoami.ts
│ │ │ │ └── wipe.ts
│ │ │ ├── index.ts
│ │ │ ├── lib/
│ │ │ │ ├── globals.ts
│ │ │ │ ├── output.ts
│ │ │ │ └── trpc.ts
│ │ │ └── vite-env.d.ts
│ │ ├── tsconfig.json
│ │ └── vite.config.mts
│ ├── landing/
│ │ ├── .oxlintrc.json
│ │ ├── README.md
│ │ ├── components/
│ │ │ └── ui/
│ │ │ └── button.tsx
│ │ ├── components.json
│ │ ├── index.html
│ │ ├── lib/
│ │ │ └── utils.ts
│ │ ├── package.json
│ │ ├── postcss.config.cjs
│ │ ├── public/
│ │ │ ├── robots.txt
│ │ │ └── sitemap.xml
│ │ ├── src/
│ │ │ ├── App.tsx
│ │ │ ├── Apps.tsx
│ │ │ ├── Homepage.tsx
│ │ │ ├── Navbar.tsx
│ │ │ ├── Pricing.tsx
│ │ │ ├── Privacy.tsx
│ │ │ ├── SEO.tsx
│ │ │ ├── Terms.tsx
│ │ │ ├── components/
│ │ │ │ ├── Banner.tsx
│ │ │ │ ├── CallToAction.tsx
│ │ │ │ ├── FeatureShowcase.tsx
│ │ │ │ ├── FeaturesGrid.tsx
│ │ │ │ ├── Footer.tsx
│ │ │ │ ├── Hero.tsx
│ │ │ │ ├── Layout.tsx
│ │ │ │ ├── OpenSource.tsx
│ │ │ │ └── Platforms.tsx
│ │ │ ├── constants.ts
│ │ │ └── main.tsx
│ │ ├── tailwind.config.ts
│ │ ├── tsconfig.json
│ │ ├── vite-env.d.ts
│ │ └── vite.config.ts
│ ├── mcp/
│ │ ├── .gitignore
│ │ ├── .npmignore
│ │ ├── .oxlintrc.json
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── bookmarks.ts
│ │ │ ├── index.ts
│ │ │ ├── lists.ts
│ │ │ ├── shared.ts
│ │ │ ├── tags.ts
│ │ │ └── utils.ts
│ │ ├── tsconfig.json
│ │ └── vite.config.mts
│ ├── mobile/
│ │ ├── .gitignore
│ │ ├── .npmrc
│ │ ├── .oxlintrc.json
│ │ ├── app/
│ │ │ ├── +not-found.tsx
│ │ │ ├── _layout.tsx
│ │ │ ├── dashboard/
│ │ │ │ ├── (tabs)/
│ │ │ │ │ ├── (highlights)/
│ │ │ │ │ │ ├── _layout.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── (home)/
│ │ │ │ │ │ ├── _layout.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── (lists)/
│ │ │ │ │ │ ├── _layout.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── (settings)/
│ │ │ │ │ │ ├── _layout.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── (tags)/
│ │ │ │ │ │ ├── _layout.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── _layout.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── _layout.tsx
│ │ │ │ ├── archive.tsx
│ │ │ │ ├── bookmarks/
│ │ │ │ │ ├── [slug]/
│ │ │ │ │ │ ├── index.tsx
│ │ │ │ │ │ ├── info.tsx
│ │ │ │ │ │ ├── manage_lists.tsx
│ │ │ │ │ │ └── manage_tags.tsx
│ │ │ │ │ └── new.tsx
│ │ │ │ ├── favourites.tsx
│ │ │ │ ├── lists/
│ │ │ │ │ ├── [slug]/
│ │ │ │ │ │ ├── edit.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── new.tsx
│ │ │ │ ├── search.tsx
│ │ │ │ ├── settings/
│ │ │ │ │ ├── bookmark-default-view.tsx
│ │ │ │ │ ├── reader-settings.tsx
│ │ │ │ │ └── theme.tsx
│ │ │ │ └── tags/
│ │ │ │ └── [slug].tsx
│ │ │ ├── error.tsx
│ │ │ ├── index.tsx
│ │ │ ├── server-address.tsx
│ │ │ ├── sharing.tsx
│ │ │ ├── signin.tsx
│ │ │ └── test-connection.tsx
│ │ ├── app.config.js
│ │ ├── babel.config.js
│ │ ├── components/
│ │ │ ├── CustomHeadersModal.tsx
│ │ │ ├── FullPageError.tsx
│ │ │ ├── Logo.tsx
│ │ │ ├── SplashScreenController.tsx
│ │ │ ├── TailwindResolver.tsx
│ │ │ ├── bookmarks/
│ │ │ │ ├── BookmarkAssetImage.tsx
│ │ │ │ ├── BookmarkAssetView.tsx
│ │ │ │ ├── BookmarkCard.tsx
│ │ │ │ ├── BookmarkHtmlHighlighterDom.tsx
│ │ │ │ ├── BookmarkLinkPreview.tsx
│ │ │ │ ├── BookmarkLinkTypeSelector.tsx
│ │ │ │ ├── BookmarkLinkView.tsx
│ │ │ │ ├── BookmarkList.tsx
│ │ │ │ ├── BookmarkTextMarkdown.tsx
│ │ │ │ ├── BookmarkTextView.tsx
│ │ │ │ ├── BottomActions.tsx
│ │ │ │ ├── NotePreview.tsx
│ │ │ │ ├── PDFViewer.tsx
│ │ │ │ ├── TagPill.tsx
│ │ │ │ └── UpdatingBookmarkList.tsx
│ │ │ ├── highlights/
│ │ │ │ ├── HighlightCard.tsx
│ │ │ │ └── HighlightList.tsx
│ │ │ ├── navigation/
│ │ │ │ └── stack.tsx
│ │ │ ├── reader/
│ │ │ │ └── ReaderPreview.tsx
│ │ │ ├── settings/
│ │ │ │ └── UserProfileHeader.tsx
│ │ │ ├── sharing/
│ │ │ │ ├── ErrorAnimation.tsx
│ │ │ │ ├── LoadingAnimation.tsx
│ │ │ │ └── SuccessAnimation.tsx
│ │ │ └── ui/
│ │ │ ├── ActionButton.tsx
│ │ │ ├── Avatar.tsx
│ │ │ ├── Button.tsx
│ │ │ ├── ChevronRight.tsx
│ │ │ ├── Divider.tsx
│ │ │ ├── EmptyState.tsx
│ │ │ ├── FullPageSpinner.tsx
│ │ │ ├── GroupedList.tsx
│ │ │ ├── Input.tsx
│ │ │ ├── SearchInput/
│ │ │ │ ├── SearchInput.ios.tsx
│ │ │ │ ├── SearchInput.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── types.ts
│ │ │ ├── Skeleton.tsx
│ │ │ ├── Text.tsx
│ │ │ └── Toast.tsx
│ │ ├── eas.json
│ │ ├── globals.css
│ │ ├── index.ts
│ │ ├── lib/
│ │ │ ├── hooks.ts
│ │ │ ├── providers.tsx
│ │ │ ├── readerSettings.tsx
│ │ │ ├── session.ts
│ │ │ ├── settings.ts
│ │ │ ├── upload.ts
│ │ │ ├── useColorScheme.tsx
│ │ │ ├── useMenuIconColors.ts
│ │ │ └── utils.ts
│ │ ├── metro.config.js
│ │ ├── nativewind-env.d.ts
│ │ ├── package.json
│ │ ├── plugins/
│ │ │ ├── camera-not-required.js
│ │ │ ├── network_security_config.xml
│ │ │ └── trust-local-certs.js
│ │ ├── tailwind.config.js
│ │ ├── theme/
│ │ │ ├── colors.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── web/
│ │ ├── .oxlintrc.json
│ │ ├── @types/
│ │ │ └── i18next.d.ts
│ │ ├── README.md
│ │ ├── app/
│ │ │ ├── admin/
│ │ │ │ ├── admin_tools/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── background_jobs/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── layout.tsx
│ │ │ │ ├── overview/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ └── users/
│ │ │ │ └── page.tsx
│ │ │ ├── api/
│ │ │ │ ├── [[...route]]/
│ │ │ │ │ └── route.ts
│ │ │ │ ├── auth/
│ │ │ │ │ └── [...nextauth]/
│ │ │ │ │ └── route.tsx
│ │ │ │ └── bookmarks/
│ │ │ │ └── export/
│ │ │ │ └── route.tsx
│ │ │ ├── check-email/
│ │ │ │ └── page.tsx
│ │ │ ├── dashboard/
│ │ │ │ ├── @modal/
│ │ │ │ │ ├── (.)preview/
│ │ │ │ │ │ └── [bookmarkId]/
│ │ │ │ │ │ └── page.tsx
│ │ │ │ │ ├── [...catchAll]/
│ │ │ │ │ │ └── page.tsx
│ │ │ │ │ └── default.tsx
│ │ │ │ ├── archive/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── bookmarks/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── cleanups/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── error.tsx
│ │ │ │ ├── favourites/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── feeds/
│ │ │ │ │ └── [feedId]/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── highlights/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── layout.tsx
│ │ │ │ ├── lists/
│ │ │ │ │ ├── [listId]/
│ │ │ │ │ │ └── page.tsx
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── not-found.tsx
│ │ │ │ ├── preview/
│ │ │ │ │ └── [bookmarkId]/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── search/
│ │ │ │ │ └── page.tsx
│ │ │ │ └── tags/
│ │ │ │ ├── [tagId]/
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── forgot-password/
│ │ │ │ └── page.tsx
│ │ │ ├── invite/
│ │ │ │ └── [token]/
│ │ │ │ └── page.tsx
│ │ │ ├── layout.tsx
│ │ │ ├── logout/
│ │ │ │ └── page.tsx
│ │ │ ├── page.tsx
│ │ │ ├── public/
│ │ │ │ ├── layout.tsx
│ │ │ │ └── lists/
│ │ │ │ └── [listId]/
│ │ │ │ ├── not-found.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── reader/
│ │ │ │ ├── [bookmarkId]/
│ │ │ │ │ └── page.tsx
│ │ │ │ └── layout.tsx
│ │ │ ├── reset-password/
│ │ │ │ └── page.tsx
│ │ │ ├── settings/
│ │ │ │ ├── ai/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── api-keys/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── assets/
│ │ │ │ │ ├── layout.tsx
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── backups/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── broken-links/
│ │ │ │ │ ├── layout.tsx
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── feeds/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── import/
│ │ │ │ │ ├── [sessionId]/
│ │ │ │ │ │ └── page.tsx
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── info/
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── layout.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ ├── rules/
│ │ │ │ │ ├── layout.tsx
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── stats/
│ │ │ │ │ ├── layout.tsx
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── subscription/
│ │ │ │ │ └── page.tsx
│ │ │ │ └── webhooks/
│ │ │ │ └── page.tsx
│ │ │ ├── signin/
│ │ │ │ └── page.tsx
│ │ │ ├── signup/
│ │ │ │ └── page.tsx
│ │ │ └── verify-email/
│ │ │ └── page.tsx
│ │ ├── components/
│ │ │ ├── DemoModeBanner.tsx
│ │ │ ├── KarakeepIcon.tsx
│ │ │ ├── admin/
│ │ │ │ ├── AddUserDialog.tsx
│ │ │ │ ├── AdminCard.tsx
│ │ │ │ ├── AdminNotices.tsx
│ │ │ │ ├── BackgroundJobs.tsx
│ │ │ │ ├── BasicStats.tsx
│ │ │ │ ├── BookmarkDebugger.tsx
│ │ │ │ ├── CreateInviteDialog.tsx
│ │ │ │ ├── InvitesList.tsx
│ │ │ │ ├── InvitesListSkeleton.tsx
│ │ │ │ ├── ResetPasswordDialog.tsx
│ │ │ │ ├── ServiceConnections.tsx
│ │ │ │ ├── UpdateUserDialog.tsx
│ │ │ │ ├── UserList.tsx
│ │ │ │ └── UserListSkeleton.tsx
│ │ │ ├── dashboard/
│ │ │ │ ├── BulkBookmarksAction.tsx
│ │ │ │ ├── EditableText.tsx
│ │ │ │ ├── ErrorFallback.tsx
│ │ │ │ ├── GlobalActions.tsx
│ │ │ │ ├── SortOrderToggle.tsx
│ │ │ │ ├── UploadDropzone.tsx
│ │ │ │ ├── ViewOptions.tsx
│ │ │ │ ├── bookmarks/
│ │ │ │ │ ├── AssetCard.tsx
│ │ │ │ │ ├── BookmarkActionBar.tsx
│ │ │ │ │ ├── BookmarkCard.tsx
│ │ │ │ │ ├── BookmarkFormattedCreatedAt.tsx
│ │ │ │ │ ├── BookmarkLayoutAdaptingCard.tsx
│ │ │ │ │ ├── BookmarkMarkdownComponent.tsx
│ │ │ │ │ ├── BookmarkOptions.tsx
│ │ │ │ │ ├── BookmarkOwnerIcon.tsx
│ │ │ │ │ ├── BookmarkTagsEditor.tsx
│ │ │ │ │ ├── BookmarkedTextEditor.tsx
│ │ │ │ │ ├── Bookmarks.tsx
│ │ │ │ │ ├── BookmarksGrid.tsx
│ │ │ │ │ ├── BookmarksGridSkeleton.tsx
│ │ │ │ │ ├── BulkManageListsModal.tsx
│ │ │ │ │ ├── BulkTagModal.tsx
│ │ │ │ │ ├── DeleteBookmarkConfirmationDialog.tsx
│ │ │ │ │ ├── EditBookmarkDialog.tsx
│ │ │ │ │ ├── EditorCard.tsx
│ │ │ │ │ ├── FooterLinkURL.tsx
│ │ │ │ │ ├── LinkCard.tsx
│ │ │ │ │ ├── ManageListsModal.tsx
│ │ │ │ │ ├── NoBookmarksBanner.tsx
│ │ │ │ │ ├── NotePreview.tsx
│ │ │ │ │ ├── SummarizeBookmarkArea.tsx
│ │ │ │ │ ├── TagList.tsx
│ │ │ │ │ ├── TagModal.tsx
│ │ │ │ │ ├── TagsEditor.tsx
│ │ │ │ │ ├── TextCard.tsx
│ │ │ │ │ ├── UnknownCard.tsx
│ │ │ │ │ ├── UpdatableBookmarksGrid.tsx
│ │ │ │ │ ├── action-buttons/
│ │ │ │ │ │ └── ArchiveBookmarkButton.tsx
│ │ │ │ │ └── icons.tsx
│ │ │ │ ├── cleanups/
│ │ │ │ │ └── TagDuplicationDetention.tsx
│ │ │ │ ├── feeds/
│ │ │ │ │ └── FeedSelector.tsx
│ │ │ │ ├── header/
│ │ │ │ │ ├── Header.tsx
│ │ │ │ │ └── ProfileOptions.tsx
│ │ │ │ ├── highlights/
│ │ │ │ │ ├── AllHighlights.tsx
│ │ │ │ │ └── HighlightCard.tsx
│ │ │ │ ├── lists/
│ │ │ │ │ ├── AllListsView.tsx
│ │ │ │ │ ├── BookmarkListSelector.tsx
│ │ │ │ │ ├── CollapsibleBookmarkLists.tsx
│ │ │ │ │ ├── DeleteListConfirmationDialog.tsx
│ │ │ │ │ ├── EditListModal.tsx
│ │ │ │ │ ├── LeaveListConfirmationDialog.tsx
│ │ │ │ │ ├── ListHeader.tsx
│ │ │ │ │ ├── ListOptions.tsx
│ │ │ │ │ ├── ManageCollaboratorsModal.tsx
│ │ │ │ │ ├── MergeListModal.tsx
│ │ │ │ │ ├── PendingInvitationsCard.tsx
│ │ │ │ │ ├── PublicListLink.tsx
│ │ │ │ │ ├── RssLink.tsx
│ │ │ │ │ └── ShareListModal.tsx
│ │ │ │ ├── preview/
│ │ │ │ │ ├── ActionBar.tsx
│ │ │ │ │ ├── AssetContentSection.tsx
│ │ │ │ │ ├── AttachmentBox.tsx
│ │ │ │ │ ├── BookmarkPreview.tsx
│ │ │ │ │ ├── HighlightsBox.tsx
│ │ │ │ │ ├── LinkContentSection.tsx
│ │ │ │ │ ├── NoteEditor.tsx
│ │ │ │ │ ├── ReaderSettingsPopover.tsx
│ │ │ │ │ ├── ReaderView.tsx
│ │ │ │ │ ├── ReadingProgressBanner.tsx
│ │ │ │ │ ├── TextContentSection.tsx
│ │ │ │ │ ├── content-renderers/
│ │ │ │ │ │ ├── AmazonRenderer.tsx
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── TikTokRenderer.tsx
│ │ │ │ │ │ ├── XRenderer.tsx
│ │ │ │ │ │ ├── YouTubeRenderer.tsx
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── registry.ts
│ │ │ │ │ │ └── types.ts
│ │ │ │ │ └── highlights.ts
│ │ │ │ ├── rules/
│ │ │ │ │ ├── RuleEngineActionBuilder.tsx
│ │ │ │ │ ├── RuleEngineConditionBuilder.tsx
│ │ │ │ │ ├── RuleEngineEventSelector.tsx
│ │ │ │ │ ├── RuleEngineRuleEditor.tsx
│ │ │ │ │ └── RuleEngineRuleList.tsx
│ │ │ │ ├── search/
│ │ │ │ │ ├── QueryExplainerTooltip.tsx
│ │ │ │ │ ├── SearchInput.tsx
│ │ │ │ │ └── useSearchAutocomplete.ts
│ │ │ │ ├── sidebar/
│ │ │ │ │ ├── AllLists.tsx
│ │ │ │ │ └── InvitationNotificationBadge.tsx
│ │ │ │ └── tags/
│ │ │ │ ├── AllTagsView.tsx
│ │ │ │ ├── BulkTagAction.tsx
│ │ │ │ ├── CreateTagModal.tsx
│ │ │ │ ├── DeleteTagConfirmationDialog.tsx
│ │ │ │ ├── EditableTagName.tsx
│ │ │ │ ├── MergeTagModal.tsx
│ │ │ │ ├── MultiTagSelector.tsx
│ │ │ │ ├── TagAutocomplete.tsx
│ │ │ │ ├── TagOptions.tsx
│ │ │ │ └── TagPill.tsx
│ │ │ ├── invite/
│ │ │ │ └── InviteAcceptForm.tsx
│ │ │ ├── public/
│ │ │ │ └── lists/
│ │ │ │ ├── PublicBookmarkGrid.tsx
│ │ │ │ └── PublicListHeader.tsx
│ │ │ ├── settings/
│ │ │ │ ├── AISettings.tsx
│ │ │ │ ├── AddApiKey.tsx
│ │ │ │ ├── ApiKeySettings.tsx
│ │ │ │ ├── ApiKeySuccess.tsx
│ │ │ │ ├── BackupSettings.tsx
│ │ │ │ ├── ChangePassword.tsx
│ │ │ │ ├── DeleteAccount.tsx
│ │ │ │ ├── DeleteApiKey.tsx
│ │ │ │ ├── FeedSettings.tsx
│ │ │ │ ├── ImportExport.tsx
│ │ │ │ ├── ImportSessionCard.tsx
│ │ │ │ ├── ImportSessionDetail.tsx
│ │ │ │ ├── ImportSessionsSection.tsx
│ │ │ │ ├── ReaderSettings.tsx
│ │ │ │ ├── RegenerateApiKey.tsx
│ │ │ │ ├── SettingsPage.tsx
│ │ │ │ ├── SubscriptionSettings.tsx
│ │ │ │ ├── UserAvatar.tsx
│ │ │ │ ├── UserDetails.tsx
│ │ │ │ ├── UserOptions.tsx
│ │ │ │ ├── WebhookEventSelector.tsx
│ │ │ │ └── WebhookSettings.tsx
│ │ │ ├── shared/
│ │ │ │ └── sidebar/
│ │ │ │ ├── MobileSidebar.tsx
│ │ │ │ ├── ModileSidebarItem.tsx
│ │ │ │ ├── Sidebar.tsx
│ │ │ │ ├── SidebarItem.tsx
│ │ │ │ ├── SidebarLayout.tsx
│ │ │ │ ├── SidebarVersion.tsx
│ │ │ │ └── TSidebarItem.ts
│ │ │ ├── signin/
│ │ │ │ ├── CredentialsForm.tsx
│ │ │ │ ├── ForgotPasswordForm.tsx
│ │ │ │ ├── OAuthAutoRedirect.tsx
│ │ │ │ ├── ResetPasswordForm.tsx
│ │ │ │ ├── SignInForm.tsx
│ │ │ │ └── SignInProviderButton.tsx
│ │ │ ├── signup/
│ │ │ │ └── SignUpForm.tsx
│ │ │ ├── subscription/
│ │ │ │ └── QuotaProgress.tsx
│ │ │ ├── theme-provider.tsx
│ │ │ ├── ui/
│ │ │ │ ├── action-button.tsx
│ │ │ │ ├── action-confirming-dialog.tsx
│ │ │ │ ├── alert.tsx
│ │ │ │ ├── avatar.tsx
│ │ │ │ ├── back-button.tsx
│ │ │ │ ├── badge.tsx
│ │ │ │ ├── button.tsx
│ │ │ │ ├── calendar.tsx
│ │ │ │ ├── card.tsx
│ │ │ │ ├── collapsible.tsx
│ │ │ │ ├── command.tsx
│ │ │ │ ├── copy-button.tsx
│ │ │ │ ├── dialog.tsx
│ │ │ │ ├── dropdown-menu.tsx
│ │ │ │ ├── field.tsx
│ │ │ │ ├── file-picker-button.tsx
│ │ │ │ ├── form.tsx
│ │ │ │ ├── full-page-spinner.tsx
│ │ │ │ ├── info-tooltip.tsx
│ │ │ │ ├── input.tsx
│ │ │ │ ├── kbd.tsx
│ │ │ │ ├── label.tsx
│ │ │ │ ├── markdown/
│ │ │ │ │ ├── markdown-editor.tsx
│ │ │ │ │ ├── markdown-readonly.tsx
│ │ │ │ │ ├── plugins/
│ │ │ │ │ │ └── toolbar-plugin.tsx
│ │ │ │ │ └── theme.ts
│ │ │ │ ├── multiple-choice-dialog.tsx
│ │ │ │ ├── popover.tsx
│ │ │ │ ├── progress.tsx
│ │ │ │ ├── radio-group.tsx
│ │ │ │ ├── scroll-area.tsx
│ │ │ │ ├── select.tsx
│ │ │ │ ├── separator.tsx
│ │ │ │ ├── skeleton.tsx
│ │ │ │ ├── slider.tsx
│ │ │ │ ├── sonner.tsx
│ │ │ │ ├── spinner.tsx
│ │ │ │ ├── switch.tsx
│ │ │ │ ├── table.tsx
│ │ │ │ ├── tabs.tsx
│ │ │ │ ├── textarea.tsx
│ │ │ │ ├── toast.tsx
│ │ │ │ ├── toggle.tsx
│ │ │ │ ├── tooltip.tsx
│ │ │ │ └── user-avatar.tsx
│ │ │ ├── utils/
│ │ │ │ ├── BookmarkAlreadyExistsToast.tsx
│ │ │ │ ├── ValidAccountCheck.tsx
│ │ │ │ └── useShowArchived.tsx
│ │ │ └── wrapped/
│ │ │ ├── ShareButton.tsx
│ │ │ ├── WrappedContent.tsx
│ │ │ ├── WrappedModal.tsx
│ │ │ └── index.ts
│ │ ├── components.json
│ │ ├── instrumentation.node.ts
│ │ ├── instrumentation.ts
│ │ ├── lib/
│ │ │ ├── attachments.tsx
│ │ │ ├── auth/
│ │ │ │ └── client.ts
│ │ │ ├── bookmark-drag.ts
│ │ │ ├── bulkActions.ts
│ │ │ ├── bulkTagActions.ts
│ │ │ ├── clientConfig.tsx
│ │ │ ├── drag-and-drop.ts
│ │ │ ├── haptic.ts
│ │ │ ├── hooks/
│ │ │ │ ├── bookmark-search.ts
│ │ │ │ ├── relative-time.ts
│ │ │ │ ├── upload-file.ts
│ │ │ │ ├── useBookmarkImport.ts
│ │ │ │ ├── useDialogFormReset.ts
│ │ │ │ └── useImportSessions.ts
│ │ │ ├── i18n/
│ │ │ │ ├── client.ts
│ │ │ │ ├── locales/
│ │ │ │ │ ├── ar/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── cs/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── da/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── de/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── el/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── en/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── en_US/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── es/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── fa/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── fi/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── fr/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── ga/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── gl/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── hr/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── hu/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── it/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── ja/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── ko/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── nb_NO/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── nl/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── pl/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── pt/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── pt_BR/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── ru/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── sk/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── sl/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── sv/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── tr/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── uk/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── vi/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ ├── zh/
│ │ │ │ │ │ └── translation.json
│ │ │ │ │ └── zhtw/
│ │ │ │ │ └── translation.json
│ │ │ │ ├── provider.tsx
│ │ │ │ ├── server.ts
│ │ │ │ └── settings.ts
│ │ │ ├── providers.tsx
│ │ │ ├── readerSettings.tsx
│ │ │ ├── store/
│ │ │ │ ├── useInBookmarkGridStore.ts
│ │ │ │ ├── useInSearchPageStore.ts
│ │ │ │ └── useSortOrderStore.ts
│ │ │ ├── userLocalSettings/
│ │ │ │ ├── bookmarksLayout.tsx
│ │ │ │ ├── types.ts
│ │ │ │ └── userLocalSettings.ts
│ │ │ ├── userSettings.tsx
│ │ │ └── utils.ts
│ │ ├── next-env.d.ts
│ │ ├── next.config.mjs
│ │ ├── package.json
│ │ ├── postcss.config.cjs
│ │ ├── public/
│ │ │ ├── blur.avif
│ │ │ └── manifest.json
│ │ ├── server/
│ │ │ ├── api/
│ │ │ │ └── client.ts
│ │ │ └── auth.ts
│ │ ├── tailwind.config.ts
│ │ ├── tsconfig.json
│ │ └── vitest.config.ts
│ └── workers/
│ ├── .oxlintrc.json
│ ├── exit.ts
│ ├── index.ts
│ ├── metascraper-plugins/
│ │ ├── metascraper-amazon-improved.ts
│ │ └── metascraper-reddit.ts
│ ├── metrics.ts
│ ├── network.ts
│ ├── package.json
│ ├── scripts/
│ │ └── parseHtmlSubprocess.ts
│ ├── server.ts
│ ├── trpc.ts
│ ├── tsconfig.json
│ ├── tsdown.config.ts
│ ├── utils.ts
│ ├── workerTracing.ts
│ ├── workerUtils.ts
│ └── workers/
│ ├── adminMaintenance/
│ │ └── tasks/
│ │ ├── migrateLinkHtmlContent.ts
│ │ └── tidyAssets.ts
│ ├── adminMaintenanceWorker.ts
│ ├── assetPreprocessingWorker.ts
│ ├── backupWorker.ts
│ ├── crawlerWorker.ts
│ ├── feedWorker.ts
│ ├── importWorker.ts
│ ├── inference/
│ │ ├── inferenceWorker.ts
│ │ ├── summarize.ts
│ │ └── tagging.ts
│ ├── ruleEngineWorker.ts
│ ├── searchWorker.ts
│ ├── utils/
│ │ ├── __fixtures__/
│ │ │ └── twz-feed.xml
│ │ ├── feedParser.test.ts
│ │ ├── feedParser.ts
│ │ ├── fetchBookmarks.ts
│ │ └── parseHtmlSubprocessIpc.ts
│ ├── videoWorker.ts
│ └── webhookWorker.ts
├── charts/
│ └── README.md
├── docker/
│ ├── Dockerfile
│ ├── Dockerfile.dev
│ ├── docker-compose.build.yml
│ ├── docker-compose.dev.yml
│ ├── docker-compose.yml
│ └── root/
│ └── etc/
│ └── s6-overlay/
│ └── s6-rc.d/
│ ├── init-db-migration/
│ │ ├── run
│ │ ├── type
│ │ └── up
│ ├── svc-web/
│ │ ├── dependencies.d/
│ │ │ └── init-db-migration
│ │ ├── run
│ │ └── type
│ ├── svc-workers/
│ │ ├── dependencies.d/
│ │ │ └── init-db-migration
│ │ ├── run
│ │ └── type
│ └── user/
│ └── contents.d/
│ └── .gitkeep
├── docs/
│ ├── .gitignore
│ ├── .oxlintrc.json
│ ├── README.md
│ ├── babel.config.js
│ ├── docs/
│ │ ├── 01-getting-started/
│ │ │ ├── 01-intro.md
│ │ │ ├── 02-screenshots.md
│ │ │ └── _category_.json
│ │ ├── 02-installation/
│ │ │ ├── 01-docker.md
│ │ │ ├── 02-unraid.md
│ │ │ ├── 03-archlinux.md
│ │ │ ├── 04-kubernetes.md
│ │ │ ├── 06-debuntu.md
│ │ │ ├── 07-minimal-install.md
│ │ │ ├── 08-truenas.md
│ │ │ ├── 09-cloud-hosting.md
│ │ │ ├── 10-pikapods.md
│ │ │ └── _category_.json
│ │ ├── 03-configuration/
│ │ │ ├── 01-environment-variables.md
│ │ │ ├── 02-different-ai-providers.md
│ │ │ └── _category_.json
│ │ ├── 04-using-karakeep/
│ │ │ ├── _category_.json
│ │ │ ├── advanced-workflows.md
│ │ │ ├── bookmarking.md
│ │ │ ├── import.md
│ │ │ ├── lists.md
│ │ │ ├── quick-sharing.md
│ │ │ ├── search-query-language.md
│ │ │ └── tags.md
│ │ ├── 05-integrations/
│ │ │ ├── 02-command-line.md
│ │ │ ├── 03-mcp.md
│ │ │ ├── 05-singlefile.md
│ │ │ ├── 06-rss-feeds.md
│ │ │ └── _category_.json
│ │ ├── 06-administration/
│ │ │ ├── 01-security-considerations.md
│ │ │ ├── 02-FAQ.md
│ │ │ ├── 03-openai.md
│ │ │ ├── 05-troubleshooting.md
│ │ │ ├── 06-server-migration.md
│ │ │ ├── 07-legacy-container-upgrade.md
│ │ │ ├── 08-hoarder-to-karakeep-migration.md
│ │ │ └── _category_.json
│ │ ├── 07-community/
│ │ │ ├── 01-community-projects.md
│ │ │ ├── 02-community-channels.md
│ │ │ └── _category_.json
│ │ ├── 08-development/
│ │ │ ├── 01-setup.md
│ │ │ ├── 02-directories.md
│ │ │ ├── 03-database.md
│ │ │ ├── 04-architecture.md
│ │ │ └── _category_.json
│ │ └── api/
│ │ ├── _category_.json
│ │ ├── add-bookmark-to-list.api.mdx
│ │ ├── admin-update-user.api.mdx
│ │ ├── attach-asset-to-bookmark.api.mdx
│ │ ├── attach-tags-to-bookmark.api.mdx
│ │ ├── check-bookmark-url.api.mdx
│ │ ├── create-backup.api.mdx
│ │ ├── create-bookmark.api.mdx
│ │ ├── create-highlight.api.mdx
│ │ ├── create-list.api.mdx
│ │ ├── create-tag.api.mdx
│ │ ├── delete-backup.api.mdx
│ │ ├── delete-bookmark.api.mdx
│ │ ├── delete-highlight.api.mdx
│ │ ├── delete-list.api.mdx
│ │ ├── delete-tag.api.mdx
│ │ ├── detach-asset-from-bookmark.api.mdx
│ │ ├── detach-tags-from-bookmark.api.mdx
│ │ ├── download-backup.api.mdx
│ │ ├── get-asset.api.mdx
│ │ ├── get-backup.api.mdx
│ │ ├── get-bookmark-highlights.api.mdx
│ │ ├── get-bookmark-lists.api.mdx
│ │ ├── get-bookmark.api.mdx
│ │ ├── get-current-user-stats.api.mdx
│ │ ├── get-current-user.api.mdx
│ │ ├── get-highlight.api.mdx
│ │ ├── get-list-bookmarks.api.mdx
│ │ ├── get-list.api.mdx
│ │ ├── get-tag-bookmarks.api.mdx
│ │ ├── get-tag.api.mdx
│ │ ├── karakeep-api.info.mdx
│ │ ├── list-backups.api.mdx
│ │ ├── list-bookmarks.api.mdx
│ │ ├── list-highlights.api.mdx
│ │ ├── list-lists.api.mdx
│ │ ├── list-tags.api.mdx
│ │ ├── remove-bookmark-from-list.api.mdx
│ │ ├── replace-asset-on-bookmark.api.mdx
│ │ ├── search-bookmarks.api.mdx
│ │ ├── sidebar.ts
│ │ ├── summarize-bookmark.api.mdx
│ │ ├── update-bookmark.api.mdx
│ │ ├── update-highlight.api.mdx
│ │ ├── update-list.api.mdx
│ │ ├── update-tag.api.mdx
│ │ └── upload-asset.api.mdx
│ ├── docusaurus.config.ts
│ ├── package.json
│ ├── sidebars.ts
│ ├── src/
│ │ ├── css/
│ │ │ └── custom.css
│ │ └── theme/
│ │ └── DocSidebarItem/
│ │ └── Category/
│ │ └── index.tsx
│ ├── static/
│ │ ├── .nojekyll
│ │ ├── _redirects
│ │ └── robots.txt
│ ├── tsconfig.json
│ ├── versioned_docs/
│ │ ├── version-v0.28.0/
│ │ │ ├── 01-intro.md
│ │ │ ├── 02-installation/
│ │ │ │ ├── 01-docker.md
│ │ │ │ ├── 02-unraid.md
│ │ │ │ ├── 03-archlinux.md
│ │ │ │ ├── 04-kubernetes.md
│ │ │ │ ├── 05-pikapods.md
│ │ │ │ ├── 06-debuntu.md
│ │ │ │ ├── 07-minimal-install.md
│ │ │ │ ├── 08-truenas.md
│ │ │ │ └── _category_.json
│ │ │ ├── 03-configuration.md
│ │ │ ├── 04-screenshots.md
│ │ │ ├── 05-quick-sharing.md
│ │ │ ├── 06-openai.md
│ │ │ ├── 07-development/
│ │ │ │ ├── 01-setup.md
│ │ │ │ ├── 02-directories.md
│ │ │ │ ├── 03-database.md
│ │ │ │ ├── 04-architecture.md
│ │ │ │ └── _category_.json
│ │ │ ├── 08-security-considerations.md
│ │ │ ├── 09-command-line.md
│ │ │ ├── 09-mcp.md
│ │ │ ├── 10-import.md
│ │ │ ├── 11-FAQ.md
│ │ │ ├── 12-troubleshooting.md
│ │ │ ├── 13-community-projects.md
│ │ │ ├── 14-guides/
│ │ │ │ ├── 01-legacy-container-upgrade.md
│ │ │ │ ├── 02-search-query-language.md
│ │ │ │ ├── 03-singlefile.md
│ │ │ │ ├── 04-hoarder-to-karakeep-migration.md
│ │ │ │ ├── 05-different-ai-providers.md
│ │ │ │ ├── 06-server-migration.md
│ │ │ │ └── _category_.json
│ │ │ └── api/
│ │ │ ├── _category_.json
│ │ │ ├── add-a-bookmark-to-a-list.api.mdx
│ │ │ ├── attach-asset.api.mdx
│ │ │ ├── attach-tags-to-a-bookmark.api.mdx
│ │ │ ├── create-a-new-bookmark.api.mdx
│ │ │ ├── create-a-new-highlight.api.mdx
│ │ │ ├── create-a-new-list.api.mdx
│ │ │ ├── create-a-new-tag.api.mdx
│ │ │ ├── delete-a-bookmark.api.mdx
│ │ │ ├── delete-a-highlight.api.mdx
│ │ │ ├── delete-a-list.api.mdx
│ │ │ ├── delete-a-tag.api.mdx
│ │ │ ├── detach-asset.api.mdx
│ │ │ ├── detach-tags-from-a-bookmark.api.mdx
│ │ │ ├── get-a-single-asset.api.mdx
│ │ │ ├── get-a-single-bookmark.api.mdx
│ │ │ ├── get-a-single-highlight.api.mdx
│ │ │ ├── get-a-single-list.api.mdx
│ │ │ ├── get-a-single-tag.api.mdx
│ │ │ ├── get-all-bookmarks.api.mdx
│ │ │ ├── get-all-highlights.api.mdx
│ │ │ ├── get-all-lists.api.mdx
│ │ │ ├── get-all-tags.api.mdx
│ │ │ ├── get-bookmarks-in-the-list.api.mdx
│ │ │ ├── get-bookmarks-with-the-tag.api.mdx
│ │ │ ├── get-current-user-info.api.mdx
│ │ │ ├── get-current-user-stats.api.mdx
│ │ │ ├── get-highlights-of-a-bookmark.api.mdx
│ │ │ ├── get-lists-of-a-bookmark.api.mdx
│ │ │ ├── karakeep-api.info.mdx
│ │ │ ├── remove-a-bookmark-from-a-list.api.mdx
│ │ │ ├── replace-asset.api.mdx
│ │ │ ├── search-bookmarks.api.mdx
│ │ │ ├── sidebar.ts
│ │ │ ├── summarize-a-bookmark.api.mdx
│ │ │ ├── update-a-bookmark.api.mdx
│ │ │ ├── update-a-highlight.api.mdx
│ │ │ ├── update-a-list.api.mdx
│ │ │ ├── update-a-tag.api.mdx
│ │ │ ├── update-user.api.mdx
│ │ │ └── upload-a-new-asset.api.mdx
│ │ ├── version-v0.29.0/
│ │ │ ├── 01-intro.md
│ │ │ ├── 02-installation/
│ │ │ │ ├── 01-docker.md
│ │ │ │ ├── 02-unraid.md
│ │ │ │ ├── 03-archlinux.md
│ │ │ │ ├── 04-kubernetes.md
│ │ │ │ ├── 05-pikapods.md
│ │ │ │ ├── 06-debuntu.md
│ │ │ │ ├── 07-minimal-install.md
│ │ │ │ ├── 08-truenas.md
│ │ │ │ └── _category_.json
│ │ │ ├── 03-configuration.md
│ │ │ ├── 04-screenshots.md
│ │ │ ├── 05-quick-sharing.md
│ │ │ ├── 06-openai.md
│ │ │ ├── 07-development/
│ │ │ │ ├── 01-setup.md
│ │ │ │ ├── 02-directories.md
│ │ │ │ ├── 03-database.md
│ │ │ │ ├── 04-architecture.md
│ │ │ │ └── _category_.json
│ │ │ ├── 08-security-considerations.md
│ │ │ ├── 09-command-line.md
│ │ │ ├── 09-mcp.md
│ │ │ ├── 10-import.md
│ │ │ ├── 11-FAQ.md
│ │ │ ├── 12-troubleshooting.md
│ │ │ ├── 13-community-projects.md
│ │ │ ├── 14-guides/
│ │ │ │ ├── 01-legacy-container-upgrade.md
│ │ │ │ ├── 02-search-query-language.md
│ │ │ │ ├── 03-singlefile.md
│ │ │ │ ├── 04-hoarder-to-karakeep-migration.md
│ │ │ │ ├── 05-different-ai-providers.md
│ │ │ │ ├── 06-server-migration.md
│ │ │ │ └── _category_.json
│ │ │ └── api/
│ │ │ ├── _category_.json
│ │ │ ├── add-a-bookmark-to-a-list.api.mdx
│ │ │ ├── attach-asset.api.mdx
│ │ │ ├── attach-tags-to-a-bookmark.api.mdx
│ │ │ ├── create-a-new-bookmark.api.mdx
│ │ │ ├── create-a-new-highlight.api.mdx
│ │ │ ├── create-a-new-list.api.mdx
│ │ │ ├── create-a-new-tag.api.mdx
│ │ │ ├── delete-a-backup.api.mdx
│ │ │ ├── delete-a-bookmark.api.mdx
│ │ │ ├── delete-a-highlight.api.mdx
│ │ │ ├── delete-a-list.api.mdx
│ │ │ ├── delete-a-tag.api.mdx
│ │ │ ├── detach-asset.api.mdx
│ │ │ ├── detach-tags-from-a-bookmark.api.mdx
│ │ │ ├── download-a-backup.api.mdx
│ │ │ ├── get-a-single-asset.api.mdx
│ │ │ ├── get-a-single-backup.api.mdx
│ │ │ ├── get-a-single-bookmark.api.mdx
│ │ │ ├── get-a-single-highlight.api.mdx
│ │ │ ├── get-a-single-list.api.mdx
│ │ │ ├── get-a-single-tag.api.mdx
│ │ │ ├── get-all-backups.api.mdx
│ │ │ ├── get-all-bookmarks.api.mdx
│ │ │ ├── get-all-highlights.api.mdx
│ │ │ ├── get-all-lists.api.mdx
│ │ │ ├── get-all-tags.api.mdx
│ │ │ ├── get-bookmarks-in-the-list.api.mdx
│ │ │ ├── get-bookmarks-with-the-tag.api.mdx
│ │ │ ├── get-current-user-info.api.mdx
│ │ │ ├── get-current-user-stats.api.mdx
│ │ │ ├── get-highlights-of-a-bookmark.api.mdx
│ │ │ ├── get-lists-of-a-bookmark.api.mdx
│ │ │ ├── karakeep-api.info.mdx
│ │ │ ├── remove-a-bookmark-from-a-list.api.mdx
│ │ │ ├── replace-asset.api.mdx
│ │ │ ├── search-bookmarks.api.mdx
│ │ │ ├── sidebar.ts
│ │ │ ├── summarize-a-bookmark.api.mdx
│ │ │ ├── trigger-a-new-backup.api.mdx
│ │ │ ├── update-a-bookmark.api.mdx
│ │ │ ├── update-a-highlight.api.mdx
│ │ │ ├── update-a-list.api.mdx
│ │ │ ├── update-a-tag.api.mdx
│ │ │ ├── update-user.api.mdx
│ │ │ └── upload-a-new-asset.api.mdx
│ │ ├── version-v0.30.0/
│ │ │ ├── 01-getting-started/
│ │ │ │ ├── 01-intro.md
│ │ │ │ ├── 02-screenshots.md
│ │ │ │ └── _category_.json
│ │ │ ├── 02-installation/
│ │ │ │ ├── 01-docker.md
│ │ │ │ ├── 02-unraid.md
│ │ │ │ ├── 03-archlinux.md
│ │ │ │ ├── 04-kubernetes.md
│ │ │ │ ├── 06-debuntu.md
│ │ │ │ ├── 07-minimal-install.md
│ │ │ │ ├── 08-truenas.md
│ │ │ │ ├── 09-cloud-hosting.md
│ │ │ │ ├── 10-pikapods.md
│ │ │ │ └── _category_.json
│ │ │ ├── 03-configuration/
│ │ │ │ ├── 01-environment-variables.md
│ │ │ │ ├── 02-different-ai-providers.md
│ │ │ │ └── _category_.json
│ │ │ ├── 04-using-karakeep/
│ │ │ │ ├── _category_.json
│ │ │ │ ├── advanced-workflows.md
│ │ │ │ ├── bookmarking.md
│ │ │ │ ├── import.md
│ │ │ │ ├── lists.md
│ │ │ │ ├── quick-sharing.md
│ │ │ │ ├── search-query-language.md
│ │ │ │ └── tags.md
│ │ │ ├── 05-integrations/
│ │ │ │ ├── 02-command-line.md
│ │ │ │ ├── 03-mcp.md
│ │ │ │ ├── 05-singlefile.md
│ │ │ │ ├── 06-rss-feeds.md
│ │ │ │ └── _category_.json
│ │ │ ├── 06-administration/
│ │ │ │ ├── 01-security-considerations.md
│ │ │ │ ├── 02-FAQ.md
│ │ │ │ ├── 03-openai.md
│ │ │ │ ├── 05-troubleshooting.md
│ │ │ │ ├── 06-server-migration.md
│ │ │ │ ├── 07-legacy-container-upgrade.md
│ │ │ │ ├── 08-hoarder-to-karakeep-migration.md
│ │ │ │ └── _category_.json
│ │ │ ├── 07-community/
│ │ │ │ ├── 01-community-projects.md
│ │ │ │ ├── 02-community-channels.md
│ │ │ │ └── _category_.json
│ │ │ ├── 08-development/
│ │ │ │ ├── 01-setup.md
│ │ │ │ ├── 02-directories.md
│ │ │ │ ├── 03-database.md
│ │ │ │ ├── 04-architecture.md
│ │ │ │ └── _category_.json
│ │ │ └── api/
│ │ │ ├── _category_.json
│ │ │ ├── add-a-bookmark-to-a-list.api.mdx
│ │ │ ├── attach-asset.api.mdx
│ │ │ ├── attach-tags-to-a-bookmark.api.mdx
│ │ │ ├── create-a-new-bookmark.api.mdx
│ │ │ ├── create-a-new-highlight.api.mdx
│ │ │ ├── create-a-new-list.api.mdx
│ │ │ ├── create-a-new-tag.api.mdx
│ │ │ ├── delete-a-backup.api.mdx
│ │ │ ├── delete-a-bookmark.api.mdx
│ │ │ ├── delete-a-highlight.api.mdx
│ │ │ ├── delete-a-list.api.mdx
│ │ │ ├── delete-a-tag.api.mdx
│ │ │ ├── detach-asset.api.mdx
│ │ │ ├── detach-tags-from-a-bookmark.api.mdx
│ │ │ ├── download-a-backup.api.mdx
│ │ │ ├── get-a-single-asset.api.mdx
│ │ │ ├── get-a-single-backup.api.mdx
│ │ │ ├── get-a-single-bookmark.api.mdx
│ │ │ ├── get-a-single-highlight.api.mdx
│ │ │ ├── get-a-single-list.api.mdx
│ │ │ ├── get-a-single-tag.api.mdx
│ │ │ ├── get-all-backups.api.mdx
│ │ │ ├── get-all-bookmarks.api.mdx
│ │ │ ├── get-all-highlights.api.mdx
│ │ │ ├── get-all-lists.api.mdx
│ │ │ ├── get-all-tags.api.mdx
│ │ │ ├── get-bookmarks-in-the-list.api.mdx
│ │ │ ├── get-bookmarks-with-the-tag.api.mdx
│ │ │ ├── get-current-user-info.api.mdx
│ │ │ ├── get-current-user-stats.api.mdx
│ │ │ ├── get-highlights-of-a-bookmark.api.mdx
│ │ │ ├── get-lists-of-a-bookmark.api.mdx
│ │ │ ├── karakeep-api.info.mdx
│ │ │ ├── remove-a-bookmark-from-a-list.api.mdx
│ │ │ ├── replace-asset.api.mdx
│ │ │ ├── search-bookmarks.api.mdx
│ │ │ ├── sidebar.ts
│ │ │ ├── summarize-a-bookmark.api.mdx
│ │ │ ├── trigger-a-new-backup.api.mdx
│ │ │ ├── update-a-bookmark.api.mdx
│ │ │ ├── update-a-highlight.api.mdx
│ │ │ ├── update-a-list.api.mdx
│ │ │ ├── update-a-tag.api.mdx
│ │ │ ├── update-user.api.mdx
│ │ │ └── upload-a-new-asset.api.mdx
│ │ └── version-v0.31.0/
│ │ ├── 01-getting-started/
│ │ │ ├── 01-intro.md
│ │ │ ├── 02-screenshots.md
│ │ │ └── _category_.json
│ │ ├── 02-installation/
│ │ │ ├── 01-docker.md
│ │ │ ├── 02-unraid.md
│ │ │ ├── 03-archlinux.md
│ │ │ ├── 04-kubernetes.md
│ │ │ ├── 06-debuntu.md
│ │ │ ├── 07-minimal-install.md
│ │ │ ├── 08-truenas.md
│ │ │ ├── 09-cloud-hosting.md
│ │ │ ├── 10-pikapods.md
│ │ │ └── _category_.json
│ │ ├── 03-configuration/
│ │ │ ├── 01-environment-variables.md
│ │ │ ├── 02-different-ai-providers.md
│ │ │ └── _category_.json
│ │ ├── 04-using-karakeep/
│ │ │ ├── _category_.json
│ │ │ ├── advanced-workflows.md
│ │ │ ├── bookmarking.md
│ │ │ ├── import.md
│ │ │ ├── lists.md
│ │ │ ├── quick-sharing.md
│ │ │ ├── search-query-language.md
│ │ │ └── tags.md
│ │ ├── 05-integrations/
│ │ │ ├── 02-command-line.md
│ │ │ ├── 03-mcp.md
│ │ │ ├── 05-singlefile.md
│ │ │ ├── 06-rss-feeds.md
│ │ │ └── _category_.json
│ │ ├── 06-administration/
│ │ │ ├── 01-security-considerations.md
│ │ │ ├── 02-FAQ.md
│ │ │ ├── 03-openai.md
│ │ │ ├── 05-troubleshooting.md
│ │ │ ├── 06-server-migration.md
│ │ │ ├── 07-legacy-container-upgrade.md
│ │ │ ├── 08-hoarder-to-karakeep-migration.md
│ │ │ └── _category_.json
│ │ ├── 07-community/
│ │ │ ├── 01-community-projects.md
│ │ │ ├── 02-community-channels.md
│ │ │ └── _category_.json
│ │ ├── 08-development/
│ │ │ ├── 01-setup.md
│ │ │ ├── 02-directories.md
│ │ │ ├── 03-database.md
│ │ │ ├── 04-architecture.md
│ │ │ └── _category_.json
│ │ └── api/
│ │ ├── _category_.json
│ │ ├── add-bookmark-to-list.api.mdx
│ │ ├── admin-update-user.api.mdx
│ │ ├── attach-asset-to-bookmark.api.mdx
│ │ ├── attach-tags-to-bookmark.api.mdx
│ │ ├── check-bookmark-url.api.mdx
│ │ ├── create-backup.api.mdx
│ │ ├── create-bookmark.api.mdx
│ │ ├── create-highlight.api.mdx
│ │ ├── create-list.api.mdx
│ │ ├── create-tag.api.mdx
│ │ ├── delete-backup.api.mdx
│ │ ├── delete-bookmark.api.mdx
│ │ ├── delete-highlight.api.mdx
│ │ ├── delete-list.api.mdx
│ │ ├── delete-tag.api.mdx
│ │ ├── detach-asset-from-bookmark.api.mdx
│ │ ├── detach-tags-from-bookmark.api.mdx
│ │ ├── download-backup.api.mdx
│ │ ├── get-asset.api.mdx
│ │ ├── get-backup.api.mdx
│ │ ├── get-bookmark-highlights.api.mdx
│ │ ├── get-bookmark-lists.api.mdx
│ │ ├── get-bookmark.api.mdx
│ │ ├── get-current-user-stats.api.mdx
│ │ ├── get-current-user.api.mdx
│ │ ├── get-highlight.api.mdx
│ │ ├── get-list-bookmarks.api.mdx
│ │ ├── get-list.api.mdx
│ │ ├── get-tag-bookmarks.api.mdx
│ │ ├── get-tag.api.mdx
│ │ ├── karakeep-api.info.mdx
│ │ ├── list-backups.api.mdx
│ │ ├── list-bookmarks.api.mdx
│ │ ├── list-highlights.api.mdx
│ │ ├── list-lists.api.mdx
│ │ ├── list-tags.api.mdx
│ │ ├── remove-bookmark-from-list.api.mdx
│ │ ├── replace-asset-on-bookmark.api.mdx
│ │ ├── search-bookmarks.api.mdx
│ │ ├── sidebar.ts
│ │ ├── summarize-bookmark.api.mdx
│ │ ├── update-bookmark.api.mdx
│ │ ├── update-highlight.api.mdx
│ │ ├── update-list.api.mdx
│ │ ├── update-tag.api.mdx
│ │ └── upload-asset.api.mdx
│ ├── versioned_sidebars/
│ │ ├── version-v0.28.0-sidebars.json
│ │ ├── version-v0.29.0-sidebars.json
│ │ ├── version-v0.30.0-sidebars.json
│ │ └── version-v0.31.0-sidebars.json
│ └── versions.json
├── karakeep-linux.sh
├── kubernetes/
│ ├── .env_sample
│ ├── .gitignore
│ ├── .secrets_sample
│ ├── Makefile
│ ├── README.md
│ ├── chrome-deployment.yaml
│ ├── chrome-service.yaml
│ ├── data-pvc.yaml
│ ├── ingress_sample.yaml
│ ├── kustomization.yaml
│ ├── meilisearch-deployment.yaml
│ ├── meilisearch-pvc.yaml
│ ├── meilisearch-service.yaml
│ ├── namespace.yaml
│ ├── web-deployment.yaml
│ └── web-service.yaml
├── package.json
├── packages/
│ ├── api/
│ │ ├── .oxlintrc.json
│ │ ├── index.ts
│ │ ├── middlewares/
│ │ │ ├── auth.ts
│ │ │ └── trpcAdapter.ts
│ │ ├── package.json
│ │ ├── routes/
│ │ │ ├── admin.ts
│ │ │ ├── assets.ts
│ │ │ ├── backups.ts
│ │ │ ├── bookmarks.ts
│ │ │ ├── health.ts
│ │ │ ├── highlights.ts
│ │ │ ├── lists.ts
│ │ │ ├── metrics.ts
│ │ │ ├── public/
│ │ │ │ └── assets.ts
│ │ │ ├── public.ts
│ │ │ ├── rss.ts
│ │ │ ├── tags.ts
│ │ │ ├── trpc.ts
│ │ │ ├── users.ts
│ │ │ ├── version.ts
│ │ │ └── webhooks.ts
│ │ ├── tsconfig.json
│ │ └── utils/
│ │ ├── assets.ts
│ │ ├── pagination.ts
│ │ ├── rss.ts
│ │ ├── types.ts
│ │ └── upload.ts
│ ├── benchmarks/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── docker-compose.yml
│ │ ├── package.json
│ │ ├── setup/
│ │ │ └── html/
│ │ │ └── hello.html
│ │ ├── src/
│ │ │ ├── benchmarks.ts
│ │ │ ├── index.ts
│ │ │ ├── log.ts
│ │ │ ├── seed.ts
│ │ │ ├── startContainers.ts
│ │ │ ├── trpc.ts
│ │ │ └── utils.ts
│ │ └── tsconfig.json
│ ├── db/
│ │ ├── .oxlintrc.json
│ │ ├── drizzle/
│ │ │ ├── 0000_luxuriant_johnny_blaze.sql
│ │ │ ├── 0001_dapper_trauma.sql
│ │ │ ├── 0002_worried_beyonder.sql
│ │ │ ├── 0003_parallel_supernaut.sql
│ │ │ ├── 0004_skinny_vengeance.sql
│ │ │ ├── 0005_quiet_gunslinger.sql
│ │ │ ├── 0006_funny_mac_gargan.sql
│ │ │ ├── 0007_messy_raza.sql
│ │ │ ├── 0008_cloudy_skin.sql
│ │ │ ├── 0009_cuddly_cammi.sql
│ │ │ ├── 0010_curved_sharon_ventura.sql
│ │ │ ├── 0011_ordinary_phalanx.sql
│ │ │ ├── 0012_noisy_grim_reaper.sql
│ │ │ ├── 0013_square_lady_ursula.sql
│ │ │ ├── 0014_lonely_thaddeus_ross.sql
│ │ │ ├── 0015_first_reavers.sql
│ │ │ ├── 0016_shallow_rawhide_kid.sql
│ │ │ ├── 0017_slippery_senator_kelly.sql
│ │ │ ├── 0018_bright_infant_terrible.sql
│ │ │ ├── 0019_many_vertigo.sql
│ │ │ ├── 0020_sudden_dagger.sql
│ │ │ ├── 0021_magical_firebrand.sql
│ │ │ ├── 0022_tough_nextwave.sql
│ │ │ ├── 0023_late_night_nurse.sql
│ │ │ ├── 0024_premium_hammerhead.sql
│ │ │ ├── 0025_aspiring_skaar.sql
│ │ │ ├── 0026_silky_imperial_guard.sql
│ │ │ ├── 0027_cute_talon.sql
│ │ │ ├── 0028_melodic_norrin_radd.sql
│ │ │ ├── 0029_short_gunslinger.sql
│ │ │ ├── 0030_blue_synch.sql
│ │ │ ├── 0031_yummy_famine.sql
│ │ │ ├── 0032_futuristic_shiva.sql
│ │ │ ├── 0033_nappy_molten_man.sql
│ │ │ ├── 0034_wet_the_stranger.sql
│ │ │ ├── 0035_gorgeous_may_parker.sql
│ │ │ ├── 0036_luxuriant_white_queen.sql
│ │ │ ├── 0037_daily_smiling_tiger.sql
│ │ │ ├── 0038_calm_clint_barton.sql
│ │ │ ├── 0039_purple_albert_cleary.sql
│ │ │ ├── 0040_long_mindworm.sql
│ │ │ ├── 0041_fat_bloodstrike.sql
│ │ │ ├── 0042_square_gamma_corps.sql
│ │ │ ├── 0043_puzzling_blonde_phantom.sql
│ │ │ ├── 0044_add_password_salt.sql
│ │ │ ├── 0045_add_rule_engine.sql
│ │ │ ├── 0046_add_rss_feed_enabled_col.sql
│ │ │ ├── 0047_add_summarization_status.sql
│ │ │ ├── 0048_add_user_settings.sql
│ │ │ ├── 0049_add_rss_token.sql
│ │ │ ├── 0050_add_user_settings_archive_display_behaviour.sql
│ │ │ ├── 0051_public_lists.sql
│ │ │ ├── 0052_add_bookmark_quota.sql
│ │ │ ├── 0053_storage_quota.sql
│ │ │ ├── 0054_add_timezone.sql
│ │ │ ├── 0055_content_asset_id.sql
│ │ │ ├── 0056_user_invites.sql
│ │ │ ├── 0057_salty_carmella_unuscione.sql
│ │ │ ├── 0058_add_subscription.sql
│ │ │ ├── 0059_browserless_user_setting.sql
│ │ │ ├── 0060_drop_invite_expire_at.sql
│ │ │ ├── 0061_merge_user_settings.sql
│ │ │ ├── 0062_add_import_session.sql
│ │ │ ├── 0063_add_bookmark_source.sql
│ │ │ ├── 0064_add_import_tags_to_feeds.sql
│ │ │ ├── 0065_collaborative_lists.sql
│ │ │ ├── 0066_collaborative_lists_invites.sql
│ │ │ ├── 0067_add_backups_table.sql
│ │ │ ├── 0068_optimize_bookmark_indicies.sql
│ │ │ ├── 0069_fix_pending_summarization.sql
│ │ │ ├── 0070_add_reader_settings.sql
│ │ │ ├── 0071_add_normalized_tag_name.sql
│ │ │ ├── 0072_add_user_ai_preferences.sql
│ │ │ ├── 0073_ai_tag_style.sql
│ │ │ ├── 0074_reset_tagging_summarization.sql
│ │ │ ├── 0075_change_default_tag_style.sql
│ │ │ ├── 0076_add_api_key_last_used_tracking.sql
│ │ │ ├── 0077_import_listpaths_to_listids.sql
│ │ │ ├── 0078_add_import_session_indexes.sql
│ │ │ ├── 0079_add_tag_granularity_settings.sql
│ │ │ ├── 0080_user_reading_progress.sql
│ │ │ └── meta/
│ │ │ ├── 0000_snapshot.json
│ │ │ ├── 0001_snapshot.json
│ │ │ ├── 0002_snapshot.json
│ │ │ ├── 0003_snapshot.json
│ │ │ ├── 0004_snapshot.json
│ │ │ ├── 0005_snapshot.json
│ │ │ ├── 0006_snapshot.json
│ │ │ ├── 0007_snapshot.json
│ │ │ ├── 0008_snapshot.json
│ │ │ ├── 0009_snapshot.json
│ │ │ ├── 0010_snapshot.json
│ │ │ ├── 0011_snapshot.json
│ │ │ ├── 0012_snapshot.json
│ │ │ ├── 0013_snapshot.json
│ │ │ ├── 0014_snapshot.json
│ │ │ ├── 0015_snapshot.json
│ │ │ ├── 0016_snapshot.json
│ │ │ ├── 0017_snapshot.json
│ │ │ ├── 0018_snapshot.json
│ │ │ ├── 0019_snapshot.json
│ │ │ ├── 0020_snapshot.json
│ │ │ ├── 0021_snapshot.json
│ │ │ ├── 0022_snapshot.json
│ │ │ ├── 0023_snapshot.json
│ │ │ ├── 0024_snapshot.json
│ │ │ ├── 0025_snapshot.json
│ │ │ ├── 0026_snapshot.json
│ │ │ ├── 0027_snapshot.json
│ │ │ ├── 0028_snapshot.json
│ │ │ ├── 0029_snapshot.json
│ │ │ ├── 0030_snapshot.json
│ │ │ ├── 0031_snapshot.json
│ │ │ ├── 0032_snapshot.json
│ │ │ ├── 0033_snapshot.json
│ │ │ ├── 0034_snapshot.json
│ │ │ ├── 0035_snapshot.json
│ │ │ ├── 0036_snapshot.json
│ │ │ ├── 0037_snapshot.json
│ │ │ ├── 0038_snapshot.json
│ │ │ ├── 0039_snapshot.json
│ │ │ ├── 0040_snapshot.json
│ │ │ ├── 0041_snapshot.json
│ │ │ ├── 0042_snapshot.json
│ │ │ ├── 0043_snapshot.json
│ │ │ ├── 0044_snapshot.json
│ │ │ ├── 0045_snapshot.json
│ │ │ ├── 0046_snapshot.json
│ │ │ ├── 0047_snapshot.json
│ │ │ ├── 0048_snapshot.json
│ │ │ ├── 0049_snapshot.json
│ │ │ ├── 0050_snapshot.json
│ │ │ ├── 0051_snapshot.json
│ │ │ ├── 0052_snapshot.json
│ │ │ ├── 0053_snapshot.json
│ │ │ ├── 0054_snapshot.json
│ │ │ ├── 0055_snapshot.json
│ │ │ ├── 0056_snapshot.json
│ │ │ ├── 0057_snapshot.json
│ │ │ ├── 0058_snapshot.json
│ │ │ ├── 0059_snapshot.json
│ │ │ ├── 0060_snapshot.json
│ │ │ ├── 0061_snapshot.json
│ │ │ ├── 0062_snapshot.json
│ │ │ ├── 0063_snapshot.json
│ │ │ ├── 0064_snapshot.json
│ │ │ ├── 0065_snapshot.json
│ │ │ ├── 0066_snapshot.json
│ │ │ ├── 0067_snapshot.json
│ │ │ ├── 0068_snapshot.json
│ │ │ ├── 0069_snapshot.json
│ │ │ ├── 0070_snapshot.json
│ │ │ ├── 0071_snapshot.json
│ │ │ ├── 0072_snapshot.json
│ │ │ ├── 0073_snapshot.json
│ │ │ ├── 0074_snapshot.json
│ │ │ ├── 0075_snapshot.json
│ │ │ ├── 0076_snapshot.json
│ │ │ ├── 0077_snapshot.json
│ │ │ ├── 0078_snapshot.json
│ │ │ ├── 0079_snapshot.json
│ │ │ ├── 0080_snapshot.json
│ │ │ └── _journal.json
│ │ ├── drizzle.config.ts
│ │ ├── drizzle.ts
│ │ ├── index.ts
│ │ ├── instrumentation.ts
│ │ ├── migrate.ts
│ │ ├── package.json
│ │ ├── schema.ts
│ │ └── tsconfig.json
│ ├── e2e_tests/
│ │ ├── .gitignore
│ │ ├── .oxlintrc.json
│ │ ├── docker-compose.yml
│ │ ├── package.json
│ │ ├── setup/
│ │ │ ├── html/
│ │ │ │ ├── feed.xml
│ │ │ │ └── hello.html
│ │ │ ├── seed.ts
│ │ │ └── startContainers.ts
│ │ ├── tests/
│ │ │ ├── api/
│ │ │ │ ├── assets.test.ts
│ │ │ │ ├── backups.test.ts
│ │ │ │ ├── bookmarks.test.ts
│ │ │ │ ├── highlights.test.ts
│ │ │ │ ├── lists.test.ts
│ │ │ │ ├── public.test.ts
│ │ │ │ ├── rss.test.ts
│ │ │ │ ├── tags.test.ts
│ │ │ │ └── users.test.ts
│ │ │ ├── assetdb/
│ │ │ │ ├── assetdb-utils.ts
│ │ │ │ ├── interface-compliance.test.ts
│ │ │ │ ├── local-filesystem-store.test.ts
│ │ │ │ └── s3-store.test.ts
│ │ │ └── workers/
│ │ │ ├── crawler.test.ts
│ │ │ ├── feed.test.ts
│ │ │ └── import.test.ts
│ │ ├── tsconfig.json
│ │ ├── utils/
│ │ │ ├── api.ts
│ │ │ ├── assets.ts
│ │ │ ├── general.ts
│ │ │ └── trpc.ts
│ │ └── vitest.config.ts
│ ├── open-api/
│ │ ├── .oxlintrc.json
│ │ ├── index.ts
│ │ ├── karakeep-openapi-spec.json
│ │ ├── lib/
│ │ │ ├── admin.ts
│ │ │ ├── assets.ts
│ │ │ ├── backups.ts
│ │ │ ├── bookmarks.ts
│ │ │ ├── common.ts
│ │ │ ├── errors.ts
│ │ │ ├── highlights.ts
│ │ │ ├── lists.ts
│ │ │ ├── pagination.ts
│ │ │ ├── tags.ts
│ │ │ ├── types.ts
│ │ │ └── users.ts
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── plugins/
│ │ ├── .oxlintrc.json
│ │ ├── package.json
│ │ ├── queue-liteque/
│ │ │ ├── index.ts
│ │ │ └── src/
│ │ │ └── index.ts
│ │ ├── queue-restate/
│ │ │ ├── index.ts
│ │ │ └── src/
│ │ │ ├── admin.ts
│ │ │ ├── dispatcher.ts
│ │ │ ├── env.ts
│ │ │ ├── idProvider.ts
│ │ │ ├── index.ts
│ │ │ ├── runner.ts
│ │ │ ├── semaphore.ts
│ │ │ ├── service.ts
│ │ │ ├── tests/
│ │ │ │ ├── docker-compose.yml
│ │ │ │ ├── queue.test.ts
│ │ │ │ ├── setup/
│ │ │ │ │ └── startContainers.ts
│ │ │ │ └── utils.ts
│ │ │ └── types.ts
│ │ ├── ratelimit-memory/
│ │ │ ├── index.ts
│ │ │ └── src/
│ │ │ ├── index.test.ts
│ │ │ └── index.ts
│ │ ├── ratelimit-redis/
│ │ │ ├── index.ts
│ │ │ └── src/
│ │ │ ├── index.ts
│ │ │ └── tests/
│ │ │ ├── docker-compose.yml
│ │ │ ├── ratelimit-redis.test.ts
│ │ │ ├── setup/
│ │ │ │ └── startContainers.ts
│ │ │ └── utils.ts
│ │ ├── search-meilisearch/
│ │ │ ├── index.ts
│ │ │ └── src/
│ │ │ ├── env.ts
│ │ │ └── index.ts
│ │ ├── tsconfig.json
│ │ └── vitest.config.ts
│ ├── sdk/
│ │ ├── .gitignore
│ │ ├── .npmignore
│ │ ├── .oxlintrc.json
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ └── karakeep-api.d.ts
│ │ ├── tsconfig.json
│ │ └── vite.config.mts
│ ├── shared/
│ │ ├── .oxlintrc.json
│ │ ├── assetdb.ts
│ │ ├── concurrency.test.ts
│ │ ├── concurrency.ts
│ │ ├── config.ts
│ │ ├── customFetch.ts
│ │ ├── debug.ts
│ │ ├── import-export/
│ │ │ ├── exporters.ts
│ │ │ ├── fixtures/
│ │ │ │ └── linkwarden-export.json
│ │ │ ├── importer.test.ts
│ │ │ ├── importer.ts
│ │ │ ├── index.ts
│ │ │ ├── parsers.test.ts
│ │ │ └── parsers.ts
│ │ ├── index.ts
│ │ ├── inference.ts
│ │ ├── langs.ts
│ │ ├── logger.ts
│ │ ├── package.json
│ │ ├── plugins.ts
│ │ ├── prompts.server.ts
│ │ ├── prompts.ts
│ │ ├── queueing.ts
│ │ ├── ratelimiting.ts
│ │ ├── search.ts
│ │ ├── searchQueryParser.test.ts
│ │ ├── searchQueryParser.ts
│ │ ├── signedTokens.test.ts
│ │ ├── signedTokens.ts
│ │ ├── storageQuota.ts
│ │ ├── trpc.ts
│ │ ├── tryCatch.ts
│ │ ├── tsconfig.json
│ │ ├── types/
│ │ │ ├── admin.ts
│ │ │ ├── assets.ts
│ │ │ ├── backups.ts
│ │ │ ├── bookmarks.ts
│ │ │ ├── config.ts
│ │ │ ├── feeds.ts
│ │ │ ├── highlights.ts
│ │ │ ├── importSessions.ts
│ │ │ ├── lists.ts
│ │ │ ├── pagination.ts
│ │ │ ├── prompts.ts
│ │ │ ├── readers.ts
│ │ │ ├── rules.ts
│ │ │ ├── search.ts
│ │ │ ├── tags.ts
│ │ │ ├── uploads.ts
│ │ │ ├── users.ts
│ │ │ └── webhooks.ts
│ │ ├── utils/
│ │ │ ├── assetUtils.ts
│ │ │ ├── bookmarkUtils.ts
│ │ │ ├── htmlUtils.ts
│ │ │ ├── listUtils.ts
│ │ │ ├── reading-progress-dom.test.ts
│ │ │ ├── reading-progress-dom.ts
│ │ │ ├── redirectUrl.test.ts
│ │ │ ├── redirectUrl.ts
│ │ │ ├── relativeDateUtils.ts
│ │ │ ├── switch.ts
│ │ │ └── tag.ts
│ │ └── vitest.config.ts
│ ├── shared-react/
│ │ ├── .oxlintrc.json
│ │ ├── components/
│ │ │ ├── BookmarkHtmlHighlighter.tsx
│ │ │ ├── ScrollProgressTracker.tsx
│ │ │ ├── highlights.ts
│ │ │ └── ui/
│ │ │ ├── button.tsx
│ │ │ ├── popover.tsx
│ │ │ └── textarea.tsx
│ │ ├── hooks/
│ │ │ ├── assets.ts
│ │ │ ├── bookmark-grid-context.tsx
│ │ │ ├── bookmark-list-context.tsx
│ │ │ ├── bookmarks.ts
│ │ │ ├── highlights.ts
│ │ │ ├── lists.ts
│ │ │ ├── reader-settings.tsx
│ │ │ ├── reading-progress.ts
│ │ │ ├── rules.ts
│ │ │ ├── search-history.ts
│ │ │ ├── tags.ts
│ │ │ ├── use-debounce.ts
│ │ │ └── users.ts
│ │ ├── lib/
│ │ │ └── utils.ts
│ │ ├── package.json
│ │ ├── providers/
│ │ │ └── trpc-provider.tsx
│ │ ├── trpc.ts
│ │ └── tsconfig.json
│ ├── shared-server/
│ │ ├── .oxlintrc.json
│ │ ├── index.ts
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── plugins.ts
│ │ │ ├── queues.ts
│ │ │ ├── services/
│ │ │ │ └── quotaService.ts
│ │ │ ├── tracing.ts
│ │ │ └── tracingTypes.ts
│ │ └── tsconfig.json
│ └── trpc/
│ ├── .oxlintrc.json
│ ├── auth.ts
│ ├── email.ts
│ ├── index.ts
│ ├── lib/
│ │ ├── __tests__/
│ │ │ ├── ruleEngine.test.ts
│ │ │ └── search.test.ts
│ │ ├── attachments.ts
│ │ ├── impersonate.ts
│ │ ├── rateLimit.ts
│ │ ├── ruleEngine.ts
│ │ ├── search.ts
│ │ ├── tracing.ts
│ │ └── turnstile.ts
│ ├── models/
│ │ ├── assets.ts
│ │ ├── backups.ts
│ │ ├── bookmarks.ts
│ │ ├── feeds.ts
│ │ ├── highlights.ts
│ │ ├── importSessions.ts
│ │ ├── listInvitations.ts
│ │ ├── lists.ts
│ │ ├── rules.ts
│ │ ├── tags.ts
│ │ ├── users.ts
│ │ └── webhooks.ts
│ ├── package.json
│ ├── routers/
│ │ ├── _app.ts
│ │ ├── admin.test.ts
│ │ ├── admin.ts
│ │ ├── apiKeys.test.ts
│ │ ├── apiKeys.ts
│ │ ├── assets.test.ts
│ │ ├── assets.ts
│ │ ├── backups.ts
│ │ ├── bookmarks.test.ts
│ │ ├── bookmarks.ts
│ │ ├── config.ts
│ │ ├── feeds.test.ts
│ │ ├── feeds.ts
│ │ ├── highlights.test.ts
│ │ ├── highlights.ts
│ │ ├── importSessions.test.ts
│ │ ├── importSessions.ts
│ │ ├── invites.test.ts
│ │ ├── invites.ts
│ │ ├── lists.test.ts
│ │ ├── lists.ts
│ │ ├── prompts.test.ts
│ │ ├── prompts.ts
│ │ ├── publicBookmarks.ts
│ │ ├── rules.test.ts
│ │ ├── rules.ts
│ │ ├── sharedLists.test.ts
│ │ ├── subscriptions.test.ts
│ │ ├── subscriptions.ts
│ │ ├── tags.test.ts
│ │ ├── tags.ts
│ │ ├── users.test.ts
│ │ ├── users.ts
│ │ ├── webhooks.test.ts
│ │ └── webhooks.ts
│ ├── stats.ts
│ ├── testUtils.ts
│ ├── tsconfig.json
│ └── vitest.config.ts
├── patches/
│ ├── playwright-extra@4.3.6.patch
│ └── xcode@3.0.1.patch
├── pnpm-workspace.yaml
├── start-dev.sh
├── tooling/
│ ├── github/
│ │ ├── package.json
│ │ └── setup/
│ │ └── action.yml
│ ├── oxlint/
│ │ ├── oxlint-base.json
│ │ ├── oxlint-nextjs.json
│ │ ├── oxlint-react.json
│ │ └── package.json
│ ├── prettier/
│ │ ├── index.js
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── tailwind/
│ │ ├── .oxlintrc.json
│ │ ├── base.ts
│ │ ├── globals.css
│ │ ├── native.ts
│ │ ├── package.json
│ │ ├── tsconfig.json
│ │ └── web.ts
│ └── typescript/
│ ├── base.json
│ ├── node.json
│ └── package.json
├── tools/
│ └── compare-models/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── src/
│ │ ├── apiClient.ts
│ │ ├── bookmarkProcessor.ts
│ │ ├── config.ts
│ │ ├── index.ts
│ │ ├── inferenceClient.ts
│ │ ├── interactive.ts
│ │ └── types.ts
│ └── tsconfig.json
└── turbo.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .claude/settings.json
================================================
{
"permissions": {
"allow": [
"Bash(pnpm typecheck:*)",
"Bash(pnpm --filter * typecheck:*)",
"Bash(pnpm lint:*)",
"Bash(pnpm --filter * lint:*)",
"Bash(pnpm format:*)",
"Bash(pnpm --filter * format:*)",
"Bash(pnpm test:*)",
"Bash(pnpm --filter * test:*)"
],
"deny": []
}
}
================================================
FILE: .dockerignore
================================================
Dockerfile
.dockerignore
**/node_modules
npm-debug.log
README.md
**/.next
**/*.db
**/.env*
.turbo
.git
./data
# Files that don't need to be included in the Docker image
docs
kubernetes
charts
apps/mobile
apps/landing
apps/browser-extension
packages/e2e_tests
packages/benchmarks
# Aider
.aider*
# next.js
.next/
out/
.claude/worktrees
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
buy_me_a_coffee: mbassem
github: MohamedBassem
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: Bug Report
description: Create a report to help us fix bugs & issues in existing supported functionality
labels: ["bug", "status/untriaged"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out a bug report!
Please note that this form is for reporting bugs in existing supported functionality.
If you are reporting something that's not an issue in functionality we've previously supported and/or is simply something different to your expectations, then it may be more appropriate to raise via a feature or support request instead.
- type: textarea
id: description
attributes:
label: Describe the Bug
description: Provide a clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: Detail the steps that would replicate this issue.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behaviour
description: Provide clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: context
attributes:
label: Screenshots or Additional Context
description: Provide any additional context and screenshots here to help us solve this issue.
validations:
required: false
- type: input
id: devicedetails
attributes:
label: Device Details
description: |
If this is an issue that occurs when using the Karakeep interface, please provide details of the device/browser used which presents the reported issue.
placeholder: (eg. Firefox 97 (64-bit) on Windows 11)
validations:
required: false
- type: input
id: bsversion
attributes:
label: Exact Karakeep Version
description: This can be found in the bottom left of the page (e.g. Karakeep v0.18.0)
placeholder: (eg. v0.18.0)
validations:
required: true
- type: input
id: environment
attributes:
label: Environment Details
description: |
Tell us where Karakeep is running, and reverse proxy (e.g. Docker, Bare linux, Proxmox, Unraid, K8s, Cloud).
placeholder: (eg. Docker on Ubuntu 22.04 behind Caddy, or Proxmox LXC)
validations:
required: false
- type: textarea
id: containerlogs
attributes:
label: Debug Logs
description: |
Please provide relevant logs where possible
placeholder: (paste logs here)
validations:
required: false
- type: checkboxes
id: confirm-troubleshooting
attributes:
label: Have you checked the troubleshooting guide?
description: |
We have a troubleshooting guide that you can find [here](https://docs.karakeep.app/administration/troubleshooting). Please check it out as you might find a solution to your problem.
options:
- label: I have checked the troubleshooting guide and I haven't found a solution to my problem
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: Feature Request
description: Request a new feature or idea to be added to Karakeep
labels: ["feature request", "status/untriaged"]
body:
- type: textarea
id: description
attributes:
label: Describe the feature you'd like
description: Provide a clear description of the feature you'd like implemented in Karakeep
validations:
required: true
- type: textarea
id: benefits
attributes:
label: Describe the benefits this would bring to existing Karakeep users
description: |
Explain the measurable benefits this feature would achieve for existing Karakeep users.
These benefits should details outcomes in terms of what this request solves/achieves, and should not be specific to implementation.
This helps us understand the core desired goal so that a variety of potential implementations could be explored.
This field is important. Lack of input here may lead to early issue closure.
validations:
required: true
- type: textarea
id: already_achieved
attributes:
label: Can the goal of this request already be achieved via other means?
description: |
Yes/No. If yes, please describe how the requested approach fits in with the existing method.
validations:
required: true
- type: checkboxes
id: confirm-search
attributes:
label: Have you searched for an existing open/closed issue?
description: |
To help us keep these issues under control, please ensure you have first [searched our issue list](https://github.com/karakeep-app/karakeep/issues?q=is%3Aissue) for any existing issues that cover the fundamental benefit/goal of your request.
options:
- label: I have searched for existing issues and none cover my fundamental request
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
================================================
FILE: .github/ISSUE_TEMPLATE/question.yml
================================================
name: Question / Support Request
description: Get help with anything related to Karakeep
labels: ["question"]
body:
- type: markdown
attributes:
value: |
We use Github discussions for anything that's not a bug report or a feature request. Please ask your question in the [Q&A section](https://github.com/karakeep-app/karakeep/discussions/categories/q-a) and someone will answer it soon!
================================================
FILE: .github/workflows/android.yml
================================================
name: Android App Release Build
on:
push:
tags:
- 'android/v[0-9]+.[0-9]+.[0-9]+-[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Build Android app
working-directory: apps/mobile
run: eas build --platform android --local --output ${{ github.workspace }}/app-release.aab
env:
EAS_SKIP_AUTO_FINGERPRINT: "1"
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Upload AAB artifact
uses: actions/upload-artifact@v4
with:
name: karakeep-android
path: ${{ github.workspace }}/app-release.aab
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
pull_request:
branches: ["*"]
push:
branches: ["main"]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
# You can leverage Vercel Remote Caching with Turbo to speed up your builds
env:
FORCE_COLOR: 3
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Lint
run: pnpm lint && pnpm exec sherif
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Format
run: pnpm format
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Typecheck
run: pnpm typecheck
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Shared Package Tests
working-directory: packages/shared
run: pnpm test
- name: TRPC Tests
working-directory: packages/trpc
run: pnpm test
- name: Workers Tests
working-directory: apps/workers
run: pnpm test
- name: E2E Tests
working-directory: packages/e2e_tests
run: pnpm test
- name: Upload Docker Logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-docker-logs-${{ github.sha }}-${{ github.run_attempt }}
path: packages/e2e_tests/setup/docker-logs/
retention-days: 7
open-api-spec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Regenerate OpenAPI spec
working-directory: packages/open-api
run: pnpm run generate
- name: Check for changes
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "Error: Generated files are not up to date!"
echo "The following files have changes:"
git status --porcelain
echo ""
echo "Please regenerate the files locally with (pnpm run generate) and commit the changes."
git diff
exit 1
else
echo "✅ Generated files are up to date!"
fi
================================================
FILE: .github/workflows/claude.yml
================================================
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
jobs:
claude:
if: |
github.actor == 'MohamedBassem' && (
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
)
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
# model: "claude-opus-4-20250514"
# Optional: Customize the trigger phrase (default: @claude)
# trigger_phrase: "/claude"
# Optional: Trigger when specific user is assigned to an issue
# assignee_trigger: "claude-bot"
# Optional: Allow Claude to run specific commands
allowed_tools: "Bash(pnpm install),Bash(pnpm typecheck),Bash(pnpm test),Bash(pnpm lint:fix)"
# Optional: Add custom instructions for Claude to customize its behavior for your project
# custom_instructions: |
# Follow our coding standards
# Ensure all new code has tests
# Use TypeScript for new files
# Optional: Custom environment variables for Claude
# claude_env: |
# NODE_ENV: test
================================================
FILE: .github/workflows/cli.yml
================================================
name: Publish CLI Package to npm
on:
push:
tags:
# This is a glob pattern not a regex
- "cli/v[0-9]+.[0-9]+.[0-9]+"
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Build CLI
run: pnpm build
working-directory: apps/cli
# npm 11.5.1 or later is required for trusted publishing
- run: npm install -g npm@latest
- run: pnpm publish --access public --no-git-checks
working-directory: apps/cli
================================================
FILE: .github/workflows/docker.yml
================================================
name: Build and Push Docker
on:
release:
types:
- created
push:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [linux/amd64, linux/arm64]
image: [web, workers, cli, mcp, aio]
include:
- platform: linux/amd64
suffix: amd64
os: ubuntu-latest
- platform: linux/arm64
suffix: arm64
os: ubuntu-24.04-arm
- image: web
name: karakeep-web
target: web
tags_latest: ghcr.io/hoarder-app/hoarder-web:latest,ghcr.io/mohamedbassem/hoarder-web:latest,ghcr.io/karakeep-app/karakeep-web:latest
tags_release: ghcr.io/hoarder-app/hoarder-web:${{ github.event.release.name }},ghcr.io/mohamedbassem/hoarder-web:${{ github.event.release.name }},ghcr.io/karakeep-app/karakeep-web:${{ github.event.release.name }},ghcr.io/hoarder-app/hoarder-web:release,ghcr.io/mohamedbassem/hoarder-web:release,ghcr.io/karakeep-app/karakeep-web:release
- image: workers
name: karakeep-workers
target: workers
tags_latest: ghcr.io/hoarder-app/hoarder-workers:latest,ghcr.io/mohamedbassem/hoarder-workers:latest,ghcr.io/karakeep-app/karakeep-workers:latest
tags_release: ghcr.io/hoarder-app/hoarder-workers:${{ github.event.release.name }},ghcr.io/mohamedbassem/hoarder-workers:${{ github.event.release.name }},ghcr.io/karakeep-app/karakeep-workers:${{ github.event.release.name }},ghcr.io/hoarder-app/hoarder-workers:release,ghcr.io/mohamedbassem/hoarder-workers:release,ghcr.io/karakeep-app/karakeep-workers:release
- image: cli
name: karakeep-cli
target: cli
tags_latest: ghcr.io/hoarder-app/hoarder-cli:latest,ghcr.io/mohamedbassem/hoarder-cli:latest,ghcr.io/karakeep-app/karakeep-cli:latest
tags_release: ghcr.io/hoarder-app/hoarder-cli:${{ github.event.release.name }},ghcr.io/mohamedbassem/hoarder-cli:${{ github.event.release.name }},ghcr.io/karakeep-app/karakeep-cli:${{ github.event.release.name }},ghcr.io/hoarder-app/hoarder-cli:release,ghcr.io/mohamedbassem/hoarder-cli:release,ghcr.io/karakeep-app/karakeep-cli:release
- image: mcp
name: karakeep-mcp
target: mcp
tags_latest: ghcr.io/karakeep-app/karakeep-mcp:latest
tags_release: ghcr.io/karakeep-app/karakeep-mcp:${{ github.event.release.name }},ghcr.io/karakeep-app/karakeep-mcp:release
- image: aio
name: karakeep-aio
target: aio
tags_latest: ghcr.io/hoarder-app/hoarder:latest,ghcr.io/karakeep-app/karakeep:latest
tags_release: ghcr.io/hoarder-app/hoarder:${{ github.event.release.name }},ghcr.io/karakeep-app/karakeep:${{ github.event.release.name }},ghcr.io/hoarder-app/hoarder:release,ghcr.io/karakeep-app/karakeep:release
runs-on: ${{ matrix.os }}
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_GITHUB_PAT }}
- name: Prepare tags
id: tags
run: |
set -euo pipefail
add_suffix() {
local value="$1"
local out=""
IFS=',' read -ra items <<< "$value"
for item in "${items[@]}"; do
out+="${item}-${{ matrix.suffix }},"
done
echo "${out%,}"
}
all_tags=""
# Only push 'latest' tags on pushes to main, not on releases
if [[ "${{ github.event_name }}" == "push" ]]; then
latest_with_suffix=$(add_suffix "${{ matrix.tags_latest }}")
all_tags="${latest_with_suffix}"
echo "latest=${latest_with_suffix}" >> "$GITHUB_OUTPUT"
fi
# Only push release-specific tags on releases
if [[ "${{ github.event_name }}" == "release" ]]; then
release_with_suffix=$(add_suffix "${{ matrix.tags_release }}")
all_tags="${release_with_suffix}"
echo "release=${release_with_suffix}" >> "$GITHUB_OUTPUT"
fi
echo "all=${all_tags}" >> "$GITHUB_OUTPUT"
- name: Build ${{ matrix.name }}
uses: docker/build-push-action@v5
with:
context: .
build-args: SERVER_VERSION=${{ github.event_name == 'release' && github.event.release.name || 'nightly' }}
file: docker/Dockerfile
target: ${{ matrix.target }}
platforms: ${{ matrix.platform }}
push: true
tags: ${{ steps.tags.outputs.all }}
cache-from: type=registry,ref=ghcr.io/karakeep-app/karakeep-build-cache:${{ matrix.target }}-${{ matrix.suffix }}
cache-to: type=registry,mode=max,ref=ghcr.io/karakeep-app/karakeep-build-cache:${{ matrix.target }}-${{ matrix.suffix }}
manifest:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
fail-fast: false
matrix:
include:
- name: karakeep-web
tags_latest: ghcr.io/hoarder-app/hoarder-web:latest,ghcr.io/mohamedbassem/hoarder-web:latest,ghcr.io/karakeep-app/karakeep-web:latest
tags_release: ghcr.io/hoarder-app/hoarder-web:${{ github.event.release.name }},ghcr.io/mohamedbassem/hoarder-web:${{ github.event.release.name }},ghcr.io/karakeep-app/karakeep-web:${{ github.event.release.name }},ghcr.io/hoarder-app/hoarder-web:release,ghcr.io/mohamedbassem/hoarder-web:release,ghcr.io/karakeep-app/karakeep-web:release
- name: karakeep-workers
tags_latest: ghcr.io/hoarder-app/hoarder-workers:latest,ghcr.io/mohamedbassem/hoarder-workers:latest,ghcr.io/karakeep-app/karakeep-workers:latest
tags_release: ghcr.io/hoarder-app/hoarder-workers:${{ github.event.release.name }},ghcr.io/mohamedbassem/hoarder-workers:${{ github.event.release.name }},ghcr.io/karakeep-app/karakeep-workers:${{ github.event.release.name }},ghcr.io/hoarder-app/hoarder-workers:release,ghcr.io/mohamedbassem/hoarder-workers:release,ghcr.io/karakeep-app/karakeep-workers:release
- name: karakeep-cli
tags_latest: ghcr.io/hoarder-app/hoarder-cli:latest,ghcr.io/mohamedbassem/hoarder-cli:latest,ghcr.io/karakeep-app/karakeep-cli:latest
tags_release: ghcr.io/hoarder-app/hoarder-cli:${{ github.event.release.name }},ghcr.io/mohamedbassem/hoarder-cli:${{ github.event.release.name }},ghcr.io/karakeep-app/karakeep-cli:${{ github.event.release.name }},ghcr.io/hoarder-app/hoarder-cli:release,ghcr.io/mohamedbassem/hoarder-cli:release,ghcr.io/karakeep-app/karakeep-cli:release
- name: karakeep-mcp
tags_latest: ghcr.io/karakeep-app/karakeep-mcp:latest
tags_release: ghcr.io/karakeep-app/karakeep-mcp:${{ github.event.release.name }},ghcr.io/karakeep-app/karakeep-mcp:release
- name: karakeep-aio
tags_latest: ghcr.io/hoarder-app/hoarder:latest,ghcr.io/karakeep-app/karakeep:latest
tags_release: ghcr.io/hoarder-app/hoarder:${{ github.event.release.name }},ghcr.io/karakeep-app/karakeep:${{ github.event.release.name }},ghcr.io/hoarder-app/hoarder:release,ghcr.io/karakeep-app/karakeep:release
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_GITHUB_PAT }}
- name: Create manifests for ${{ matrix.name }}
env:
TAGS_LATEST: ${{ matrix.tags_latest }}
TAGS_RELEASE: ${{ matrix.tags_release }}
IS_RELEASE: ${{ github.event_name == 'release' }}
IS_PUSH: ${{ github.event_name == 'push' }}
run: |
set -euo pipefail
create_manifest() {
local tag="$1"
docker buildx imagetools create \
-t "${tag}" \
"${tag}-amd64" \
"${tag}-arm64"
}
# Only create 'latest' manifests on pushes to main
if [[ "${IS_PUSH}" == "true" ]]; then
IFS=',' read -ra latest_tags <<< "${TAGS_LATEST}"
for tag in "${latest_tags[@]}"; do
create_manifest "$tag"
done
fi
# Only create release-specific manifests on releases
if [[ "${IS_RELEASE}" == "true" ]]; then
IFS=',' read -ra release_tags <<< "${TAGS_RELEASE}"
for tag in "${release_tags[@]}"; do
create_manifest "$tag"
done
fi
================================================
FILE: .github/workflows/extension.yml
================================================
name: Extension Release Build
on:
push:
tags:
- 'extension/v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Build the extension (chrome)
working-directory: apps/browser-extension
run: pnpm run build --outDir dist-chrome
- name: Build the extension (firefox)
env:
VITE_BUILD_FIREFOX: true
working-directory: apps/browser-extension
run: pnpm run build --outDir dist-firefox
- name: Upload Extension Archive (chrome)
uses: actions/upload-artifact@v4
with:
name: karakeep-extension-chrome
path: apps/browser-extension/dist-chrome/*
- name: Upload Extension Archive (firefox)
uses: actions/upload-artifact@v4
with:
name: karakeep-extension-firefox
path: apps/browser-extension/dist-firefox/*
================================================
FILE: .github/workflows/ios.yml
================================================
name: iOS App Release Build
on:
push:
tags:
- 'ios/v[0-9]+.[0-9]+.[0-9]+-[0-9]+'
jobs:
build:
runs-on: macos-26
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Build iOS app
working-directory: apps/mobile
run: eas build --platform ios --local --non-interactive --output ${{ github.workspace }}/app-release.ipa
env:
EAS_SKIP_AUTO_FINGERPRINT: "1"
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Upload IPA artifact
uses: actions/upload-artifact@v4
with:
name: karakeep-ios
path: ${{ github.workspace }}/app-release.ipa
================================================
FILE: .github/workflows/mcp.yml
================================================
name: Publish MCP Package to npm
on:
push:
tags:
# This is a glob pattern not a regex
- "mcp/v[0-9]+.[0-9]+.[0-9]+"
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Build MCP
run: pnpm build
working-directory: apps/mcp
# npm 11.5.1 or later is required for trusted publishing
- run: npm install -g npm@latest
- run: pnpm publish --access public --no-git-checks
working-directory: apps/mcp
================================================
FILE: .github/workflows/sdk.yml
================================================
name: Publish CLI Package to npm
on:
push:
tags:
# This is a glob pattern not a regex
- "sdk/v[0-9]+.[0-9]+.[0-9]+"
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Build SDK
run: pnpm build
working-directory: packages/sdk
# npm 11.5.1 or later is required for trusted publishing
- run: npm install -g npm@latest
- run: pnpm publish --access public --no-git-checks
working-directory: packages/sdk
================================================
FILE: .gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
node_modules
.pnp
.pnpm-store
.pnp.js
.yarn/install-state.gz
# testing
coverage
# next.js
.next/
out/
# production
build
dist
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env*.local
.env
# vercel
.vercel
# typescript
*.tsbuildinfo
# The sqlite database
**/*.db
data
# PWA Files
**/public/sw.js
**/public/workbox-*.js
**/public/worker-*.js
**/public/sw.js.map
**/public/workbox-*.js.map
**/public/worker-*.js.map
# Turbo
.turbo
# Idea
.idea
*.iml
# Aider
.aider*
# VS-Code
.vscode
auth_failures.log
.claude/settings.local.json
# Local directory for AI agent contexts
.aicontext/
.codex
.claude/worktrees
jean.json
================================================
FILE: .husky/pre-commit
================================================
pnpm preflight
pnpm exec sherif
pnpm run --filter @karakeep/open-api check
================================================
FILE: .npmrc
================================================
node-linker=hoisted
================================================
FILE: .oxfmtrc.json
================================================
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"sortTailwindcss": {
"config": "tooling/tailwind/web.ts",
"functions": [
"cn",
"cva"
]
},
"importOrder": [
"<TYPES>",
"^(react/(.*)$)|^(react$)|^(react-native(.*)$)",
"^(next/(.*)$)|^(next$)",
"^(expo(.*)$)|^(expo$)",
"<THIRD_PARTY_MODULES>",
"",
"<TYPES>^@karakeep",
"^@karakeep/(.*)$",
"",
"<TYPES>^[.|..|~]",
"^~/",
"^[../]",
"^[./]"
],
"importOrderParserPlugins": [
"typescript",
"jsx",
"decorators-legacy"
],
"importOrderTypeScriptVersion": "4.4.0",
"printWidth": 80,
"sortPackageJson": false,
"ignorePatterns": [
".next",
"build",
"coverage",
".vscode*",
"node_modules",
"dist",
"*.md",
"*.json",
".env",
".env.*",
"**/migrations/**",
"packages/open-api/karakeep-openapi-spec.json",
"apps/web/public/workbox-*.js",
"pnpm-lock.yaml",
"package-lock.json",
"yarn.lock",
"**/.expo/**",
"apps/mobile/android",
"apps/mobile/ios"
]
}
================================================
FILE: .oxlintrc.json
================================================
{
"$schema": "node_modules/oxlint/configuration_schema.json",
"ignorePatterns": [
"**/*.config.js",
"**/*.config.cjs",
"**/.eslintrc.cjs",
"**/.next",
"**/dist",
"**/build",
"**/pnpm-lock.yaml"
]
}
================================================
FILE: AGENTS.md
================================================
# Karakeep Project Overview
This document provides context about the Karakeep project for the different agents.
## Project Overview
Karakeep is a monorepo project managed with Turborepo. It appears to be a web application with a focus on collecting and organizing information, possibly a bookmarking or "read-it-later" service. The project is built with a modern tech stack, including:
- **Frontend:** Next.js, React, TypeScript, Tailwind CSS
- **Backend:** Hono (a lightweight web framework), tRPC
- **Database:** Drizzle ORM (likely with a relational database like PostgreSQL or SQLite)
- **Tooling:** Oxfmt, oxlint, Vitest, pnpm
## Project Structure
The project is organized into `apps` and `packages`:
### Applications (`apps/`)
- **`web`:** The main web application, built with Next.js.
- **`browser-extension`:** A browser extension, likely for saving content to karakeep.
- **`cli`:** A command-line interface for interacting with the service.
- **`landing`:** A landing page for the project.
- **`mobile`:** A mobile application (details unknown).
- **`mcp`:** The Model Context Protocol (MCP) server to communicate with Karakeep.
- **`workers`:** Background workers for processing tasks.
### Packages (`packages/`)
- **`api`:** The main API, built with Hono and tRPC.
- **`db`:** Database schema and migrations, using Drizzle ORM.
- **`e2e_tests`:** End-to-end tests for the project.
- **`open-api`:** OpenAPI specifications for the API.
- **`sdk`:** A software development kit for interacting with the API.
- **`shared`:** Shared code and types between packages.
- **`shared-react`:** Shared React components and hooks.
- **`shared-server`:** Shared logic that's meant to be used on the server-side.
- **`trpc`:** tRPC router and procedures. Most of the business logic is here.
### Docs
- **docs/docs/03-configuration.md**: Explains configuration options for the project.
## Development Workflow
- **Package Manager:** pnpm
- **Build System:** Turborepo
- **Code Formatting:** Oxfmt
- **Linting:** oxlint
- **Testing:** Vitest
## Other info
- This project uses shadcn/ui. The shadcn components in the web app are in `packages/web/components/ui`.
- This project uses Tailwind CSS.
- For the mobile app, we use [expo](https://expo.dev/).
### Common Commands
- `pnpm typecheck`: Typecheck the codebase.
- `pnpm lint`: Lint the codebase.
- `pnpm lint:fix`: Fix linting issues.
- `pnpm format`: Format the codebase.
- `pnpm format:fix`: Fix formatting issues.
- `pnpm test`: Run tests.
- `pnpm db:generate --name description_of_schema_change`: db migration after making schema changes
Starting services:
- `pnpm web`: Start the web application (this doesn't return, unless you kill it).
- `pnpm workers`: Starts the background workers (this doesn't return, unless you kill it).
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Karakeep
First off, thank you for considering contributing to our project! This document outlines our contribution process and guidelines to make it easy for you to help improve this project.
## How Can I Contribute?
### Asking Questions
If you have questions:
* Use the GitHub Discussions Q&A section
* Search existing discussions to see if your question has been answered
* If not found, create a new discussion with a clear, descriptive title
### Reporting Bugs
If in doubt, about whether a problem you're seeing is a bug or not, use the discussions Q&A section instead. If it turns out to be a bug, we'll promote it into an issue. If you're sure it's a bug:
* Create a new issue using the bug report template
* Include a clear description and steps to reproduce
* Wait for triage and labeling by maintainers
### Suggesting Features
For feature requests:
* If you find a similar feature request, upvote it instead of creating a new one to help us prioritize it
* Create a new issue using the feature request template
* New features start with the `status/untriaged` label
* If the feature request is approved, the maintainers will add the `status/approved` label and assign a priority to the issue
* Other issues will get labeled with `status/icebox`. Issues in the icebox are not prioritized, until there's enough interest from the community
### Working on Issues
Before starting to work on an issue:
* Prefer working on `status/approved` issues to make sure they get prioritized for the review
* Comment on the issue to let others know you're working on it
* Read the [development documentation](https://docs.karakeep.app/Development/setup) to get started
* If you need help, you can find us in the #development channel in the [Karakeep Discord](https://discord.com/invite/NrgeYywsFh).
* Once you're done, open a PR and wait for review. Try to include a screenshot of the change in the PR description.
Please note that we're all volunteers. We'll aim to review your PR within a week from when they are opened.
================================================
FILE: LICENSE
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
================================================
FILE: README.md
================================================
<div align="center">
<a href="https://github.com/karakeep-app/karakeep/actions/workflows/ci.yml">
<img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/karakeep-app/karakeep/ci.yml" />
</a>
<a href="https://github.com/karakeep-app/karakeep/releases">
<img alt="GitHub Release" src="https://img.shields.io/github/v/release/karakeep-app/karakeep" />
</a>
<a href="https://discord.gg/NrgeYywsFh">
<img alt="Discord" src="https://img.shields.io/discord/1223681308962721802?label=chat%20on%20discord" />
</a>
<a href="https://hosted.weblate.org/engage/hoarder/">
<img src="https://hosted.weblate.org/widget/hoarder/hoarder/svg-badge.svg" alt="Translation status" />
</a>
</div>
# <img height="50px" src="./screenshots/logo.png" />
Karakeep (previously Hoarder) is a self-hostable bookmark-everything app with a touch of AI for the data hoarders out there.

## Features
- 🔗 Bookmark links, take simple notes and store images and pdfs.
- ⬇️ Automatic fetching for link titles, descriptions and images.
- 📋 Sort your bookmarks into lists.
- 👥 Collaborate with others on the same list.
- 🔎 Full text search of all the content stored.
- ✨ AI-based (aka chatgpt) automatic tagging and summarization. With supports for local models using ollama!
- 🤖 Rule-based engine for customized management.
- 🎆 OCR for extracting text from images.
- 🔖 [Chrome plugin](https://chromewebstore.google.com/detail/karakeep/kgcjekpmcjjogibpjebkhaanilehneje) and [Firefox addon](https://addons.mozilla.org/en-US/firefox/addon/karakeep/) for quick bookmarking.
- 📱 An [iOS app](https://apps.apple.com/us/app/karakeep-app/id6479258022), and an [Android app](https://play.google.com/store/apps/details?id=app.hoarder.hoardermobile&pcampaignid=web_share).
- 📰 Auto hoarding from RSS feeds.
- 🔌 REST API and multiple clients.
- 🌐 Multi-language support.
- 🖍️ Mark and store highlights from your hoarded content.
- 🗄️ Full page archival (using [monolith](https://github.com/Y2Z/monolith)) to protect against link rot.
- ▶️ Auto video archiving using [yt-dlp](https://github.com/yt-dlp/yt-dlp).
- ☑️ Bulk actions support.
- 🔐 SSO support.
- 🌙 Dark mode support.
- 💾 Self-hosting first.
- ⬇️ Bookmark importers from Chrome, Pocket, Linkwarden, Omnivore, Tab Session Manager.
- 🔄 Automatic sync with browser bookmarks via [floccus](https://floccus.org/).
- [Planned] Offline reading on mobile, semantic search across bookmarks, ...
**⚠️ This app is under heavy development.**
## Documentation
- [Installation](https://docs.karakeep.app/Installation/docker)
- [Configuration](https://docs.karakeep.app/configuration)
- [Screenshots](https://docs.karakeep.app/screenshots)
- [Security Considerations](https://docs.karakeep.app/security-considerations)
- [Development](https://docs.karakeep.app/Development/setup)
## Demo
You can access the demo at [https://try.karakeep.app](https://try.karakeep.app). Login with the following creds:
```
email: demo@karakeep.app
password: demodemo
```
The demo is seeded with some content, but it's in read-only mode to prevent abuse.
## About the name
The name Karakeep is inspired by the Arabic word "كراكيب" (karakeeb), a colloquial term commonly used to refer to miscellaneous clutter, odds and ends, or items that may seem disorganized but often hold personal value or hidden usefulness. It evokes the image of a messy drawer or forgotten box, full of stuff you can't quite throw away—because somehow, it matters (or more likely, because you're a hoarder!).
## Stack
- [NextJS](https://nextjs.org/) for the web app. Using app router.
- [Drizzle](https://orm.drizzle.team/) for the database and its migrations.
- [NextAuth](https://next-auth.js.org) for authentication.
- [tRPC](https://trpc.io) for client->server communication.
- [Puppeteer](https://pptr.dev/) for crawling the bookmarks.
- [OpenAI](https://openai.com/) because AI is so hot right now.
- [Meilisearch](https://meilisearch.com) for the full content search.
## Why did I build it?
I browse reddit, twitter and hackernews a lot from my phone. I frequently find interesting stuff (articles, tools, etc) that I'd like to bookmark and read later when I'm in front of a laptop. Typical read-it-later apps usecase. Initially, I was using [Pocket](https://getpocket.com) for that. Then I got into self-hosting and I wanted to self-host this usecase. I used [memos](https://github.com/usememos/memos) for those quick notes and I loved it but it was lacking some features that I found important for that usecase such as link previews and automatic tagging (more on that in the next section).
I'm a systems engineer in my day job (and have been for the past 7 years). I didn't want to get too detached from the web development world. I decided to build this app as a way to keep my hand dirty with web development, and at the same time, build something that I care about and use every day.
## Alternatives
- [memos](https://github.com/usememos/memos): I love memos. I have it running on my home server and it's one of my most used self-hosted apps. It doesn't, however, archive or preview the links shared in it. It's just that I dump a lot of links there and I'd have loved if I'd be able to figure which link is that by just looking at my timeline. Also, given the variety of things I dump there, I'd have loved if it does some sort of automatic tagging for what I save there. This is exactly the usecase that I'm trying to tackle with Karakeep.
- [mymind](https://mymind.com/): Mymind is the closest alternative to this project and from where I drew a lot of inspirations. It's a commercial product though.
- [raindrop](https://raindrop.io): A polished open source bookmark manager that supports links, images and files. It's not self-hostable though.
- Bookmark managers (mostly focused on bookmarking links):
- [Pocket](https://getpocket.com) (Dead): Pocket is what hooked me into the whole idea of read-it-later apps. I used it [a lot](https://blog.mbassem.com/2019/01/27/favorite-articles-2018/). However, I recently got into home-labbing and became obsessed with the idea of running my services in my home server. Karakeep is meant to be a self-hosting first app. Mozilla recently announced that it's shutting down pocket.
- [Linkwarden](https://linkwarden.app/): An open-source self-hostable bookmark manager that I ran for a bit in my homelab. It's focused mostly on links and supports collaborative collections.
- [Wallabag](https://wallabag.it): Wallabag is a well-established open source read-it-later app written in php.
- [Shiori](https://github.com/go-shiori/shiori): Shiori is meant to be an open source pocket clone written in Go.
## Translations
Karakeep uses Weblate for managing translations. If you want to help translate Karakeep, you can do so [here](https://hosted.weblate.org/engage/hoarder/).
## Karakeep Cloud ☁️
If you're not comfortable with self-hosting, you can use our managed Karakeep cloud at [cloud.karakeep.app](https://cloud.karakeep.app). Cloud subscriptions support the development of Karakeep.
## Support
If you're enjoying using Karakeep, drop a ⭐️ on the repo!
<a href="https://www.buymeacoffee.com/mbassem" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
## Community Channels
- Join us on [Discord](https://discord.gg/NrgeYywsFh).
- Follow us on Twitter: [@karakeep_app](https://x.com/karakeep_app).
## License
Karakeep is licensed under [AGPL-3.0](https://github.com/karakeep-app/karakeep/blob/main/LICENSE) and owned by [Localhost Labs Ltd](https://localhostlabs.co.uk).
## Star History
[](https://star-history.com/#karakeep-app/karakeep&Date)
================================================
FILE: SECURITY.md
================================================
# Security Policy
## Reporting a Vulnerability
Please report security issues to `security@karakeep.app`
================================================
FILE: apps/browser-extension/.gitignore
================================================
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
================================================
FILE: apps/browser-extension/.oxlintrc.json
================================================
{
"$schema": "../../node_modules/oxlint/configuration_schema.json",
"extends": [
"../../tooling/oxlint/oxlint-base.json",
"../../tooling/oxlint/oxlint-react.json"
],
"env": {
"builtin": true,
"commonjs": true,
"browser": true,
"es2022": true,
"node": true
},
"globals": {
"React": "writeable"
},
"settings": {
"react": {
"version": "19"
}
},
"ignorePatterns": [
"**/*.config.js",
"**/*.config.cjs",
"**/.eslintrc.cjs",
".next",
"dist",
"build",
"pnpm-lock.yaml"
]
}
================================================
FILE: apps/browser-extension/components.json
================================================
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/index.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "src/components",
"utils": "src/utils/css"
}
}
================================================
FILE: apps/browser-extension/index.html
================================================
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Karakeep</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
================================================
FILE: apps/browser-extension/manifest.json
================================================
{
"manifest_version": 3,
"name": "Karakeep",
"description": "An extension to bookmark links to karakeep.app",
"version": "1.2.9",
"icons": {
"16": "public/logo-16.png",
"48": "public/logo-48.png",
"128": "public/logo-128.png"
},
"action": {
"default_popup": "index.html",
"theme_icons": [
{
"light": "logo-16-darkmode.png",
"dark": "logo-16.png",
"size": 16
},
{
"light": "logo-48-darkmode.png",
"dark": "logo-48.png",
"size": 48
},
{
"light": "logo-128-darkmode.png",
"dark": "logo-128.png",
"size": 128
}
]
},
"background": {
"service_worker": "src/background/background.ts",
"scripts": ["src/background/background.ts"]
},
"options_ui": {
"page": "index.html#options",
"open_in_tab": false
},
"browser_specific_settings": {
"gecko": {
"id": "addon@karakeep.app"
}
},
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'"
},
"permissions": ["storage", "tabs", "contextMenus"],
"commands": {
"add-link": {
"suggested_key": {
"default": "Ctrl+Shift+E"
},
"description": "Send the current page URL to Karakeep."
}
}
}
================================================
FILE: apps/browser-extension/package.json
================================================
{
"name": "@karakeep/browser-extension",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"format": "oxfmt --check .",
"format:fix": "oxfmt .",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"preview": "vite preview",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@karakeep/shared": "workspace:^0.1.0",
"@karakeep/shared-react": "workspace:^0.1.0",
"@karakeep/trpc": "workspace:^0.1.0",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-popover": "^1.1.14",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-slot": "^1.2.4",
"@tanstack/query-async-storage-persister": "5.90.2",
"@tanstack/react-query": "5.90.2",
"@tanstack/react-query-persist-client": "5.90.2",
"@trpc/client": "^11.9.0",
"@trpc/server": "^11.9.0",
"@trpc/tanstack-react-query": "^11.9.0",
"@uidotdev/usehooks": "^2.4.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"cmdk": "^1.1.1",
"lucide-react": "^0.501.0",
"react": "^19.2.1",
"react-dom": "^19.2.1",
"react-router-dom": "^6.22.0",
"superjson": "^2.2.1",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.24.2"
},
"devDependencies": {
"@crxjs/vite-plugin": "2.2.0",
"@karakeep/tailwind-config": "workspace:^0.1.0",
"@karakeep/tsconfig": "workspace:^0.1.0",
"@types/chrome": "^0.0.260",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react-swc": "^4.0.1",
"autoprefixer": "^10.4.17",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1",
"typescript": "^5.9",
"vite": "^7.0.6"
}
}
================================================
FILE: apps/browser-extension/postcss.config.js
================================================
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
================================================
FILE: apps/browser-extension/src/BookmarkDeletedPage.tsx
================================================
export default function BookmarkDeletedPage() {
return <p className="text-xl">Bookmark Deleted!</p>;
}
================================================
FILE: apps/browser-extension/src/BookmarkSavedPage.tsx
================================================
import { useState } from "react";
import { ArrowUpRightFromSquare, Trash } from "lucide-react";
import { Link, useNavigate, useParams } from "react-router-dom";
import { useDeleteBookmark } from "@karakeep/shared-react/hooks/bookmarks";
import BookmarkLists from "./components/BookmarkLists";
import { ListsSelector } from "./components/ListsSelector";
import { NoteEditor } from "./components/NoteEditor";
import TagList from "./components/TagList";
import { TagsSelector } from "./components/TagsSelector";
import { Button, buttonVariants } from "./components/ui/button";
import Spinner from "./Spinner";
import { cn } from "./utils/css";
import usePluginSettings from "./utils/settings";
import { MessageType } from "./utils/type";
export default function BookmarkSavedPage() {
const { bookmarkId } = useParams();
const navigate = useNavigate();
const [error, setError] = useState("");
const { mutate: deleteBookmark, isPending } = useDeleteBookmark({
onSuccess: async () => {
const [currentTab] = await chrome.tabs.query({
active: true,
lastFocusedWindow: true,
});
await chrome.runtime.sendMessage({
type: MessageType.BOOKMARK_REFRESH_BADGE,
currentTab: currentTab,
});
navigate("/bookmarkdeleted");
},
onError: (e) => {
setError(e.message);
},
});
const { settings } = usePluginSettings();
if (!bookmarkId) {
return <div>NOT FOUND</div>;
}
return (
<div className="flex flex-col gap-2">
{error && <p className="text-red-500">{error}</p>}
<div className="flex items-center justify-between gap-2">
<p className="text-xl">Hoarded!</p>
<div className="flex gap-2">
<Link
className={cn(
buttonVariants({ variant: "link" }),
"flex gap-2 rounded-md p-3",
)}
target="_blank"
rel="noreferrer"
to={`${settings.address}/dashboard/preview/${bookmarkId}`}
>
<ArrowUpRightFromSquare className="my-auto" size="20" />
<p className="my-auto">Open</p>
</Link>
<Button
variant="link"
onClick={() => deleteBookmark({ bookmarkId })}
className="flex gap-2 text-red-500 hover:text-red-500"
>
{!isPending ? (
<>
<Trash className="my-auto" size="20" />
<p className="my-auto">Delete</p>
</>
) : (
<span className="m-auto">
<Spinner />
</span>
)}
</Button>
</div>
</div>
<hr />
<p className="text-lg">Notes</p>
<NoteEditor bookmarkId={bookmarkId} />
<hr />
<p className="text-lg">Tags</p>
<TagList bookmarkId={bookmarkId} />
<TagsSelector bookmarkId={bookmarkId} />
<hr />
<p className="text-lg">Lists</p>
<BookmarkLists bookmarkId={bookmarkId} />
<ListsSelector bookmarkId={bookmarkId} />
</div>
);
}
================================================
FILE: apps/browser-extension/src/CustomHeadersPage.tsx
================================================
import { useEffect, useState } from "react";
import { Plus, Trash2 } from "lucide-react";
import { useNavigate } from "react-router-dom";
import { Button } from "./components/ui/button";
import { Input } from "./components/ui/input";
import Logo from "./Logo";
import usePluginSettings from "./utils/settings";
export default function CustomHeadersPage() {
const navigate = useNavigate();
const { settings, setSettings } = usePluginSettings();
// Convert headers object to array of entries for easier manipulation
const [headers, setHeaders] = useState<{ key: string; value: string }[]>([]);
const [newHeaderKey, setNewHeaderKey] = useState("");
const [newHeaderValue, setNewHeaderValue] = useState("");
// Update headers when settings change (e.g., when loaded from storage)
useEffect(() => {
setHeaders(
Object.entries(settings.customHeaders || {}).map(([key, value]) => ({
key,
value,
})),
);
}, [settings.customHeaders]);
const handleAddHeader = () => {
if (!newHeaderKey.trim() || !newHeaderValue.trim()) {
return;
}
// Check if header already exists
const existingIndex = headers.findIndex((h) => h.key === newHeaderKey);
if (existingIndex >= 0) {
// Update existing header
const updatedHeaders = [...headers];
updatedHeaders[existingIndex].value = newHeaderValue;
setHeaders(updatedHeaders);
} else {
// Add new header
setHeaders([...headers, { key: newHeaderKey, value: newHeaderValue }]);
}
setNewHeaderKey("");
setNewHeaderValue("");
};
const handleRemoveHeader = (index: number) => {
setHeaders(headers.filter((_, i) => i !== index));
};
const handleSave = () => {
// Convert array back to object
const headersObject = headers.reduce(
(acc, { key, value }) => {
if (key.trim() && value.trim()) {
acc[key] = value;
}
return acc;
},
{} as Record<string, string>,
);
setSettings((s) => ({ ...s, customHeaders: headersObject }));
navigate(-1);
};
const handleCancel = () => {
navigate(-1);
};
return (
<div className="flex flex-col space-y-2">
<Logo />
<span className="text-lg">Custom Headers</span>
<p className="text-sm text-muted-foreground">
Add custom HTTP headers that will be sent with every API request.
</p>
<hr />
{/* Existing Headers List */}
<div className="max-h-64 space-y-2 overflow-y-auto">
{headers.length === 0 ? (
<p className="py-4 text-center text-sm text-muted-foreground">
No custom headers configured
</p>
) : (
headers.map((header, index) => (
<div
key={index}
className="flex items-center gap-2 rounded-lg border bg-background p-3"
>
<div className="flex-1 space-y-1">
<p className="text-sm font-semibold">{header.key}</p>
<p className="truncate text-xs text-muted-foreground">
{header.value}
</p>
</div>
<Button
variant="ghost"
size="sm"
onClick={() => handleRemoveHeader(index)}
className="h-8 w-8 p-0 text-destructive hover:text-destructive"
>
<Trash2 className="h-4 w-4" />
</Button>
</div>
))
)}
</div>
<hr />
{/* Add New Header */}
<div className="space-y-2">
<p className="text-sm font-semibold">Add New Header</p>
<Input
placeholder="Header Name (e.g., X-Custom-Header)"
value={newHeaderKey}
onChange={(e) => setNewHeaderKey(e.target.value)}
autoCapitalize="none"
/>
<Input
placeholder="Header Value"
value={newHeaderValue}
onChange={(e) => setNewHeaderValue(e.target.value)}
autoCapitalize="none"
/>
<Button
variant="secondary"
onClick={handleAddHeader}
disabled={!newHeaderKey.trim() || !newHeaderValue.trim()}
className="w-full"
>
<Plus className="mr-2 h-4 w-4" />
Add Header
</Button>
</div>
<hr />
{/* Action Buttons */}
<div className="flex gap-2">
<Button variant="outline" onClick={handleCancel} className="flex-1">
Cancel
</Button>
<Button onClick={handleSave} className="flex-1">
Save
</Button>
</div>
</div>
);
}
================================================
FILE: apps/browser-extension/src/Layout.tsx
================================================
import { Home, RefreshCw, Settings, X } from "lucide-react";
import { Outlet, useNavigate } from "react-router-dom";
import { Button } from "./components/ui/button";
import usePluginSettings from "./utils/settings";
export default function Layout() {
const navigate = useNavigate();
const { settings, isPending: isInit } = usePluginSettings();
if (!isInit) {
return <div className="p-4">Loading ... </div>;
}
if (!settings.apiKey || !settings.address) {
navigate("/notconfigured");
return;
}
return (
<div className="flex flex-col space-y-2">
<div className="rounded-md bg-gray-100 p-4 dark:bg-gray-900">
<Outlet />
</div>
<hr />
<div className="flex justify-between space-x-3">
<div className="my-auto">
<a
className="flex gap-2 text-foreground"
target="_blank"
rel="noreferrer"
href={`${settings.address}/dashboard/bookmarks`}
>
<Home />
<span className="text-md my-auto">Bookmarks</span>
</a>
</div>
<div className="flex space-x-3">
{process.env.NODE_ENV == "development" && (
<Button onClick={() => navigate(0)}>
<RefreshCw className="w-4" />
</Button>
)}
<Button onClick={() => navigate("/options")}>
<Settings className="w-4" />
</Button>
<Button onClick={() => window.close()}>
<X className="w-4" />
</Button>
</div>
</div>
</div>
);
}
================================================
FILE: apps/browser-extension/src/Logo.tsx
================================================
import logoImgWhite from "../public/logo-full-white.png";
import logoImg from "../public/logo-full.png";
export default function Logo() {
return (
<span className="flex items-center justify-center">
<img src={logoImg} alt="karakeep logo" className="h-14 dark:hidden" />
<img
src={logoImgWhite}
alt="karakeep logo"
className="hidden h-14 dark:block"
/>
</span>
);
}
================================================
FILE: apps/browser-extension/src/NotConfiguredPage.tsx
================================================
import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { Button } from "./components/ui/button";
import { Input } from "./components/ui/input";
import Logo from "./Logo";
import usePluginSettings from "./utils/settings";
import { isHttpUrl } from "./utils/url";
export default function NotConfiguredPage() {
const navigate = useNavigate();
const { settings, setSettings } = usePluginSettings();
const [error, setError] = useState("");
const [serverAddress, setServerAddress] = useState(settings.address);
useEffect(() => {
setServerAddress(settings.address);
}, [settings.address]);
const onSave = () => {
const input = serverAddress.trim();
if (input == "") {
setError("Server address is required");
return;
}
// Add URL protocol validation
if (!isHttpUrl(input)) {
setError("Server address must start with http:// or https://");
return;
}
setSettings((s) => ({ ...s, address: input.replace(/\/$/, "") }));
navigate("/signin");
};
return (
<div className="flex flex-col space-y-2">
<Logo />
<span className="pt-3">
To use the plugin, you need to configure it first.
</span>
<p className="text-red-500">{error}</p>
<div className="flex gap-2">
<label className="my-auto">Server Address</label>
<Input
name="address"
value={serverAddress}
className="h-8 flex-1 rounded-lg border border-gray-300 p-2"
onChange={(e) => setServerAddress(e.target.value)}
/>
</div>
<div className="flex justify-start">
<button
type="button"
onClick={() => navigate("/customheaders")}
className="text-xs text-muted-foreground underline hover:text-foreground"
>
Configure Custom Headers
{settings.customHeaders &&
Object.keys(settings.customHeaders).length > 0 &&
` (${Object.keys(settings.customHeaders).length})`}
</button>
</div>
<Button onClick={onSave}>Configure</Button>
</div>
);
}
================================================
FILE: apps/browser-extension/src/OptionsPage.tsx
================================================
import React, { useEffect } from "react";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { useNavigate } from "react-router-dom";
import { Button } from "./components/ui/button";
import { Input } from "./components/ui/input";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "./components/ui/select";
import { Switch } from "./components/ui/switch";
import Logo from "./Logo";
import Spinner from "./Spinner";
import usePluginSettings, {
DEFAULT_BADGE_CACHE_EXPIRE_MS,
} from "./utils/settings";
import { useTheme } from "./utils/ThemeProvider";
import { useTRPC } from "./utils/trpc";
export default function OptionsPage() {
const api = useTRPC();
const queryClient = useQueryClient();
const navigate = useNavigate();
const { settings, setSettings } = usePluginSettings();
const { setTheme, theme } = useTheme();
const { data: whoami, error: whoAmIError } = useQuery(
api.users.whoami.queryOptions(undefined, {
enabled: settings.address != "",
}),
);
const { mutate: deleteKey } = useMutation(
api.apiKeys.revoke.mutationOptions(),
);
const invalidateWhoami = () => {
queryClient.refetchQueries(api.users.whoami.queryFilter());
};
useEffect(() => {
invalidateWhoami();
}, [settings]);
let loggedInMessage: React.ReactNode;
if (whoAmIError) {
if (whoAmIError.data?.code == "UNAUTHORIZED") {
loggedInMessage = <span>Not logged in</span>;
} else {
loggedInMessage = (
<span>Something went wrong: {whoAmIError.message}</span>
);
}
} else if (whoami) {
loggedInMessage = <span>{whoami.email}</span>;
} else {
loggedInMessage = <Spinner />;
}
const onLogout = () => {
if (settings.apiKeyId) {
deleteKey({ id: settings.apiKeyId });
}
setSettings((s) => ({ ...s, apiKey: "", apiKeyId: undefined }));
invalidateWhoami();
navigate("/notconfigured");
};
return (
<div className="flex flex-col space-y-2">
<Logo />
<span className="text-lg">Settings</span>
<hr />
<div className="flex items-center justify-between gap-2">
<span className="text-sm font-medium">Show count badge</span>
<Switch
checked={settings.showCountBadge}
onCheckedChange={(checked) =>
setSettings((s) => ({ ...s, showCountBadge: checked }))
}
/>
</div>
{settings.showCountBadge && (
<>
<div className="flex items-center justify-between gap-2">
<span className="text-sm font-medium">Use badge cache</span>
<Switch
checked={settings.useBadgeCache}
onCheckedChange={(checked) =>
setSettings((s) => ({ ...s, useBadgeCache: checked }))
}
/>
</div>
{settings.useBadgeCache && (
<>
<div className="flex items-center justify-between gap-2">
<span className="text-sm font-medium">
Badge cache expire time (second)
</span>
<Input
type="number"
min="1"
step="1"
value={settings.badgeCacheExpireMs / 1000}
onChange={(e) =>
setSettings((s) => ({
...s,
badgeCacheExpireMs:
parseInt(e.target.value) * 1000 ||
DEFAULT_BADGE_CACHE_EXPIRE_MS,
}))
}
className="w-32"
/>
</div>
</>
)}
</>
)}
<hr />
<div className="flex gap-2">
<span className="my-auto">Server Address:</span>
{settings.address}
</div>
<div className="flex gap-2">
<span className="my-auto">Logged in as:</span>
{loggedInMessage}
</div>
<div className="flex gap-2">
<span className="my-auto">Theme:</span>
<Select value={theme} onValueChange={setTheme}>
<SelectTrigger className="w-24">
<SelectValue placeholder="Theme" />
</SelectTrigger>
<SelectContent>
<SelectItem value="light">Light</SelectItem>
<SelectItem value="dark">Dark</SelectItem>
<SelectItem value="system">System</SelectItem>
</SelectContent>
</Select>
</div>
<Button onClick={onLogout}>Logout</Button>
</div>
);
}
================================================
FILE: apps/browser-extension/src/SavePage.tsx
================================================
import { useEffect, useState } from "react";
import { useMutation } from "@tanstack/react-query";
import { Navigate } from "react-router-dom";
import {
BookmarkTypes,
ZNewBookmarkRequest,
zNewBookmarkRequestSchema,
} from "@karakeep/shared/types/bookmarks";
import { NEW_BOOKMARK_REQUEST_KEY_NAME } from "./background/protocol";
import Spinner from "./Spinner";
import { useTRPC } from "./utils/trpc";
import { MessageType } from "./utils/type";
import { isHttpUrl } from "./utils/url";
export default function SavePage() {
const api = useTRPC();
const [error, setError] = useState<string | undefined>(undefined);
const {
data,
mutate: createBookmark,
status,
} = useMutation(
api.bookmarks.createBookmark.mutationOptions({
onError: (e) => {
setError("Something went wrong: " + e.message);
},
onSuccess: async () => {
// After successful creation, update badge cache and notify background
const [currentTab] = await chrome.tabs.query({
active: true,
lastFocusedWindow: true,
});
await chrome.runtime.sendMessage({
type: MessageType.BOOKMARK_REFRESH_BADGE,
currentTab: currentTab,
});
},
}),
);
useEffect(() => {
async function getNewBookmarkRequestFromBackgroundScriptIfAny(): Promise<ZNewBookmarkRequest | null> {
const { [NEW_BOOKMARK_REQUEST_KEY_NAME]: req } =
await chrome.storage.session.get(NEW_BOOKMARK_REQUEST_KEY_NAME);
if (!req) {
return null;
}
// Delete the request immediately to avoid issues with lingering values
await chrome.storage.session.remove(NEW_BOOKMARK_REQUEST_KEY_NAME);
return zNewBookmarkRequestSchema.parse(req);
}
async function runSave() {
let newBookmarkRequest =
await getNewBookmarkRequestFromBackgroundScriptIfAny();
if (!newBookmarkRequest) {
const [currentTab] = await chrome.tabs.query({
active: true,
lastFocusedWindow: true,
});
if (!currentTab.url) {
setError("Current tab has no URL to bookmark.");
return;
}
if (!isHttpUrl(currentTab.url)) {
setError(
"Cannot bookmark this type of URL. Only HTTP/HTTPS URLs are supported.",
);
return;
}
newBookmarkRequest = {
type: BookmarkTypes.LINK,
title: currentTab.title,
url: currentTab.url,
source: "extension",
};
}
createBookmark({
...newBookmarkRequest,
source: newBookmarkRequest.source || "extension",
});
}
runSave();
}, [createBookmark]);
if (error) {
return <div className="text-red-500">{error}</div>;
}
switch (status) {
case "error": {
return <div className="text-red-500">{error}</div>;
}
case "success": {
return <Navigate to={`/bookmark/${data.id}`} />;
}
case "pending": {
return (
<div className="flex justify-between text-lg">
<span>Saving Bookmark </span>
<Spinner />
</div>
);
}
case "idle": {
return <div />;
}
}
}
================================================
FILE: apps/browser-extension/src/SignInPage.tsx
================================================
import { useState } from "react";
import { useMutation } from "@tanstack/react-query";
import { useNavigate } from "react-router-dom";
import { Button } from "./components/ui/button";
import { Input } from "./components/ui/input";
import Logo from "./Logo";
import usePluginSettings from "./utils/settings";
import { useTRPC } from "./utils/trpc";
const enum LoginState {
NONE = "NONE",
USERNAME_PASSWORD = "USERNAME/PASSWORD",
API_KEY = "API_KEY",
}
export default function SignInPage() {
const api = useTRPC();
const navigate = useNavigate();
const { settings, setSettings } = usePluginSettings();
const {
mutate: login,
error: usernamePasswordError,
isPending: userNamePasswordRequestIsPending,
} = useMutation(
api.apiKeys.exchange.mutationOptions({
onSuccess: (resp) => {
setSettings((s) => ({ ...s, apiKey: resp.key, apiKeyId: resp.id }));
navigate("/options");
},
}),
);
const {
mutate: validateApiKey,
error: apiKeyValidationError,
isPending: apiKeyValueRequestIsPending,
} = useMutation(
api.apiKeys.validate.mutationOptions({
onSuccess: () => {
setSettings((s) => ({ ...s, apiKey: apiKeyFormData.apiKey }));
navigate("/options");
},
}),
);
const [lastLoginAttemptSource, setLastLoginAttemptSource] =
useState<LoginState>(LoginState.NONE);
const [formData, setFormData] = useState<{
email: string;
password: string;
}>({
email: "",
password: "",
});
const [apiKeyFormData, setApiKeyFormData] = useState<{
apiKey: string;
}>({
apiKey: "",
});
const onUserNamePasswordSubmit = (e: React.FormEvent) => {
e.preventDefault();
setLastLoginAttemptSource(LoginState.USERNAME_PASSWORD);
const randStr = (Math.random() + 1).toString(36).substring(5);
login({ ...formData, keyName: `Browser extension: (${randStr})` });
};
const onApiKeySubmit = (e: React.FormEvent) => {
e.preventDefault();
setLastLoginAttemptSource(LoginState.API_KEY);
validateApiKey({ ...apiKeyFormData });
};
let errorMessage = "";
let loginError;
switch (lastLoginAttemptSource) {
case LoginState.USERNAME_PASSWORD:
loginError = usernamePasswordError;
break;
case LoginState.API_KEY:
loginError = apiKeyValidationError;
break;
}
if (loginError) {
errorMessage = loginError.message || "Wrong username or password";
}
return (
<div className="flex flex-col space-y-2">
<Logo />
<p className="text-lg">Login</p>
<p className="text-red-500">{errorMessage}</p>
<form
className="flex flex-col gap-y-2"
onSubmit={onUserNamePasswordSubmit}
>
<div className="flex flex-col gap-y-1">
<label className="my-auto font-bold">Email</label>
<Input
value={formData.email}
onChange={(e) =>
setFormData((f) => ({ ...f, email: e.target.value }))
}
type="text"
name="email"
className="h-8 flex-1 rounded-lg border border-gray-300 p-2"
/>
</div>
<div className="flex flex-col gap-y-1">
<label className="my-auto font-bold">Password</label>
<Input
value={formData.password}
onChange={(e) =>
setFormData((f) => ({
...f,
password: e.target.value,
}))
}
type="password"
name="password"
className="h-8 flex-1 rounded-lg border border-gray-300 p-2"
/>
</div>
<Button
type="submit"
disabled={
userNamePasswordRequestIsPending || apiKeyValueRequestIsPending
}
>
Login
</Button>
</form>
<div className="flex w-full flex-row items-center gap-3">
<hr className="flex-1" />
Or
<hr className="flex-1" />
</div>
<form className="flex flex-col gap-y-2" onSubmit={onApiKeySubmit}>
<div className="flex flex-col gap-y-1">
<label className="my-auto font-bold">API Key</label>
<Input
value={apiKeyFormData.apiKey}
onChange={(e) =>
setApiKeyFormData((f) => ({ ...f, apiKey: e.target.value }))
}
type="text"
name="apiKey"
className="h-8 flex-1 rounded-lg border border-gray-300 p-2"
/>
</div>
<Button
type="submit"
disabled={
userNamePasswordRequestIsPending || apiKeyValueRequestIsPending
}
>
Login with API key
</Button>
</form>
<div className="flex justify-center pt-2">
<button
type="button"
onClick={() => navigate("/customheaders")}
className="text-xs text-muted-foreground underline hover:text-foreground"
>
Configure Custom Headers
{settings.customHeaders &&
Object.keys(settings.customHeaders).length > 0 &&
` (${Object.keys(settings.customHeaders).length})`}
</button>
</div>
</div>
);
}
================================================
FILE: apps/browser-extension/src/Spinner.tsx
================================================
export default function Spinner() {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className="animate-spin"
>
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
</svg>
);
}
================================================
FILE: apps/browser-extension/src/background/background.ts
================================================
import {
BookmarkTypes,
ZNewBookmarkRequest,
} from "@karakeep/shared/types/bookmarks";
import { clearBadgeStatus, getBadgeStatus } from "../utils/badgeCache";
import {
getPluginSettings,
Settings,
subscribeToSettingsChanges,
} from "../utils/settings";
import { getApiClient, initializeClients } from "../utils/trpc";
import { MessageType } from "../utils/type";
import { isHttpUrl } from "../utils/url";
import { NEW_BOOKMARK_REQUEST_KEY_NAME } from "./protocol";
const OPEN_KARAKEEP_ID = "open-karakeep";
const ADD_LINK_TO_KARAKEEP_ID = "add-link";
const CLEAR_CURRENT_CACHE_ID = "clear-current-cache";
const CLEAR_ALL_CACHE_ID = "clear-all-cache";
const SEPARATOR_ID = "separator-1";
const VIEW_PAGE_IN_KARAKEEP = "view-page-in-karakeep";
/**
* Check the current settings state and register or remove context menus accordingly.
* @param settings The current plugin settings.
*/
async function checkSettingsState(settings: Settings) {
await initializeClients();
if (settings?.address && settings?.apiKey) {
registerContextMenus(settings);
} else {
removeContextMenus();
await clearAllCache();
}
}
/**
* Remove context menus from the browser.
*/
function removeContextMenus() {
try {
chrome.contextMenus.removeAll();
} catch (error) {
console.error("Failed to remove context menus:", error);
}
}
/**
* Register context menus in the browser.
* * A context menu button to open a tab with the currently configured karakeep instance.
* * * If the "show count badge" setting is enabled, add context menu buttons to clear the cache for the current page or all pages.
* * A context menu button to add a link to karakeep without loading the page.
* @param settings The current plugin settings.
*/
function registerContextMenus(settings: Settings) {
removeContextMenus();
chrome.contextMenus.create({
id: OPEN_KARAKEEP_ID,
title: "Open Karakeep",
contexts: ["action"],
});
chrome.contextMenus.create({
id: ADD_LINK_TO_KARAKEEP_ID,
title: "Add to Karakeep",
contexts: ["link", "page", "selection", "image"],
});
if (settings?.showCountBadge) {
chrome.contextMenus.create({
id: VIEW_PAGE_IN_KARAKEEP,
title: "View this page in Karakeep",
contexts: ["action", "page"],
});
if (settings?.useBadgeCache) {
// Add separator
chrome.contextMenus.create({
id: SEPARATOR_ID,
type: "separator",
contexts: ["action"],
});
chrome.contextMenus.create({
id: CLEAR_CURRENT_CACHE_ID,
title: "Clear Current Page Cache",
contexts: ["action"],
});
chrome.contextMenus.create({
id: CLEAR_ALL_CACHE_ID,
title: "Clear All Cache",
contexts: ["action"],
});
}
}
}
/**
* Handle context menu clicks by opening a new tab with karakeep or adding a link to karakeep.
* @param info Information about the context menu click event.
* @param tab The current tab.
*/
async function handleContextMenuClick(
info: chrome.contextMenus.OnClickData,
tab?: chrome.tabs.Tab,
) {
const { menuItemId, selectionText, srcUrl, linkUrl, pageUrl } = info;
if (menuItemId === OPEN_KARAKEEP_ID) {
getPluginSettings().then((settings: Settings) => {
chrome.tabs.create({ url: settings.address, active: true });
});
} else if (menuItemId === CLEAR_CURRENT_CACHE_ID) {
await clearCurrentPageCache();
} else if (menuItemId === CLEAR_ALL_CACHE_ID) {
await clearAllCache();
} else if (menuItemId === ADD_LINK_TO_KARAKEEP_ID) {
// Only pass the current page title when the URL being saved is the
// page itself. When saving a link or image, the title would
// incorrectly be the current page's title instead of the target's.
const isCurrentPage = !srcUrl && !linkUrl;
addLinkToKarakeep({
selectionText,
srcUrl,
linkUrl,
pageUrl,
title: isCurrentPage ? tab?.title : undefined,
});
// NOTE: Firefox only allows opening context menus if it's triggered by a user action.
// awaiting on any promise before calling this function will lose the "user action" context.
await chrome.action.openPopup();
} else if (menuItemId === VIEW_PAGE_IN_KARAKEEP) {
if (tab) {
await searchCurrentUrl(tab.url);
}
}
}
/**
* Add a link to karakeep based on the provided information.
* @param options An object containing information about the link to add.
*/
function addLinkToKarakeep({
selectionText,
srcUrl,
linkUrl,
pageUrl,
title,
}: {
selectionText?: string;
srcUrl?: string;
linkUrl?: string;
pageUrl?: string;
title?: string;
}) {
let newBookmark: ZNewBookmarkRequest | null = null;
if (selectionText) {
newBookmark = {
type: BookmarkTypes.TEXT,
text: selectionText,
sourceUrl: pageUrl,
source: "extension",
};
} else {
const finalUrl = srcUrl ?? linkUrl ?? pageUrl;
if (finalUrl && isHttpUrl(finalUrl)) {
newBookmark = {
type: BookmarkTypes.LINK,
url: finalUrl,
source: "extension",
title,
};
} else {
console.warn("Invalid URL, bookmark not created:", finalUrl);
}
}
if (newBookmark) {
chrome.storage.session.set({
[NEW_BOOKMARK_REQUEST_KEY_NAME]: newBookmark,
});
}
}
/**
* Search current URL and open appropriate page.
*/
async function searchCurrentUrl(tabUrl?: string) {
try {
if (!tabUrl || !isHttpUrl(tabUrl)) {
console.warn("Invalid URL, cannot search:", tabUrl);
return;
}
console.log("Searching bookmarks for URL:", tabUrl);
const settings = await getPluginSettings();
const serverAddress = settings.address;
const matchedBookmarkId = await getBadgeStatus(tabUrl);
let targetUrl: string;
if (matchedBookmarkId) {
// Found exact match, open bookmark details page
targetUrl = `${serverAddress}/dashboard/preview/${matchedBookmarkId}`;
console.log("Opening bookmark details page:", targetUrl);
} else {
// No exact match, open search results page
const searchQuery = encodeURIComponent(`url:${tabUrl}`);
targetUrl = `${serverAddress}/dashboard/search?q=${searchQuery}`;
console.log("Opening search results page:", targetUrl);
}
await chrome.tabs.create({ url: targetUrl, active: true });
} catch (error) {
console.error("Failed to search current URL:", error);
}
}
/**
* Clear badge cache for the current active page.
*/
async function clearCurrentPageCache() {
try {
// Get the active tab
const [activeTab] = await chrome.tabs.query({
active: true,
currentWindow: true,
});
if (activeTab.url && activeTab.id) {
console.log("Clearing cache for current page:", activeTab.url);
await clearBadgeStatus(activeTab.url);
// Refresh the badge for the current tab
await checkAndUpdateIcon(activeTab.id);
}
} catch (error) {
console.error("Failed to clear current page cache:", error);
}
}
/**
* Clear all badge cache and refresh badges for all active tabs.
*/
async function clearAllCache() {
try {
console.log("Clearing all badge cache");
await clearBadgeStatus();
} catch (error) {
console.error("Failed to clear all cache:", error);
}
}
getPluginSettings().then(async (settings: Settings) => {
await checkSettingsState(settings);
});
subscribeToSettingsChanges(async (settings) => {
await checkSettingsState(settings);
});
// eslint-disable-next-line @typescript-eslint/no-misused-promises -- Manifest V3 allows async functions for all callbacks
chrome.contextMenus.onClicked.addListener(handleContextMenuClick);
/**
* Handle command events, such as adding a link to karakeep.
* @param command The command to handle.
* @param tab The current tab.
*/
function handleCommand(command: string, tab: chrome.tabs.Tab) {
if (command === ADD_LINK_TO_KARAKEEP_ID) {
addLinkToKarakeep({
selectionText: undefined,
srcUrl: undefined,
linkUrl: undefined,
pageUrl: tab?.url,
});
// now try to open the popup
chrome.action.openPopup();
} else {
console.warn(`Received unknown command: ${command}`);
}
}
chrome.commands.onCommand.addListener(handleCommand);
/**
* Set the badge text and color based on the provided information.
* @param badgeStatus
* @param tabId The ID of the tab to update.
*/
export async function setBadge(badgeStatus: string | null, tabId?: number) {
if (!tabId) return;
if (badgeStatus) {
return await Promise.all([
chrome.action.setBadgeText({ tabId, text: ` ` }),
chrome.action.setBadgeBackgroundColor({
tabId,
color: "#4CAF50",
}),
]);
} else {
await chrome.action.setBadgeText({ tabId, text: `` });
}
}
/**
* Check and update the badge icon for a given tab ID.
* @param tabId The ID of the tab to update.
*/
async function checkAndUpdateIcon(tabId: number) {
const tabInfo = await chrome.tabs.get(tabId);
const { showCountBadge } = await getPluginSettings();
const api = await getApiClient();
if (
!api ||
!showCountBadge ||
!tabInfo.url ||
!isHttpUrl(tabInfo.url) ||
tabInfo.status !== "complete"
) {
await chrome.action.setBadgeText({ tabId, text: "" });
return;
}
console.log("Tab activated", tabId, tabInfo);
try {
const status = await getBadgeStatus(tabInfo.url);
await setBadge(status, tabId);
} catch (error) {
console.error("Archive check failed:", error);
await setBadge(null, tabId);
}
}
chrome.tabs.onActivated.addListener(async (tabActiveInfo) => {
await checkAndUpdateIcon(tabActiveInfo.tabId);
});
chrome.tabs.onUpdated.addListener(async (tabId) => {
await checkAndUpdateIcon(tabId);
});
// Listen for REFRESH_BADGE messages from popup and update badge accordingly
chrome.runtime.onMessage.addListener(async (msg) => {
if (msg && msg.type) {
if (msg.currentTab && msg.type === MessageType.BOOKMARK_REFRESH_BADGE) {
console.log(
"Received REFRESH_BADGE message for tab:",
msg.currentTab.url,
);
if (msg.currentTab.url) {
await clearBadgeStatus(msg.currentTab.url);
}
if (typeof msg.currentTab.id === "number") {
await checkAndUpdateIcon(msg.currentTab.id);
}
}
}
});
================================================
FILE: apps/browser-extension/src/background/protocol.ts
================================================
export const NEW_BOOKMARK_REQUEST_KEY_NAME = "karakeep-new-bookmark";
================================================
FILE: apps/browser-extension/src/components/BookmarkLists.tsx
================================================
import { useQuery } from "@tanstack/react-query";
import { X } from "lucide-react";
import {
useBookmarkLists,
useRemoveBookmarkFromList,
} from "@karakeep/shared-react/hooks/lists";
import { useTRPC } from "../utils/trpc";
import { Button } from "./ui/button";
export default function BookmarkLists({ bookmarkId }: { bookmarkId: string }) {
const api = useTRPC();
const { data: allLists } = useBookmarkLists();
const { mutate: deleteFromList } = useRemoveBookmarkFromList();
const { data: lists } = useQuery(
api.lists.getListsOfBookmark.queryOptions({ bookmarkId }),
);
if (!lists || !allLists) {
return null;
}
return (
<ul className="flex flex-col gap-1">
{lists.lists.map((l) => (
<li
key={l.id}
className="flex items-center justify-between rounded border border-border bg-background p-2 text-sm text-foreground"
>
<span>
{allLists
.getPathById(l.id)!
.map((l) => `${l.icon} ${l.name}`)
.join(" / ")}
</span>
<Button
variant="ghost"
size="sm"
onClick={() => deleteFromList({ bookmarkId, listId: l.id })}
>
<X className="size-4" />
</Button>
</li>
))}
</ul>
);
}
================================================
FILE: apps/browser-extension/src/components/ListsSelector.tsx
================================================
import * as React from "react";
import { useQuery } from "@tanstack/react-query";
import { useSet } from "@uidotdev/usehooks";
import { Check, ChevronsUpDown } from "lucide-react";
import {
useAddBookmarkToList,
useBookmarkLists,
useRemoveBookmarkFromList,
} from "@karakeep/shared-react/hooks/lists";
import { cn } from "../utils/css";
import { useTRPC } from "../utils/trpc";
import { Button } from "./ui/button";
import {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
} from "./ui/command";
import { DynamicPopoverContent } from "./ui/dynamic-popover";
import { Popover, PopoverTrigger } from "./ui/popover";
export function ListsSelector({ bookmarkId }: { bookmarkId: string }) {
const api = useTRPC();
const currentlyUpdating = useSet<string>();
const [open, setOpen] = React.useState(false);
const { mutate: addToList } = useAddBookmarkToList();
const { mutate: removeFromList } = useRemoveBookmarkFromList();
const { data: existingLists } = useQuery(
api.lists.getListsOfBookmark.queryOptions({
bookmarkId,
}),
);
const { data: allLists } = useBookmarkLists();
const existingListIds = new Set(existingLists?.lists.map((list) => list.id));
const toggleList = (listId: string) => {
currentlyUpdating.add(listId);
if (existingListIds.has(listId)) {
removeFromList(
{ bookmarkId, listId },
{
onSettled: (_resp, _err, req) => currentlyUpdating.delete(req.listId),
},
);
} else {
addToList(
{ bookmarkId, listId },
{
onSettled: (_resp, _err, req) => currentlyUpdating.delete(req.listId),
},
);
}
};
return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<Button
variant="outline"
role="combobox"
aria-expanded={open}
className="justify-between"
>
Add to List...
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
</Button>
</PopoverTrigger>
<DynamicPopoverContent className="w-[320px] p-0">
<Command>
<CommandInput placeholder="Search Lists ..." />
<CommandList>
<CommandEmpty>You don't have any lists.</CommandEmpty>
<CommandGroup>
{allLists?.allPaths
.filter((path) => path[path.length - 1].userRole !== "viewer")
.map((path) => {
const lastItem = path[path.length - 1];
return (
<CommandItem
key={lastItem.id}
value={lastItem.id}
keywords={[lastItem.name, lastItem.icon]}
onSelect={toggleList}
disabled={currentlyUpdating.has(lastItem.id)}
>
<Check
className={cn(
"mr-2 size-4",
existingListIds.has(lastItem.id)
? "opacity-100"
: "opacity-0",
)}
/>
{path
.map((item) => `${item.icon} ${item.name}`)
.join(" / ")}
</CommandItem>
);
})}
</CommandGroup>
</CommandList>
</Command>
</DynamicPopoverContent>
</Popover>
);
}
================================================
FILE: apps/browser-extension/src/components/NoteEditor.tsx
================================================
import { useEffect, useState } from "react";
import { Check, Save } from "lucide-react";
import {
useAutoRefreshingBookmarkQuery,
useUpdateBookmark,
} from "@karakeep/shared-react/hooks/bookmarks";
import { Button } from "./ui/button";
import { Textarea } from "./ui/textarea";
export function NoteEditor({ bookmarkId }: { bookmarkId: string }) {
const { data: bookmark } = useAutoRefreshingBookmarkQuery({ bookmarkId });
const [error, setError] = useState<string | null>(null);
const [isSaving, setIsSaving] = useState(false);
const [noteValue, setNoteValue] = useState("");
const [hasUnsavedChanges, setHasUnsavedChanges] = useState(false);
// Update local state when bookmark changes, but only if there are no unsaved changes
// This prevents overwriting user's edits while they're typing
useEffect(() => {
if (bookmark && !hasUnsavedChanges) {
setNoteValue(bookmark.note ?? "");
}
}, [bookmark?.note, bookmark, hasUnsavedChanges]);
const updateBookmarkMutator = useUpdateBookmark({
onSuccess: () => {
setError(null);
setIsSaving(false);
setHasUnsavedChanges(false);
},
onError: (e) => {
setError(e.message || "Failed to save note");
setIsSaving(false);
},
});
const handleSave = () => {
if (!bookmark || noteValue === bookmark.note || isSaving) {
return;
}
setIsSaving(true);
setError(null);
updateBookmarkMutator.mutate({
bookmarkId: bookmark.id,
note: noteValue,
});
};
if (!bookmark) {
return null;
}
return (
<div className="flex flex-col gap-2">
<Textarea
autoFocus
className="h-32 w-full overflow-auto rounded bg-background p-2 text-sm text-gray-400 dark:text-gray-300"
value={noteValue}
placeholder="Write some notes ..."
onChange={(e) => {
setNoteValue(e.currentTarget.value);
setHasUnsavedChanges(e.currentTarget.value !== bookmark.note);
}}
/>
<div className="flex items-center justify-between gap-2">
<div className="flex-1">
{isSaving && <p className="text-xs text-gray-500">Saving note...</p>}
{error && <p className="text-xs text-red-500">{error}</p>}
{!isSaving && !error && hasUnsavedChanges && (
<p className="text-xs text-amber-600 dark:text-amber-500">
Unsaved changes
</p>
)}
</div>
{hasUnsavedChanges && (
<Button
onClick={handleSave}
disabled={isSaving}
size="sm"
className="gap-1.5"
>
{isSaving ? (
<>
<Save className="h-3.5 w-3.5 animate-pulse" />
Saving...
</>
) : (
<>
<Save className="h-3.5 w-3.5" />
Save Note
</>
)}
</Button>
)}
{!hasUnsavedChanges && !isSaving && noteValue && (
<div className="flex items-center gap-1 text-xs text-green-600 dark:text-green-500">
<Check className="h-3.5 w-3.5" />
Saved
</div>
)}
</div>
</div>
);
}
================================================
FILE: apps/browser-extension/src/components/TagList.tsx
================================================
import { useAutoRefreshingBookmarkQuery } from "@karakeep/shared-react/hooks/bookmarks";
import { isBookmarkStillTagging } from "@karakeep/shared/utils/bookmarkUtils";
import { Badge } from "./ui/badge";
export default function TagList({ bookmarkId }: { bookmarkId: string }) {
const { data: bookmark } = useAutoRefreshingBookmarkQuery({ bookmarkId });
if (!bookmark) {
return null;
}
return (
<div className="flex flex-wrap gap-1">
{bookmark.tags.length === 0 && !isBookmarkStillTagging(bookmark) && (
<Badge variant="secondary">No tags</Badge>
)}
{[...bookmark.tags].map((tag) => (
<Badge
key={tag.id}
className={
tag.attachedBy === "ai" ? "bg-purple-500 text-white" : undefined
}
>
{tag.name}
</Badge>
))}
{isBookmarkStillTagging(bookmark) && (
<Badge variant="secondary">AI tags loading...</Badge>
)}
</div>
);
}
================================================
FILE: apps/browser-extension/src/components/TagsSelector.tsx
================================================
import * as React from "react";
import { useQuery } from "@tanstack/react-query";
import { useSet } from "@uidotdev/usehooks";
import { Check, ChevronsUpDown, Plus } from "lucide-react";
import {
useAutoRefreshingBookmarkQuery,
useUpdateBookmarkTags,
} from "@karakeep/shared-react/hooks/bookmarks";
import { cn } from "../utils/css";
import { useTRPC } from "../utils/trpc";
import { Button } from "./ui/button";
import {
Command,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
CommandSeparator,
} from "./ui/command";
import { DynamicPopoverContent } from "./ui/dynamic-popover";
import { Popover, PopoverTrigger } from "./ui/popover";
export function TagsSelector({ bookmarkId }: { bookmarkId: string }) {
const api = useTRPC();
const { data: allTags } = useQuery(api.tags.list.queryOptions({}));
const { data: bookmark } = useAutoRefreshingBookmarkQuery({ bookmarkId });
const existingTagIds = new Set(bookmark?.tags.map((t) => t.id) ?? []);
const [input, setInput] = React.useState("");
const [open, setOpen] = React.useState(false);
const currentlyUpdating = useSet<string>();
const { mutate } = useUpdateBookmarkTags({
onMutate: (req) => {
req.attach.forEach((t) => currentlyUpdating.add(t.tagId ?? ""));
req.detach.forEach((t) => currentlyUpdating.add(t.tagId ?? ""));
},
onSettled: (_resp, _err, req) => {
if (!req) {
return;
}
req.attach.forEach((t) => currentlyUpdating.delete(t.tagId ?? ""));
req.detach.forEach((t) => currentlyUpdating.delete(t.tagId ?? ""));
},
});
const toggleTag = (tagId: string) => {
mutate({
bookmarkId,
attach: existingTagIds.has(tagId) ? [] : [{ tagId }],
detach: existingTagIds.has(tagId) ? [{ tagId }] : [],
});
};
return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<Button
variant="outline"
role="combobox"
aria-expanded={open}
className="justify-between"
>
Add Tags...
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
</Button>
</PopoverTrigger>
<DynamicPopoverContent className="w-[320px] p-0">
<Command>
<CommandInput
value={input}
onValueChange={setInput}
placeholder="Search Tags ..."
/>
<CommandList>
<CommandGroup>
<CommandItem
onSelect={() =>
mutate({
bookmarkId,
attach: [{ tagName: input }],
detach: [],
})
}
>
<Plus className="mr-2 size-4" />
Create "{input}" ...
</CommandItem>
</CommandGroup>
<CommandSeparator />
<CommandGroup>
{allTags?.tags
.sort((a, b) => a.name.localeCompare(b.name))
.map((tag) => (
<CommandItem
key={tag.id}
value={tag.id}
keywords={[tag.name]}
onSelect={toggleTag}
disabled={currentlyUpdating.has(tag.id)}
>
<Check
className={cn(
"mr-2 size-4",
existingTagIds.has(tag.id)
? "opacity-100"
: "opacity-0",
)}
/>
{tag.name}
</CommandItem>
))}
</CommandGroup>
</CommandList>
</Command>
</DynamicPopoverContent>
</Popover>
);
}
================================================
FILE: apps/browser-extension/src/components/ui/badge.tsx
================================================
import type { VariantProps } from "class-variance-authority";
import * as React from "react";
import { cva } from "class-variance-authority";
import { cn } from "../../utils/css";
const badgeVariants = cva(
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
{
variants: {
variant: {
default:
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
secondary:
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
destructive:
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
outline: "text-foreground",
},
},
defaultVariants: {
variant: "default",
},
},
);
export interface BadgeProps
extends
React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof badgeVariants> {}
function Badge({ className, variant, ...props }: BadgeProps) {
return (
<div className={cn(badgeVariants({ variant }), className)} {...props} />
);
}
export { Badge, badgeVariants };
================================================
FILE: apps/browser-extension/src/components/ui/button.tsx
================================================
import type { VariantProps } from "class-variance-authority";
import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva } from "class-variance-authority";
import { cn } from "../../utils/css";
const buttonVariants = cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive:
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
outline:
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline",
},
size: {
default: "h-10 px-4 py-2",
sm: "h-9 rounded-md px-3",
lg: "h-11 rounded-md px-8",
icon: "h-10 w-10",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
},
);
export interface ButtonProps
extends
React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean;
}
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button";
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...props}
/>
);
},
);
Button.displayName = "Button";
export { Button, buttonVariants };
================================================
FILE: apps/browser-extension/src/components/ui/command.tsx
================================================
import type { DialogProps } from "@radix-ui/react-dialog";
import * as React from "react";
import { Command as CommandPrimitive } from "cmdk";
import { Search } from "lucide-react";
import { cn } from "../../utils/css";
import { Dialog, DialogContent } from "./dialog";
const Command = React.forwardRef<
React.ElementRef<typeof CommandPrimitive>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
>(({ className, ...props }, ref) => (
<CommandPrimitive
ref={ref}
className={cn(
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
className,
)}
{...props}
/>
));
Command.displayName = CommandPrimitive.displayName;
type CommandDialogProps = DialogProps;
const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
return (
<Dialog {...props}>
<DialogContent className="overflow-hidden p-0 shadow-lg">
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
{children}
</Command>
</DialogContent>
</Dialog>
);
};
const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
// https://github.com/shadcn-ui/ui/issues/3366
// eslint-disable-next-line react/no-unknown-property
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
ref={ref}
className={cn(
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
{...props}
/>
</div>
));
CommandInput.displayName = CommandPrimitive.Input.displayName;
const CommandList = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.List>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
>(({ className, ...props }, ref) => (
<CommandPrimitive.List
ref={ref}
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
{...props}
/>
));
CommandList.displayName = CommandPrimitive.List.displayName;
const CommandEmpty = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Empty>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
>((props, ref) => (
<CommandPrimitive.Empty
ref={ref}
className="py-6 text-center text-sm"
{...props}
/>
));
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
const CommandGroup = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Group>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Group
ref={ref}
className={cn(
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
className,
)}
{...props}
/>
));
CommandGroup.displayName = CommandPrimitive.Group.displayName;
const CommandSeparator = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Separator
ref={ref}
className={cn("-mx-1 h-px bg-border", className)}
{...props}
/>
));
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
const CommandItem = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Item
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",
className,
)}
{...props}
/>
));
CommandItem.displayName = CommandPrimitive.Item.displayName;
const CommandShortcut = ({
className,
...props
}: React.HTMLAttributes<HTMLSpanElement>) => {
return (
<span
className={cn(
"ml-auto text-xs tracking-widest text-muted-foreground",
className,
)}
{...props}
/>
);
};
CommandShortcut.displayName = "CommandShortcut";
export {
Command,
CommandDialog,
CommandInput,
CommandList,
CommandEmpty,
CommandGroup,
CommandItem,
CommandShortcut,
CommandSeparator,
};
================================================
FILE: apps/browser-extension/src/components/ui/dialog.tsx
================================================
import * as React from "react";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";
import { cn } from "../../utils/css";
const Dialog = DialogPrimitive.Root;
const DialogTrigger = DialogPrimitive.Trigger;
const DialogPortal = DialogPrimitive.Portal;
const DialogClose = DialogPrimitive.Close;
const DialogOverlay = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Overlay>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
>(({ className, ...props }, ref) => (
<DialogPrimitive.Overlay
ref={ref}
className={cn(
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
className,
)}
{...props}
/>
));
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
const DialogContent = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
>(({ className, children, ...props }, ref) => (
<DialogPortal>
<DialogOverlay />
<DialogPrimitive.Content
ref={ref}
className={cn(
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
className,
)}
{...props}
>
{children}
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
<X className="h-4 w-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
</DialogPrimitive.Content>
</DialogPortal>
));
DialogContent.displayName = DialogPrimitive.Content.displayName;
const DialogHeader = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
"flex flex-col space-y-1.5 text-center sm:text-left",
className,
)}
{...props}
/>
);
DialogHeader.displayName = "DialogHeader";
const DialogFooter = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
className,
)}
{...props}
/>
);
DialogFooter.displayName = "DialogFooter";
const DialogTitle = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Title>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
>(({ className, ...props }, ref) => (
<DialogPrimitive.Title
ref={ref}
className={cn(
"text-lg font-semibold leading-none tracking-tight",
className,
)}
{...props}
/>
));
DialogTitle.displayName = DialogPrimitive.Title.displayName;
const DialogDescription = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Description>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
>(({ className, ...props }, ref) => (
<DialogPrimitive.Description
ref={ref}
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
));
DialogDescription.displayName = DialogPrimitive.Description.displayName;
export {
Dialog,
DialogPortal,
DialogOverlay,
DialogClose,
DialogTrigger,
DialogContent,
DialogHeader,
DialogFooter,
DialogTitle,
DialogDescription,
};
================================================
FILE: apps/browser-extension/src/components/ui/dynamic-popover.tsx
================================================
import * as React from "react";
import * as PopoverPrimitive from "@radix-ui/react-popover";
import { cn } from "../../utils/css";
interface DynamicPopoverContentProps extends React.ComponentPropsWithoutRef<
typeof PopoverPrimitive.Content
> {
/**
* Whether to enable dynamic height adjustment
* If true, use max-h when content can fit the viewport, otherwise use fixed height
* If false, always use h-[var(--radix-popover-content-available-height)]
*/
dynamicHeight?: boolean;
/**
* Debounce delay for height adjustment (milliseconds)
* Used to optimize performance and avoid frequent recalculations
*/
debounceMs?: number;
}
/**
* Custom Hook for debouncing
*/
function useDebounce<T>(value: T, delay: number): T {
const [debouncedValue, setDebouncedValue] = React.useState<T>(value);
React.useEffect(() => {
const handler = setTimeout(() => {
setDebouncedValue(value);
}, delay);
return () => {
clearTimeout(handler);
};
}, [value, delay]);
return debouncedValue;
}
/**
* Utility function to get available height
*/
function getAvailableHeight(element: HTMLElement): number {
try {
const cssValue = getComputedStyle(element).getPropertyValue(
"--radix-popover-content-available-height",
);
const parsedValue = parseInt(cssValue, 10);
// If CSS variable value cannot be obtained, fallback to 80% of viewport height
return !isNaN(parsedValue) && parsedValue > 0
? parsedValue
: Math.floor(window.innerHeight * 0.8);
} catch (error) {
console.warn("Failed to get available height from CSS variable:", error);
return Math.floor(window.innerHeight * 0.8);
}
}
/**
* Utility function to calculate content height
*/
function getContentHeight(element: HTMLElement): number {
try {
return element.scrollHeight;
} catch (error) {
console.warn("Failed to get content height:", error);
return 0;
}
}
const DynamicPopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
DynamicPopoverContentProps
>(
(
{
className,
align = "center",
sideOffset = 4,
dynamicHeight = true,
debounceMs = 100,
children,
...props
},
ref,
) => {
const contentRef = React.useRef<HTMLDivElement>(null);
// Use state to manage height class name
const [heightClass, setHeightClass] = React.useState<string>(
"max-h-[var(--radix-popover-content-available-height)]",
);
// Create a dependency to trigger recalculation
const [childrenKey, setChildrenKey] = React.useState(0);
// Use debounce to optimize performance
const debouncedChildrenKey = useDebounce(childrenKey, debounceMs);
// Listen for children changes
React.useEffect(() => {
setChildrenKey((prev) => prev + 1);
}, [children]);
// Utility function to merge refs
const setRefs = React.useCallback(
(node: HTMLDivElement | null) => {
// Set internal ref
contentRef.current = node;
// Set external ref
if (typeof ref === "function") {
ref(node);
} else if (ref) {
ref.current = node;
}
},
[ref],
);
// Core logic for calculating height
const calculateHeight = React.useCallback(() => {
if (!dynamicHeight || !contentRef.current) {
return;
}
const element = contentRef.current;
const availableHeight = getAvailableHeight(element);
const contentHeight = getContentHeight(element);
// Add some buffer to avoid edge cases
const BUFFER = 10;
if (contentHeight + BUFFER > availableHeight) {
setHeightClass("h-[var(--radix-popover-content-available-height)]");
} else {
setHeightClass("max-h-[var(--radix-popover-content-available-height)]");
}
}, [dynamicHeight]);
// Use useLayoutEffect to avoid layout flickering
React.useLayoutEffect(() => {
calculateHeight();
}, [calculateHeight, debouncedChildrenKey]);
// Handle window resize
React.useEffect(() => {
if (!dynamicHeight) return;
const handleResize = () => {
calculateHeight();
};
window.addEventListener("resize", handleResize);
return () => {
window.removeEventListener("resize", handleResize);
};
}, [calculateHeight, dynamicHeight]);
// Define all styles as a single constant for better performance and simplicity
const POPOVER_STYLES =
"z-50 w-72 overflow-y-auto rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
// Determine final height class name
const finalHeightClass = React.useMemo(() => {
return dynamicHeight
? heightClass
: "h-[var(--radix-popover-content-available-height)]";
}, [dynamicHeight, heightClass]);
// Memoize the complete class name for performance
const popoverClassName = React.useMemo(
() => cn(POPOVER_STYLES, finalHeightClass, className),
[finalHeightClass, className],
);
return (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
ref={setRefs}
align={align}
sideOffset={sideOffset}
className={popoverClassName}
{...props}
>
{children}
</PopoverPrimitive.Content>
</PopoverPrimitive.Portal>
);
},
);
DynamicPopoverContent.displayName = PopoverPrimitive.Content.displayName;
export { DynamicPopoverContent };
================================================
FILE: apps/browser-extension/src/components/ui/input.tsx
================================================
import * as React from "react";
import { cn } from "../../utils/css";
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, ...props }, ref) => {
return (
<input
type={type}
className={cn(
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
ref={ref}
{...props}
/>
);
},
);
Input.displayName = "Input";
export { Input };
================================================
FILE: apps/browser-extension/src/components/ui/popover.tsx
================================================
import * as React from "react";
import * as PopoverPrimitive from "@radix-ui/react-popover";
import { cn } from "../../utils/css";
const Popover = PopoverPrimitive.Root;
const PopoverTrigger = PopoverPrimitive.Trigger;
const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
ref={ref}
align={align}
sideOffset={sideOffset}
className={cn(
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className,
)}
{...props}
/>
</PopoverPrimitive.Portal>
));
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
export { Popover, PopoverTrigger, PopoverContent };
================================================
FILE: apps/browser-extension/src/components/ui/select.tsx
================================================
import * as React from "react";
import * as SelectPrimitive from "@radix-ui/react-select";
import { Check, ChevronDown, ChevronUp } from "lucide-react";
import { cn } from "../../utils/css";
const Select = SelectPrimitive.Root;
const SelectGroup = SelectPrimitive.Group;
const SelectValue = SelectPrimitive.Value;
const SelectTrigger = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
<SelectPrimitive.Trigger
ref={ref}
className={cn(
"flex h-8 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
className,
)}
{...props}
>
{children}
<SelectPrimitive.Icon asChild>
<ChevronDown className="size-4 opacity-50" />
</SelectPrimitive.Icon>
</SelectPrimitive.Trigger>
));
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
const SelectScrollUpButton = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
>(({ className, ...props }, ref) => (
<SelectPrimitive.ScrollUpButton
ref={ref}
className={cn(
"flex cursor-default items-center justify-center py-1",
className,
)}
{...props}
>
<ChevronUp className="size-4" />
</SelectPrimitive.ScrollUpButton>
));
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
const SelectScrollDownButton = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
>(({ className, ...props }, ref) => (
<SelectPrimitive.ScrollDownButton
ref={ref}
className={cn(
"flex cursor-default items-center justify-center py-1",
className,
)}
{...props}
>
<ChevronDown className="size-4" />
</SelectPrimitive.ScrollDownButton>
));
SelectScrollDownButton.displayName =
SelectPrimitive.ScrollDownButton.displayName;
const SelectContent = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
>(({ className, children, position = "popper", ...props }, ref) => (
<SelectPrimitive.Portal>
<SelectPrimitive.Content
ref={ref}
className={cn(
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className,
)}
position={position}
{...props}
>
<SelectScrollUpButton />
<SelectPrimitive.Viewport
className={cn(
"p-1",
position === "popper" &&
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
)}
>
{children}
</SelectPrimitive.Viewport>
<SelectScrollDownButton />
</SelectPrimitive.Content>
</SelectPrimitive.Portal>
));
SelectContent.displayName = SelectPrimitive.Content.displayName;
const SelectLabel = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Label>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
>(({ className, ...props }, ref) => (
<SelectPrimitive.Label
ref={ref}
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
{...props}
/>
));
SelectLabel.displayName = SelectPrimitive.Label.displayName;
const SelectItem = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
>(({ className, children, ...props }, ref) => (
<SelectPrimitive.Item
ref={ref}
className={cn(
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className,
)}
{...props}
>
<span className="absolute left-2 flex size-3.5 items-center justify-center">
<SelectPrimitive.ItemIndicator>
<Check className="size-4" />
</SelectPrimitive.ItemIndicator>
</span>
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
</SelectPrimitive.Item>
));
SelectItem.displayName = SelectPrimitive.Item.displayName;
const SelectSeparator = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
>(({ className, ...props }, ref) => (
<SelectPrimitive.Separator
ref={ref}
className={cn("-mx-1 my-1 h-px bg-muted", className)}
{...props}
/>
));
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
export {
Select,
SelectGroup,
SelectValue,
SelectTrigger,
SelectContent,
SelectLabel,
SelectItem,
SelectSeparator,
SelectScrollUpButton,
SelectScrollDownButton,
};
================================================
FILE: apps/browser-extension/src/components/ui/switch.tsx
================================================
import * as React from "react";
import * as SwitchPrimitives from "@radix-ui/react-switch";
import { cn } from "../../utils/css";
const Switch = React.forwardRef<
React.ElementRef<typeof SwitchPrimitives.Root>,
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
>(({ className, ...props }, ref) => (
<SwitchPrimitives.Root
className={cn(
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
className,
)}
{...props}
ref={ref}
>
<SwitchPrimitives.Thumb
className={cn(
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
)}
/>
</SwitchPrimitives.Root>
));
Switch.displayName = SwitchPrimitives.Root.displayName;
export { Switch };
================================================
FILE: apps/browser-extension/src/components/ui/textarea.tsx
================================================
import * as React from "react";
import { cn } from "../../utils/css";
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
({ className, ...props }, ref) => {
return (
<textarea
className={cn(
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
ref={ref}
{...props}
/>
);
},
);
Textarea.displayName = "Textarea";
export { Textarea };
================================================
FILE: apps/browser-extension/src/index.css
================================================
@import "@karakeep/tailwind-config/globals.css";
================================================
FILE: apps/browser-extension/src/main.tsx
================================================
import ReactDOM from "react-dom/client";
import "./index.css";
import { HashRouter, Route, Routes } from "react-router-dom";
import BookmarkDeletedPage from "./BookmarkDeletedPage.tsx";
import BookmarkSavedPage from "./BookmarkSavedPage.tsx";
import CustomHeadersPage from "./CustomHeadersPage.tsx";
import Layout from "./Layout.tsx";
import NotConfiguredPage from "./NotConfiguredPage.tsx";
import OptionsPage from "./OptionsPage.tsx";
import SavePage from "./SavePage.tsx";
import SignInPage from "./SignInPage.tsx";
import { Providers } from "./utils/providers.tsx";
function App() {
return (
<div className="w-96 p-4">
<Providers>
<HashRouter>
<Routes>
<Route element={<Layout />}>
<Route path="/" element={<SavePage />} />
<Route
path="/bookmark/:bookmarkId"
element={<BookmarkSavedPage />}
/>
<Route
path="/bookmarkdeleted"
element={<BookmarkDeletedPage />}
/>
</Route>
<Route path="/notconfigured" element={<NotConfiguredPage />} />
<Route path="/options" element={<OptionsPage />} />
<Route path="/signin" element={<SignInPage />} />
<Route path="/customheaders" element={<CustomHeadersPage />} />
</Routes>
</HashRouter>
</Providers>
</div>
);
}
ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
================================================
FILE: apps/browser-extension/src/utils/ThemeProvider.tsx
================================================
import { createContext, useContext, useEffect } from "react";
import usePluginSettings from "./settings";
type Theme = "dark" | "light" | "system";
interface ThemeProviderProps {
children: React.ReactNode;
}
interface ThemeProviderState {
theme: Theme;
setTheme: (theme: Theme) => void;
}
const initialState: ThemeProviderState = {
theme: "system",
setTheme: () => null,
};
const ThemeProviderContext = createContext<ThemeProviderState>(initialState);
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
const { settings, setSettings } = usePluginSettings();
const theme = settings.theme;
useEffect(() => {
const root = window.document.documentElement;
const updateIcon = (useDarkModeIcons: boolean) => {
const iconSuffix = useDarkModeIcons ? "-darkmode.png" : ".png";
const iconPaths = {
"16": `logo-16${iconSuffix}`,
"48": `logo-48${iconSuffix}`,
"128": `logo-128${iconSuffix}`,
};
chrome.action.setIcon({ path: iconPaths });
};
const applyThemeAndIcon = () => {
root.classList.remove("light", "dark");
let currentTheme: "light" | "dark";
if (theme === "system") {
currentTheme = window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light";
} else {
currentTheme = theme;
}
root.classList.add(currentTheme);
updateIcon(currentTheme === "dark");
};
applyThemeAndIcon();
}, [theme]);
const value = {
theme,
setTheme: (newTheme: Theme) => {
setSettings((s) => ({ ...s, theme: newTheme }));
},
};
return (
<ThemeProviderContext.Provider {...props} value={value}>
{children}
</ThemeProviderContext.Provider>
);
}
export const useTheme = () => {
const context = useContext(ThemeProviderContext);
if (context === undefined)
throw new Error("useTheme must be used within a ThemeProvider");
return context;
};
================================================
FILE: apps/browser-extension/src/utils/badgeCache.ts
================================================
// Badge count cache helpers
import { getPluginSettings } from "./settings";
import { getApiClient, getQueryClient } from "./trpc";
/**
* Fetches the bookmark status for a given URL from the API.
* This function will be used by our cache as the "fetcher".
* @param url The URL to check.
* @returns The bookmark id if found, null if not found.
*/
async function fetchBadgeStatus(url: string): Promise<string | null> {
const api = await getApiClient();
if (!api) {
// This case should ideally not happen if settings are correct
throw new Error("[badgeCache] API client not configured");
}
try {
const data = await api.bookmarks.checkUrl.query({ url });
return data.bookmarkId;
} catch (error) {
console.error(`[badgeCache] Failed to fetch status for ${url}:`, error);
// In case of API error, return a non-cacheable empty status
// Propagate so cache treats this as a miss and doesn't store
throw error;
}
}
/**
* Get badge status for a URL using the SWR cache.
* @param url The URL to get the status for.
*/
export async function getBadgeStatus(url: string): Promise<string | null> {
const { useBadgeCache, badgeCacheExpireMs } = await getPluginSettings();
if (!useBadgeCache) return fetchBadgeStatus(url);
const queryClient = await getQueryClient();
if (!queryClient) return fetchBadgeStatus(url);
return await queryClient.fetchQuery({
queryKey: ["badgeStatus", url],
queryFn: () => fetchBadgeStatus(url),
// Keep in memory for twice as long as stale time
gcTime: badgeCacheExpireMs * 2,
// Use the user-configured cache expire time
staleTime: badgeCacheExpireMs,
});
}
/**
* Clear badge status cache for a specific URL or all URLs.
* @param url The URL to clear. If not provided, clears the entire cache.
*/
export async function clearBadgeStatus(url?: string): Promise<void> {
const queryClient = await getQueryClient();
if (!queryClient) return;
if (url) {
await queryClient.invalidateQueries({ queryKey: ["badgeStatus", url] });
} else {
await queryClient.invalidateQueries({ queryKey: ["badgeStatus"] });
}
console.log(`[badgeCache] Invalidated cache for: ${url || "all"}`);
}
================================================
FILE: apps/browser-extension/src/utils/css.ts
================================================
import type { ClassValue } from "clsx";
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
================================================
FILE: apps/browser-extension/src/utils/providers.tsx
================================================
import { TRPCSettingsProvider } from "@karakeep/shared-react/providers/trpc-provider";
import usePluginSettings from "./settings";
import { ThemeProvider } from "./ThemeProvider";
export function Providers({ children }: { children: React.ReactNode }) {
const { settings } = usePluginSettings();
return (
<TRPCSettingsProvider settings={settings}>
<ThemeProvider>{children}</ThemeProvider>
</TRPCSettingsProvider>
);
}
================================================
FILE: apps/browser-extension/src/utils/settings.ts
================================================
import React from "react";
import { z } from "zod";
export const DEFAULT_BADGE_CACHE_EXPIRE_MS = 60 * 60 * 1000; // 1 hour
export const DEFAULT_SHOW_COUNT_BADGE = false;
const zSettingsSchema = z.object({
apiKey: z.string(),
apiKeyId: z.string().optional(),
address: z.string().optional().default("https://cloud.karakeep.app"),
theme: z.enum(["light", "dark", "system"]).optional().default("system"),
showCountBadge: z.boolean().default(DEFAULT_SHOW_COUNT_BADGE),
useBadgeCache: z.boolean().default(true),
badgeCacheExpireMs: z.number().min(0).default(DEFAULT_BADGE_CACHE_EXPIRE_MS),
customHeaders: z.record(z.string(), z.string()).optional().default({}),
});
const DEFAULT_SETTINGS: Settings = {
apiKey: "",
address: "https://cloud.karakeep.app",
theme: "system",
showCountBadge: DEFAULT_SHOW_COUNT_BADGE,
useBadgeCache: true,
badgeCacheExpireMs: DEFAULT_BADGE_CACHE_EXPIRE_MS,
customHeaders: {},
};
export type Settings = z.infer<typeof zSettingsSchema>;
const STORAGE = chrome.storage.sync;
export default function usePluginSettings() {
const [settings, setSettingsInternal] =
React.useState<Settings>(DEFAULT_SETTINGS);
const [isInit, setIsInit] = React.useState(false);
React.useEffect(() => {
if (!isInit) {
getPluginSettings().then((settings) => {
setSettingsInternal(settings);
setIsInit(true);
});
}
const onChange = (
changes: Record<string, chrome.storage.StorageChange>,
) => {
if (changes.settings === undefined) {
return;
}
const parsedSettings = zSettingsSchema.safeParse(
changes.settings.newValue,
);
if (parsedSettings.success) {
setSettingsInternal(parsedSettings.data);
}
};
STORAGE.onChanged.addListener(onChange);
return () => {
STORAGE.onChanged.removeListener(onChange);
};
}, []);
const setSettings = async (s: (_: Settings) => Settings) => {
const newVal = s(settings);
await STORAGE.set({ settings: newVal });
};
return { settings, setSettings, isPending: isInit };
}
export async function getPluginSettings() {
const parsedSettings = zSettingsSchema.safeParse(
(await STORAGE.get("settings")).settings,
);
if (parsedSettings.success) {
return parsedSettings.data;
} else {
return DEFAULT_SETTINGS;
}
}
export function subscribeToSettingsChanges(
callback: (settings: Settings) => void,
) {
STORAGE.onChanged.addListener((changes) => {
if (changes.settings === undefined) {
return;
}
const parsedSettings = zSettingsSchema.safeParse(changes.settings.newValue);
if (parsedSettings.success) {
callback(parsedSettings.data);
} else {
callback(DEFAULT_SETTINGS);
}
});
}
================================================
FILE: apps/browser-extension/src/utils/storagePersister.ts
================================================
import {
PersistedClient,
Persister,
} from "@tanstack/react-query-persist-client";
export const TANSTACK_QUERY_CACHE_KEY = "tanstack-query-cache-key";
// Declare chrome namespace for TypeScript
declare const chrome: {
storage: {
local: {
set: (items: Record<string, string>) => Promise<void>;
get: (keys: string | string[]) => Promise<Record<string, string>>;
remove: (keys: string | string[]) => Promise<void>;
};
};
};
/**
* Creates an AsyncStorage-like interface for Chrome's extension storage.
*
* @param storage The Chrome storage area to use (e.g., `chrome.storage.local`).
* @returns An object that mimics the AsyncStorage interface.
*/
export const createChromeStorage = (
storage: typeof chrome.storage.local = globalThis.chrome?.storage?.local,
): Persister => {
// Check if we are in a Chrome extension environment
if (typeof chrome === "undefined" || !chrome.storage) {
// Return a noop persister for non-extension environments
return {
persistClient: async () => {
return;
},
restoreClient: async () => undefined,
removeClient: async () => {
return;
},
};
}
return {
persistClient: async (client: PersistedClient) => {
await storage.set({ [TANSTACK_QUERY_CACHE_KEY]: JSON.stringify(client) });
},
restoreClient: async () => {
const result = await storage.get(TANSTACK_QUERY_CACHE_KEY);
return result[TANSTACK_QUERY_CACHE_KEY]
? JSON.parse(result[TANSTACK_QUERY_CACHE_KEY])
: undefined;
},
removeClient: async () => {
await storage.remove(TANSTACK_QUERY_CACHE_KEY);
},
};
};
================================================
FILE: apps/browser-extension/src/utils/trpc.ts
================================================
import { QueryClient } from "@tanstack/react-query";
import { persistQueryClient } from "@tanstack/react-query-persist-client";
import { createTRPCClient, httpBatchLink } from "@trpc/client";
import superjson from "superjson";
import type { AppRouter } from "@karakeep/trpc/routers/_app";
import { getPluginSettings } from "./settings";
import { createChromeStorage } from "./storagePersister";
export { useTRPC } from "@karakeep/shared-react/trpc";
let apiClient: ReturnType<typeof createTRPCClient<AppRouter>> | null = null;
let queryClient: QueryClient | null = null;
let currentSettings: {
address: string;
apiKey: string;
badgeCacheExpireMs: number;
useBadgeCache: boolean;
customHeaders: Record<string, string>;
} | null = null;
export async function initializeClients() {
const { address, apiKey, badgeCacheExpireMs, useBadgeCache, customHeaders } =
await getPluginSettings();
if (currentSettings) {
const addressChanged = currentSettings.address !== address;
const apiKeyChanged = currentSettings.apiKey !== apiKey;
const cacheTimeChanged =
currentSettings.badgeCacheExpireMs !== badgeCacheExpireMs;
const useBadgeCacheChanged =
currentSettings.useBadgeCache !== useBadgeCache;
const customHeadersChanged =
JSON.stringify(currentSettings.customHeaders) !==
JSON.stringify(customHeaders);
if (!address || !apiKey) {
// Invalid configuration, clean
const persisterForCleanup = createChromeStorage();
await persisterForCleanup.removeClient();
cleanupApiClient();
return;
}
if (addressChanged || apiKeyChanged || customHeadersChanged) {
// Switch context completely → discard the old instance and wipe persisted cache
const persisterForCleanup = createChromeStorage();
await persisterForCleanup.removeClient();
cleanupApiClient();
} else if ((cacheTimeChanged || useBadgeCacheChanged) && queryClient) {
// Change the cache policy only → Clean up the data, but reuse the instance
queryClient.clear();
}
// If there is already existing and there is no major change in settings, reuse it
if (
queryClient &&
apiClient &&
currentSettings &&
!addressChanged &&
!apiKeyChanged &&
!cacheTimeChanged &&
!useBadgeCacheChanged &&
!customHeadersChanged
) {
return;
}
}
if (address && apiKey) {
// Store current settings
currentSettings = {
address,
apiKey,
badgeCacheExpireMs,
useBadgeCache,
customHeaders,
};
// Create new QueryClient with updated settings
queryClient = new QueryClient();
const persister = createChromeStorage();
if (useBadgeCache) {
persistQueryClient({
queryClient,
persister,
// Avoid restoring very old data and bust on policy changes
maxAge: badgeCacheExpireMs * 2,
buster: `badge:${address}:${badgeCacheExpireMs}`,
});
} else {
// Ensure disk cache is cleared when caching is disabled
await persister.removeClient();
}
apiClient = createTRPCClient<AppRouter>({
links: [
httpBatchLink({
url: `${address}/api/trpc`,
headers() {
return {
Authorization: `Bearer ${apiKey}`,
...customHeaders,
};
},
transformer: superjson,
}),
],
});
}
}
export async function getApiClient() {
if (!apiClient) {
await initializeClients();
}
return apiClient;
}
export async function getQueryClient() {
// Check if settings have changed and reinitialize if needed
await initializeClients();
return queryClient;
}
export function cleanupApiClient() {
apiClient = null;
queryClient = null;
currentSettings = null;
}
================================================
FILE: apps/browser-extension/src/utils/type.ts
================================================
export const enum MessageType {
BOOKMARK_REFRESH_BADGE = 1,
}
================================================
FILE: apps/browser-extension/src/utils/url.ts
================================================
/**
* Check if a URL is an HTTP or HTTPS URL.
* @param url The URL to check.
* @returns True if the URL starts with "http://" or "https://", false otherwise.
*/
export function isHttpUrl(url: string) {
const lower = url.toLowerCase();
return lower.startsWith("http://") || lower.startsWith("https://");
}
/**
* Normalize a URL by removing the hash and trailing slash.
* @param url The URL to process.
* @param base Optional base URL for relative URLs.
* @returns Normalized URL as string.
*/
export function normalizeUrl(url: string, base?: string): string {
const u = new URL(url, base);
u.hash = ""; // Remove hash fragment
let pathname = u.pathname;
if (pathname.endsWith("/") && pathname !== "/") {
pathname = pathname.slice(0, -1); // Remove trailing slash except for root "/"
}
u.pathname = pathname;
return u.toString();
}
/**
* Compare two URLs ignoring hash and trailing slash.
* @param url1 First URL.
* @param url2 Second URL.
* @param base Optional base URL for relative URLs.
* @returns True if URLs match after normalization.
*/
export function urlsMatchIgnoringAnchorAndTrailingSlash(
url1: string,
url2: string,
base?: string,
): boolean {
return normalizeUrl(url1, base) === normalizeUrl(url2, base);
}
================================================
FILE: apps/browser-extension/src/vite-env.d.ts
================================================
/// <reference types="vite/client" />
================================================
FILE: apps/browser-extension/tailwind.config.js
================================================
import web from "@karakeep/tailwind-config/web";
const config = {
darkMode: "selector",
content: web.content,
presets: [web],
};
export default config;
================================================
FILE: apps/browser-extension/tsconfig.json
================================================
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"types": ["chrome"],
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedLocals": false,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["src", "vite.config.ts"],
"exclude": ["node_modules"]
}
================================================
FILE: apps/browser-extension/vite.config.ts
================================================
import { crx } from "@crxjs/vite-plugin";
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vite";
import manifest from "./manifest.json";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
crx({
manifest,
browser: process.env.VITE_BUILD_FIREFOX ? "firefox" : "chrome",
}),
],
server: {
cors: {
origin: [/chrome-extension:\/\//],
},
},
});
================================================
FILE: apps/cli/.gitignore
================================================
dist
================================================
FILE: apps/cli/.npmignore
================================================
.turbo/**
src/**
vite.config.mts
tsconfig.json
================================================
FILE: apps/cli/.oxlintrc.json
================================================
{
"$schema": "../../node_modules/oxlint/configuration_schema.json",
"extends": [
"../../tooling/oxlint/oxlint-base.json"
],
"env": {
"builtin": true,
"commonjs": true
},
"ignorePatterns": [
"**/*.config.js",
"**/*.config.cjs",
"**/.eslintrc.cjs",
"**/.next",
"**/dist",
"**/build",
"**/pnpm-lock.yaml"
]
}
================================================
FILE: apps/cli/package.json
================================================
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@karakeep/cli",
"version": "0.31.0",
"description": "Command Line Interface (CLI) for Karakeep",
"license": "GNU Affero General Public License version 3",
"type": "module",
"keywords": [
"hoarder",
"karakeep",
"cli"
],
"exports": "./dist/index.mjs",
"bin": {
"karakeep": "dist/index.mjs"
},
"devDependencies": {
"@commander-js/extra-typings": "^12.0.1",
"@karakeep/shared": "workspace:^0.1.0",
"@karakeep/trpc": "workspace:^0.1.0",
"@karakeep/tsconfig": "workspace:^0.1.0",
"@trpc/client": "^11.9.0",
"@trpc/server": "^11.9.0",
"@tsconfig/node22": "^22.0.0",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"superjson": "^2.2.1",
"table": "^6.8.2",
"tsx": "^4.8.1",
"vite": "^7.0.6",
"vite-tsconfig-paths": "^4.3.1"
},
"scripts": {
"build": "vite build && chmod +x dist/index.mjs",
"run": "tsx src/index.ts",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"format": "oxfmt --check .",
"format:fix": "oxfmt .",
"typecheck": "tsc --noEmit"
},
"repository": {
"type": "git",
"url": "git+https://github.com/karakeep-app/karakeep.git",
"directory": "apps/cli"
}
}
================================================
FILE: apps/cli/src/commands/admin.ts
================================================
import { getGlobalOptions } from "@/lib/globals";
import {
printErrorMessageWithReason,
printObject,
printStatusMessage,
} from "@/lib/output";
import { getAPIClient } from "@/lib/trpc";
import { Command } from "@commander-js/extra-typings";
import { getBorderCharacters, table } from "table";
export const adminCmd = new Command()
.name("admin")
.description("admin commands");
function toHumanReadableSize(size: number): string {
const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
if (size === 0) return "0 Bytes";
const i = Math.floor(Math.log(size) / Math.log(1024));
return (size / Math.pow(1024, i)).toFixed(2) + " " + sizes[i];
}
// --- Users subcommand ---
const usersCmd = new Command()
.name("users")
.description("user management commands");
usersCmd
.command("list")
.description("list all users")
.action(async () => {
const api = getAPIClient();
try {
const [usersResp, userStats] = await Promise.all([
api.users.list.query(),
api.admin.userStats.query(),
]);
if (getGlobalOptions().json) {
printObject({
users: usersResp.users.map((u) => ({
...u,
numBookmarks: userStats[u.id]?.numBookmarks ?? 0,
assetSizes: userStats[u.id]?.assetSizes ?? 0,
})),
});
} else {
const data: string[][] = [
[
"Name",
"Email",
"Num Bookmarks",
"Asset Sizes",
"Role",
"Local User",
],
];
usersResp.users.forEach((user) => {
const stats = userStats[user.id] ?? {
numBookmarks: 0,
assetSizes: 0,
};
const numBookmarksDisplay = `${stats.numBookmarks} / ${user.bookmarkQuota?.toString() ?? "Unlimited"}`;
const assetSizesDisplay = `${toHumanReadableSize(stats.assetSizes)} / ${user.storageQuota ? toHumanReadableSize(user.storageQuota) : "Unlimited"}`;
data.push([
user.name,
user.email,
numBookmarksDisplay,
assetSizesDisplay,
user.role ?? "",
user.localUser ? "✓" : "✗",
]);
});
console.log(
table(data, {
border: getBorderCharacters("ramac"),
drawHorizontalLine: (lineIndex, rowCount) => {
return (
lineIndex === 0 || lineIndex === 1 || lineIndex === rowCount
);
},
}),
);
}
} catch (error) {
printErrorMessageWithReason("Failed to list all users", error as object);
}
});
adminCmd.addCommand(usersCmd);
// --- Bookmarks subcommand ---
const bookmarksCmd = new Command()
.name("bookmarks")
.description("admin bookmark management commands");
bookmarksCmd
.command("debug")
.description("get debug info for a bookmark")
.argument("<bookmarkId>", "the id of the bookmark to debug")
.action(async (bookmarkId) => {
const api = getAPIClient();
try {
const debugInfo = await api.admin.getBookmarkDebugInfo.query({
bookmarkId,
});
if (getGlobalOptions().json) {
printObject(debugInfo);
} else {
const basicData: string[][] = [["Field", "Value"]];
basicData.push(["ID", debugInfo.id]);
basicData.push(["Type", debugInfo.type]);
basicData.push(["Source", debugInfo.source ?? "N/A"]);
basicData.push(["Owner User ID", debugInfo.userId]);
basicData.push([
"Created At",
new Date(debugInfo.createdAt).toISOString(),
]);
basicData.push([
"Modified At",
debugInfo.modifiedAt
? new Date(debugInfo.modifiedAt).toISOString()
: "N/A",
]);
basicData.push(["Title", debugInfo.title ?? "N/A"]);
basicData.push(["Summary", debugInfo.summary ?? "N/A"]);
basicData.push(["Tagging Status", debugInfo.taggingStatus ?? "N/A"]);
basicData.push([
"Summarization Status",
debugInfo.summarizationStatus ?? "N/A",
]);
if (debugInfo.linkInfo) {
basicData.push(["URL", debugInfo.linkInfo.url]);
basicData.push(["Crawl Status", debugInfo.linkInfo.crawlStatus]);
basicData.push([
"Crawl Status Code",
debugInfo.linkInfo.crawlStatusCode?.toString() ?? "N/A",
]);
basicData.push([
"Crawled At",
debugInfo.linkInfo.crawledAt
? new Date(debugInfo.linkInfo.crawledAt).toISOString()
: "N/A",
]);
basicData.push([
"Has HTML Content",
debugInfo.linkInfo.hasHtmlContent ? "Yes" : "No",
]);
basicData.push([
"Has Content Asset",
debugInfo.linkInfo.hasContentAsset ? "Yes" : "No",
]);
}
if (debugInfo.textInfo) {
basicData.push([
"Has Text",
debugInfo.textInfo.hasText ? "Yes" : "No",
]);
basicData.push(["Source URL", debugInfo.textInfo.sourceUrl ?? "N/A"]);
}
if (debugInfo.assetInfo) {
basicData.push(["Asset Type", debugInfo.assetInfo.assetType]);
basicData.push([
"Has Content",
debugInfo.assetInfo.hasContent ? "Yes" : "No",
]);
basicData.push(["File Name", debugInfo.assetInfo.fileName ?? "N/A"]);
}
console.log(
table(basicData, {
border: getBorderCharacters("ramac"),
drawHorizontalLine: (lineIndex, rowCount) =>
lineIndex === 0 || lineIndex === 1 || lineIndex === rowCount,
}),
);
if (debugInfo.tags.length > 0) {
console.log("Tags:");
const tagsData: string[][] = [["Name", "Attached By"]];
debugInfo.tags.forEach((tag) => {
tagsData.push([tag.name, tag.attachedBy]);
});
console.log(
table(tagsData, {
border: getBorderCharacters("ramac"),
drawHorizontalLine: (lineIndex, rowCount) =>
lineIndex === 0 || lineIndex === 1 || lineIndex === rowCount,
}),
);
}
if (debugInfo.assets.length > 0) {
console.log("Assets:");
const assetsData: string[][] = [["Type", "Size", "URL"]];
debugInfo.assets.forEach((asset) => {
assetsData.push([
asset.assetType,
toHumanReadableSize(asset.size),
asset.url ?? "N/A",
]);
});
console.log(
table(assetsData, {
border: getBorderCharacters("ramac"),
drawHorizontalLine: (lineIndex, rowCount) =>
lineIndex === 0 || lineIndex === 1 || lineIndex === rowCount,
}),
);
}
}
} catch (error) {
printErrorMessageWithReason(
"Failed to get bookmark debug info",
error as object,
);
}
});
bookmarksCmd
.command("recrawl")
.description("trigger a recrawl for a link bookmark")
.argument("<bookmarkId>", "the id of the bookmark to recrawl")
.action(async (bookmarkId) => {
const api = getAPIClient();
try {
await api.admin.adminRecrawlBookmark.mutate({ bookmarkId });
printStatusMessage(true, "Recrawl queued successfully");
} catch (error) {
printErrorMessageWithReason("Failed to queue recrawl", error as object);
}
});
bookmarksCmd
.command("reindex")
.description("trigger a search reindex for a bookmark")
.argument("<bookmarkId>", "the id of the bookmark to reindex")
.action(async (bookmarkId) => {
const api = getAPIClient();
try {
await api.admin.adminReindexBookmark.mutate({ bookmarkId });
printStatusMessage(true, "Reindex queued successfully");
} catch (error) {
printErrorMessageWithReason("Failed to queue reindex", error as object);
}
});
bookmarksCmd
.command("retag")
.description("trigger AI retagging for a bookmark")
.argument("<bookmarkId>", "the id of the bookmark to retag")
.action(async (bookmarkId) => {
const api = getAPIClient();
try {
await api.admin.adminRetagBookmark.mutate({ bookmarkId });
printStatusMessage(true, "Retag queued successfully");
} catch (error) {
printErrorMessageWithReason("Failed to queue retag", error as object);
}
});
bookmarksCmd
.command("resummarize")
.description("trigger AI resummarization for a link bookmark")
.argument("<bookmarkId>", "the id of the bookmark to resummarize")
.action(async (bookmarkId) => {
const api = getAPIClient();
try {
await api.admin.adminResummarizeBookmark.mutate({ bookmarkId });
printStatusMessage(true, "Resummarize queued successfully");
} catch (error) {
printErrorMessageWithReason(
"Failed to queue resummarize",
error as object,
);
}
});
adminCmd.addCommand(bookmarksCmd);
// --- Jobs subcommand ---
const jobsCmd = new Command()
.name("jobs")
.description("background job management commands");
jobsCmd
.command("stats")
.description("show background job queue statistics")
.action(async () => {
const api = getAPIClient();
try {
const stats = await api.admin.backgroundJobsStats.query();
if (getGlobalOptions().json) {
printObject(stats);
} else {
const data: string[][] = [["Queue", "Queued", "Unprocessed", "Failed"]];
data.push([
"Crawling",
stats.crawlStats.queued.toString(),
stats.crawlStats.pending.toString(),
stats.crawlStats.failed.toString(),
]);
data.push([
"Inference (Tag/Summarize)",
stats.inferenceStats.queued.toString(),
stats.inferenceStats.pending.toString(),
stats.inferenceStats.failed.toString(),
]);
data.push([
"Search Indexing",
stats.indexingStats.queued.toString(),
"-",
"-",
]);
data.push([
"Video Processing",
stats.videoStats.queued.toString(),
"-",
"-",
]);
data.push(["Webhooks", stats.webhookStats.queued.toString(), "-", "-"]);
data.push([
"Asset Preprocessing",
stats.assetPreprocessingStats.queued.toString(),
"-",
"-",
]);
data.push(["Feeds", stats.feedStats.queued.toString(), "-", "-"]);
data.push([
"Admin Maintenance",
stats.adminMaintenanceStats.queued.toString(),
"-",
"-",
]);
console.log(
table(data, {
border: getBorderCharacters("ramac"),
drawHorizontalLine: (lineIndex, rowCount) =>
lineIndex === 0 || lineIndex === 1 || lineIndex === rowCount,
}),
);
}
} catch (error) {
printErrorMessageWithReason(
"Failed to get background job stats",
error as object,
);
}
});
jobsCmd
.command("recrawl-links")
.description("recrawl all link bookmarks matching a crawl status")
.requiredOption(
"--status <status>",
"filter by crawl status (success, failure, pending, all)",
)
.option("--run-inference", "also re-run inference after crawling", false)
.action(async (opts) => {
const api = getAPIClient();
const status = opts.status as "success" | "failure" | "pending" | "all";
try {
await api.admin.recrawlLinks.mutate({
crawlStatus: status,
runInference: opts.runInference,
});
printStatusMessage(
true,
`Recrawl queued for all links with crawl status: ${status}`,
);
} catch (error) {
printErrorMessageWithReason(
"Failed to queue mass recrawl",
error as object,
);
}
});
jobsCmd
.command("reindex-all")
.description("reindex all bookmarks for search")
.action(async () => {
const api = getAPIClient();
try {
await api.admin.reindexAllBookmarks.mutate();
printStatusMessage(true, "Reindex queued for all bookmarks");
} catch (error) {
printErrorMessageWithReason(
"Failed to queue mass reindex",
error as object,
);
}
});
jobsCmd
.command("retag-all")
.description("re-run AI tagging on all bookmarks matching a status")
.requiredOption(
"--status <status>",
"filter by tagging status (success, failure, pending, all)",
)
.action(async (opts) => {
const api = getAPIClient();
const status = opts.status as "success" | "failure" | "pending" | "all";
try {
await api.admin.reRunInferenceOnAllBookmarks.mutate({
type: "tag",
status,
});
printStatusMessage(
true,
`Retag queued for all bookmarks with tagging status: ${status}`,
);
} catch (error) {
printErrorMessageWithReason(
"Failed to queue mass retag",
error as object,
);
}
});
jobsCmd
.command("resummarize-all")
.description("re-run AI summarization on all bookmarks matching a status")
.requiredOption(
"--status <status>",
"filter by summarization status (success, failure, pending, all)",
)
.action(async (opts) => {
const api = getAPIClient();
const status = opts.status as "success" | "failure" | "pending" | "all";
try {
await api.admin.reRunInferenceOnAllBookmarks.mutate({
type: "summarize",
status,
});
printStatusMessage(
true,
`Resummarize queued for all bookmarks with summarization status: ${status}`,
);
} catch (error) {
printErrorMessageWithReason(
"Failed to queue mass resummarize",
error as object,
);
}
});
jobsCmd
.command("reprocess-assets")
.description("reprocess all asset bookmarks in fix mode")
.action(async () => {
const api = getAPIClient();
try {
await api.admin.reprocessAssetsFixMode.mutate();
printStatusMessage(true, "Asset reprocessing queued for all assets");
} catch (error) {
printErrorMessageWithReason(
"Failed to queue asset reprocessing",
error as object,
);
}
});
adminCmd.addCommand(jobsCmd);
================================================
FILE: apps/cli/src/commands/bookmarks.ts
================================================
import * as fs from "node:fs";
import { addToList } from "@/commands/lists";
import {
printError,
printObject,
printStatusMessage,
printSuccess,
} from "@/li
gitextract_zd_j__6h/ ├── .claude/ │ └── settings.json ├── .dockerignore ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.yml │ │ ├── feature_request.yml │ │ └── question.yml │ └── workflows/ │ ├── android.yml │ ├── ci.yml │ ├── claude.yml │ ├── cli.yml │ ├── docker.yml │ ├── extension.yml │ ├── ios.yml │ ├── mcp.yml │ └── sdk.yml ├── .gitignore ├── .husky/ │ └── pre-commit ├── .npmrc ├── .oxfmtrc.json ├── .oxlintrc.json ├── AGENTS.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── apps/ │ ├── browser-extension/ │ │ ├── .gitignore │ │ ├── .oxlintrc.json │ │ ├── components.json │ │ ├── index.html │ │ ├── manifest.json │ │ ├── package.json │ │ ├── postcss.config.js │ │ ├── src/ │ │ │ ├── BookmarkDeletedPage.tsx │ │ │ ├── BookmarkSavedPage.tsx │ │ │ ├── CustomHeadersPage.tsx │ │ │ ├── Layout.tsx │ │ │ ├── Logo.tsx │ │ │ ├── NotConfiguredPage.tsx │ │ │ ├── OptionsPage.tsx │ │ │ ├── SavePage.tsx │ │ │ ├── SignInPage.tsx │ │ │ ├── Spinner.tsx │ │ │ ├── background/ │ │ │ │ ├── background.ts │ │ │ │ └── protocol.ts │ │ │ ├── components/ │ │ │ │ ├── BookmarkLists.tsx │ │ │ │ ├── ListsSelector.tsx │ │ │ │ ├── NoteEditor.tsx │ │ │ │ ├── TagList.tsx │ │ │ │ ├── TagsSelector.tsx │ │ │ │ └── ui/ │ │ │ │ ├── badge.tsx │ │ │ │ ├── button.tsx │ │ │ │ ├── command.tsx │ │ │ │ ├── dialog.tsx │ │ │ │ ├── dynamic-popover.tsx │ │ │ │ ├── input.tsx │ │ │ │ ├── popover.tsx │ │ │ │ ├── select.tsx │ │ │ │ ├── switch.tsx │ │ │ │ └── textarea.tsx │ │ │ ├── index.css │ │ │ ├── main.tsx │ │ │ ├── utils/ │ │ │ │ ├── ThemeProvider.tsx │ │ │ │ ├── badgeCache.ts │ │ │ │ ├── css.ts │ │ │ │ ├── providers.tsx │ │ │ │ ├── settings.ts │ │ │ │ ├── storagePersister.ts │ │ │ │ ├── trpc.ts │ │ │ │ ├── type.ts │ │ │ │ └── url.ts │ │ │ └── vite-env.d.ts │ │ ├── tailwind.config.js │ │ ├── tsconfig.json │ │ └── vite.config.ts │ ├── cli/ │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .oxlintrc.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── commands/ │ │ │ │ ├── admin.ts │ │ │ │ ├── bookmarks.ts │ │ │ │ ├── dump.ts │ │ │ │ ├── lists.ts │ │ │ │ ├── migrate.ts │ │ │ │ ├── tags.ts │ │ │ │ ├── whoami.ts │ │ │ │ └── wipe.ts │ │ │ ├── index.ts │ │ │ ├── lib/ │ │ │ │ ├── globals.ts │ │ │ │ ├── output.ts │ │ │ │ └── trpc.ts │ │ │ └── vite-env.d.ts │ │ ├── tsconfig.json │ │ └── vite.config.mts │ ├── landing/ │ │ ├── .oxlintrc.json │ │ ├── README.md │ │ ├── components/ │ │ │ └── ui/ │ │ │ └── button.tsx │ │ ├── components.json │ │ ├── index.html │ │ ├── lib/ │ │ │ └── utils.ts │ │ ├── package.json │ │ ├── postcss.config.cjs │ │ ├── public/ │ │ │ ├── robots.txt │ │ │ └── sitemap.xml │ │ ├── src/ │ │ │ ├── App.tsx │ │ │ ├── Apps.tsx │ │ │ ├── Homepage.tsx │ │ │ ├── Navbar.tsx │ │ │ ├── Pricing.tsx │ │ │ ├── Privacy.tsx │ │ │ ├── SEO.tsx │ │ │ ├── Terms.tsx │ │ │ ├── components/ │ │ │ │ ├── Banner.tsx │ │ │ │ ├── CallToAction.tsx │ │ │ │ ├── FeatureShowcase.tsx │ │ │ │ ├── FeaturesGrid.tsx │ │ │ │ ├── Footer.tsx │ │ │ │ ├── Hero.tsx │ │ │ │ ├── Layout.tsx │ │ │ │ ├── OpenSource.tsx │ │ │ │ └── Platforms.tsx │ │ │ ├── constants.ts │ │ │ └── main.tsx │ │ ├── tailwind.config.ts │ │ ├── tsconfig.json │ │ ├── vite-env.d.ts │ │ └── vite.config.ts │ ├── mcp/ │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .oxlintrc.json │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── bookmarks.ts │ │ │ ├── index.ts │ │ │ ├── lists.ts │ │ │ ├── shared.ts │ │ │ ├── tags.ts │ │ │ └── utils.ts │ │ ├── tsconfig.json │ │ └── vite.config.mts │ ├── mobile/ │ │ ├── .gitignore │ │ ├── .npmrc │ │ ├── .oxlintrc.json │ │ ├── app/ │ │ │ ├── +not-found.tsx │ │ │ ├── _layout.tsx │ │ │ ├── dashboard/ │ │ │ │ ├── (tabs)/ │ │ │ │ │ ├── (highlights)/ │ │ │ │ │ │ ├── _layout.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── (home)/ │ │ │ │ │ │ ├── _layout.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── (lists)/ │ │ │ │ │ │ ├── _layout.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── (settings)/ │ │ │ │ │ │ ├── _layout.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── (tags)/ │ │ │ │ │ │ ├── _layout.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── _layout.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── _layout.tsx │ │ │ │ ├── archive.tsx │ │ │ │ ├── bookmarks/ │ │ │ │ │ ├── [slug]/ │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ ├── info.tsx │ │ │ │ │ │ ├── manage_lists.tsx │ │ │ │ │ │ └── manage_tags.tsx │ │ │ │ │ └── new.tsx │ │ │ │ ├── favourites.tsx │ │ │ │ ├── lists/ │ │ │ │ │ ├── [slug]/ │ │ │ │ │ │ ├── edit.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── new.tsx │ │ │ │ ├── search.tsx │ │ │ │ ├── settings/ │ │ │ │ │ ├── bookmark-default-view.tsx │ │ │ │ │ ├── reader-settings.tsx │ │ │ │ │ └── theme.tsx │ │ │ │ └── tags/ │ │ │ │ └── [slug].tsx │ │ │ ├── error.tsx │ │ │ ├── index.tsx │ │ │ ├── server-address.tsx │ │ │ ├── sharing.tsx │ │ │ ├── signin.tsx │ │ │ └── test-connection.tsx │ │ ├── app.config.js │ │ ├── babel.config.js │ │ ├── components/ │ │ │ ├── CustomHeadersModal.tsx │ │ │ ├── FullPageError.tsx │ │ │ ├── Logo.tsx │ │ │ ├── SplashScreenController.tsx │ │ │ ├── TailwindResolver.tsx │ │ │ ├── bookmarks/ │ │ │ │ ├── BookmarkAssetImage.tsx │ │ │ │ ├── BookmarkAssetView.tsx │ │ │ │ ├── BookmarkCard.tsx │ │ │ │ ├── BookmarkHtmlHighlighterDom.tsx │ │ │ │ ├── BookmarkLinkPreview.tsx │ │ │ │ ├── BookmarkLinkTypeSelector.tsx │ │ │ │ ├── BookmarkLinkView.tsx │ │ │ │ ├── BookmarkList.tsx │ │ │ │ ├── BookmarkTextMarkdown.tsx │ │ │ │ ├── BookmarkTextView.tsx │ │ │ │ ├── BottomActions.tsx │ │ │ │ ├── NotePreview.tsx │ │ │ │ ├── PDFViewer.tsx │ │ │ │ ├── TagPill.tsx │ │ │ │ └── UpdatingBookmarkList.tsx │ │ │ ├── highlights/ │ │ │ │ ├── HighlightCard.tsx │ │ │ │ └── HighlightList.tsx │ │ │ ├── navigation/ │ │ │ │ └── stack.tsx │ │ │ ├── reader/ │ │ │ │ └── ReaderPreview.tsx │ │ │ ├── settings/ │ │ │ │ └── UserProfileHeader.tsx │ │ │ ├── sharing/ │ │ │ │ ├── ErrorAnimation.tsx │ │ │ │ ├── LoadingAnimation.tsx │ │ │ │ └── SuccessAnimation.tsx │ │ │ └── ui/ │ │ │ ├── ActionButton.tsx │ │ │ ├── Avatar.tsx │ │ │ ├── Button.tsx │ │ │ ├── ChevronRight.tsx │ │ │ ├── Divider.tsx │ │ │ ├── EmptyState.tsx │ │ │ ├── FullPageSpinner.tsx │ │ │ ├── GroupedList.tsx │ │ │ ├── Input.tsx │ │ │ ├── SearchInput/ │ │ │ │ ├── SearchInput.ios.tsx │ │ │ │ ├── SearchInput.tsx │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ ├── Skeleton.tsx │ │ │ ├── Text.tsx │ │ │ └── Toast.tsx │ │ ├── eas.json │ │ ├── globals.css │ │ ├── index.ts │ │ ├── lib/ │ │ │ ├── hooks.ts │ │ │ ├── providers.tsx │ │ │ ├── readerSettings.tsx │ │ │ ├── session.ts │ │ │ ├── settings.ts │ │ │ ├── upload.ts │ │ │ ├── useColorScheme.tsx │ │ │ ├── useMenuIconColors.ts │ │ │ └── utils.ts │ │ ├── metro.config.js │ │ ├── nativewind-env.d.ts │ │ ├── package.json │ │ ├── plugins/ │ │ │ ├── camera-not-required.js │ │ │ ├── network_security_config.xml │ │ │ └── trust-local-certs.js │ │ ├── tailwind.config.js │ │ ├── theme/ │ │ │ ├── colors.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── web/ │ │ ├── .oxlintrc.json │ │ ├── @types/ │ │ │ └── i18next.d.ts │ │ ├── README.md │ │ ├── app/ │ │ │ ├── admin/ │ │ │ │ ├── admin_tools/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── background_jobs/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── layout.tsx │ │ │ │ ├── overview/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── page.tsx │ │ │ │ └── users/ │ │ │ │ └── page.tsx │ │ │ ├── api/ │ │ │ │ ├── [[...route]]/ │ │ │ │ │ └── route.ts │ │ │ │ ├── auth/ │ │ │ │ │ └── [...nextauth]/ │ │ │ │ │ └── route.tsx │ │ │ │ └── bookmarks/ │ │ │ │ └── export/ │ │ │ │ └── route.tsx │ │ │ ├── check-email/ │ │ │ │ └── page.tsx │ │ │ ├── dashboard/ │ │ │ │ ├── @modal/ │ │ │ │ │ ├── (.)preview/ │ │ │ │ │ │ └── [bookmarkId]/ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── [...catchAll]/ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── default.tsx │ │ │ │ ├── archive/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── bookmarks/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── cleanups/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── error.tsx │ │ │ │ ├── favourites/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── feeds/ │ │ │ │ │ └── [feedId]/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── highlights/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── layout.tsx │ │ │ │ ├── lists/ │ │ │ │ │ ├── [listId]/ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── not-found.tsx │ │ │ │ ├── preview/ │ │ │ │ │ └── [bookmarkId]/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── search/ │ │ │ │ │ └── page.tsx │ │ │ │ └── tags/ │ │ │ │ ├── [tagId]/ │ │ │ │ │ └── page.tsx │ │ │ │ └── page.tsx │ │ │ ├── forgot-password/ │ │ │ │ └── page.tsx │ │ │ ├── invite/ │ │ │ │ └── [token]/ │ │ │ │ └── page.tsx │ │ │ ├── layout.tsx │ │ │ ├── logout/ │ │ │ │ └── page.tsx │ │ │ ├── page.tsx │ │ │ ├── public/ │ │ │ │ ├── layout.tsx │ │ │ │ └── lists/ │ │ │ │ └── [listId]/ │ │ │ │ ├── not-found.tsx │ │ │ │ └── page.tsx │ │ │ ├── reader/ │ │ │ │ ├── [bookmarkId]/ │ │ │ │ │ └── page.tsx │ │ │ │ └── layout.tsx │ │ │ ├── reset-password/ │ │ │ │ └── page.tsx │ │ │ ├── settings/ │ │ │ │ ├── ai/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── api-keys/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── assets/ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── backups/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── broken-links/ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── feeds/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── import/ │ │ │ │ │ ├── [sessionId]/ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── info/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── layout.tsx │ │ │ │ ├── page.tsx │ │ │ │ ├── rules/ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── stats/ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── subscription/ │ │ │ │ │ └── page.tsx │ │ │ │ └── webhooks/ │ │ │ │ └── page.tsx │ │ │ ├── signin/ │ │ │ │ └── page.tsx │ │ │ ├── signup/ │ │ │ │ └── page.tsx │ │ │ └── verify-email/ │ │ │ └── page.tsx │ │ ├── components/ │ │ │ ├── DemoModeBanner.tsx │ │ │ ├── KarakeepIcon.tsx │ │ │ ├── admin/ │ │ │ │ ├── AddUserDialog.tsx │ │ │ │ ├── AdminCard.tsx │ │ │ │ ├── AdminNotices.tsx │ │ │ │ ├── BackgroundJobs.tsx │ │ │ │ ├── BasicStats.tsx │ │ │ │ ├── BookmarkDebugger.tsx │ │ │ │ ├── CreateInviteDialog.tsx │ │ │ │ ├── InvitesList.tsx │ │ │ │ ├── InvitesListSkeleton.tsx │ │ │ │ ├── ResetPasswordDialog.tsx │ │ │ │ ├── ServiceConnections.tsx │ │ │ │ ├── UpdateUserDialog.tsx │ │ │ │ ├── UserList.tsx │ │ │ │ └── UserListSkeleton.tsx │ │ │ ├── dashboard/ │ │ │ │ ├── BulkBookmarksAction.tsx │ │ │ │ ├── EditableText.tsx │ │ │ │ ├── ErrorFallback.tsx │ │ │ │ ├── GlobalActions.tsx │ │ │ │ ├── SortOrderToggle.tsx │ │ │ │ ├── UploadDropzone.tsx │ │ │ │ ├── ViewOptions.tsx │ │ │ │ ├── bookmarks/ │ │ │ │ │ ├── AssetCard.tsx │ │ │ │ │ ├── BookmarkActionBar.tsx │ │ │ │ │ ├── BookmarkCard.tsx │ │ │ │ │ ├── BookmarkFormattedCreatedAt.tsx │ │ │ │ │ ├── BookmarkLayoutAdaptingCard.tsx │ │ │ │ │ ├── BookmarkMarkdownComponent.tsx │ │ │ │ │ ├── BookmarkOptions.tsx │ │ │ │ │ ├── BookmarkOwnerIcon.tsx │ │ │ │ │ ├── BookmarkTagsEditor.tsx │ │ │ │ │ ├── BookmarkedTextEditor.tsx │ │ │ │ │ ├── Bookmarks.tsx │ │ │ │ │ ├── BookmarksGrid.tsx │ │ │ │ │ ├── BookmarksGridSkeleton.tsx │ │ │ │ │ ├── BulkManageListsModal.tsx │ │ │ │ │ ├── BulkTagModal.tsx │ │ │ │ │ ├── DeleteBookmarkConfirmationDialog.tsx │ │ │ │ │ ├── EditBookmarkDialog.tsx │ │ │ │ │ ├── EditorCard.tsx │ │ │ │ │ ├── FooterLinkURL.tsx │ │ │ │ │ ├── LinkCard.tsx │ │ │ │ │ ├── ManageListsModal.tsx │ │ │ │ │ ├── NoBookmarksBanner.tsx │ │ │ │ │ ├── NotePreview.tsx │ │ │ │ │ ├── SummarizeBookmarkArea.tsx │ │ │ │ │ ├── TagList.tsx │ │ │ │ │ ├── TagModal.tsx │ │ │ │ │ ├── TagsEditor.tsx │ │ │ │ │ ├── TextCard.tsx │ │ │ │ │ ├── UnknownCard.tsx │ │ │ │ │ ├── UpdatableBookmarksGrid.tsx │ │ │ │ │ ├── action-buttons/ │ │ │ │ │ │ └── ArchiveBookmarkButton.tsx │ │ │ │ │ └── icons.tsx │ │ │ │ ├── cleanups/ │ │ │ │ │ └── TagDuplicationDetention.tsx │ │ │ │ ├── feeds/ │ │ │ │ │ └── FeedSelector.tsx │ │ │ │ ├── header/ │ │ │ │ │ ├── Header.tsx │ │ │ │ │ └── ProfileOptions.tsx │ │ │ │ ├── highlights/ │ │ │ │ │ ├── AllHighlights.tsx │ │ │ │ │ └── HighlightCard.tsx │ │ │ │ ├── lists/ │ │ │ │ │ ├── AllListsView.tsx │ │ │ │ │ ├── BookmarkListSelector.tsx │ │ │ │ │ ├── CollapsibleBookmarkLists.tsx │ │ │ │ │ ├── DeleteListConfirmationDialog.tsx │ │ │ │ │ ├── EditListModal.tsx │ │ │ │ │ ├── LeaveListConfirmationDialog.tsx │ │ │ │ │ ├── ListHeader.tsx │ │ │ │ │ ├── ListOptions.tsx │ │ │ │ │ ├── ManageCollaboratorsModal.tsx │ │ │ │ │ ├── MergeListModal.tsx │ │ │ │ │ ├── PendingInvitationsCard.tsx │ │ │ │ │ ├── PublicListLink.tsx │ │ │ │ │ ├── RssLink.tsx │ │ │ │ │ └── ShareListModal.tsx │ │ │ │ ├── preview/ │ │ │ │ │ ├── ActionBar.tsx │ │ │ │ │ ├── AssetContentSection.tsx │ │ │ │ │ ├── AttachmentBox.tsx │ │ │ │ │ ├── BookmarkPreview.tsx │ │ │ │ │ ├── HighlightsBox.tsx │ │ │ │ │ ├── LinkContentSection.tsx │ │ │ │ │ ├── NoteEditor.tsx │ │ │ │ │ ├── ReaderSettingsPopover.tsx │ │ │ │ │ ├── ReaderView.tsx │ │ │ │ │ ├── ReadingProgressBanner.tsx │ │ │ │ │ ├── TextContentSection.tsx │ │ │ │ │ ├── content-renderers/ │ │ │ │ │ │ ├── AmazonRenderer.tsx │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── TikTokRenderer.tsx │ │ │ │ │ │ ├── XRenderer.tsx │ │ │ │ │ │ ├── YouTubeRenderer.tsx │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── registry.ts │ │ │ │ │ │ └── types.ts │ │ │ │ │ └── highlights.ts │ │ │ │ ├── rules/ │ │ │ │ │ ├── RuleEngineActionBuilder.tsx │ │ │ │ │ ├── RuleEngineConditionBuilder.tsx │ │ │ │ │ ├── RuleEngineEventSelector.tsx │ │ │ │ │ ├── RuleEngineRuleEditor.tsx │ │ │ │ │ └── RuleEngineRuleList.tsx │ │ │ │ ├── search/ │ │ │ │ │ ├── QueryExplainerTooltip.tsx │ │ │ │ │ ├── SearchInput.tsx │ │ │ │ │ └── useSearchAutocomplete.ts │ │ │ │ ├── sidebar/ │ │ │ │ │ ├── AllLists.tsx │ │ │ │ │ └── InvitationNotificationBadge.tsx │ │ │ │ └── tags/ │ │ │ │ ├── AllTagsView.tsx │ │ │ │ ├── BulkTagAction.tsx │ │ │ │ ├── CreateTagModal.tsx │ │ │ │ ├── DeleteTagConfirmationDialog.tsx │ │ │ │ ├── EditableTagName.tsx │ │ │ │ ├── MergeTagModal.tsx │ │ │ │ ├── MultiTagSelector.tsx │ │ │ │ ├── TagAutocomplete.tsx │ │ │ │ ├── TagOptions.tsx │ │ │ │ └── TagPill.tsx │ │ │ ├── invite/ │ │ │ │ └── InviteAcceptForm.tsx │ │ │ ├── public/ │ │ │ │ └── lists/ │ │ │ │ ├── PublicBookmarkGrid.tsx │ │ │ │ └── PublicListHeader.tsx │ │ │ ├── settings/ │ │ │ │ ├── AISettings.tsx │ │ │ │ ├── AddApiKey.tsx │ │ │ │ ├── ApiKeySettings.tsx │ │ │ │ ├── ApiKeySuccess.tsx │ │ │ │ ├── BackupSettings.tsx │ │ │ │ ├── ChangePassword.tsx │ │ │ │ ├── DeleteAccount.tsx │ │ │ │ ├── DeleteApiKey.tsx │ │ │ │ ├── FeedSettings.tsx │ │ │ │ ├── ImportExport.tsx │ │ │ │ ├── ImportSessionCard.tsx │ │ │ │ ├── ImportSessionDetail.tsx │ │ │ │ ├── ImportSessionsSection.tsx │ │ │ │ ├── ReaderSettings.tsx │ │ │ │ ├── RegenerateApiKey.tsx │ │ │ │ ├── SettingsPage.tsx │ │ │ │ ├── SubscriptionSettings.tsx │ │ │ │ ├── UserAvatar.tsx │ │ │ │ ├── UserDetails.tsx │ │ │ │ ├── UserOptions.tsx │ │ │ │ ├── WebhookEventSelector.tsx │ │ │ │ └── WebhookSettings.tsx │ │ │ ├── shared/ │ │ │ │ └── sidebar/ │ │ │ │ ├── MobileSidebar.tsx │ │ │ │ ├── ModileSidebarItem.tsx │ │ │ │ ├── Sidebar.tsx │ │ │ │ ├── SidebarItem.tsx │ │ │ │ ├── SidebarLayout.tsx │ │ │ │ ├── SidebarVersion.tsx │ │ │ │ └── TSidebarItem.ts │ │ │ ├── signin/ │ │ │ │ ├── CredentialsForm.tsx │ │ │ │ ├── ForgotPasswordForm.tsx │ │ │ │ ├── OAuthAutoRedirect.tsx │ │ │ │ ├── ResetPasswordForm.tsx │ │ │ │ ├── SignInForm.tsx │ │ │ │ └── SignInProviderButton.tsx │ │ │ ├── signup/ │ │ │ │ └── SignUpForm.tsx │ │ │ ├── subscription/ │ │ │ │ └── QuotaProgress.tsx │ │ │ ├── theme-provider.tsx │ │ │ ├── ui/ │ │ │ │ ├── action-button.tsx │ │ │ │ ├── action-confirming-dialog.tsx │ │ │ │ ├── alert.tsx │ │ │ │ ├── avatar.tsx │ │ │ │ ├── back-button.tsx │ │ │ │ ├── badge.tsx │ │ │ │ ├── button.tsx │ │ │ │ ├── calendar.tsx │ │ │ │ ├── card.tsx │ │ │ │ ├── collapsible.tsx │ │ │ │ ├── command.tsx │ │ │ │ ├── copy-button.tsx │ │ │ │ ├── dialog.tsx │ │ │ │ ├── dropdown-menu.tsx │ │ │ │ ├── field.tsx │ │ │ │ ├── file-picker-button.tsx │ │ │ │ ├── form.tsx │ │ │ │ ├── full-page-spinner.tsx │ │ │ │ ├── info-tooltip.tsx │ │ │ │ ├── input.tsx │ │ │ │ ├── kbd.tsx │ │ │ │ ├── label.tsx │ │ │ │ ├── markdown/ │ │ │ │ │ ├── markdown-editor.tsx │ │ │ │ │ ├── markdown-readonly.tsx │ │ │ │ │ ├── plugins/ │ │ │ │ │ │ └── toolbar-plugin.tsx │ │ │ │ │ └── theme.ts │ │ │ │ ├── multiple-choice-dialog.tsx │ │ │ │ ├── popover.tsx │ │ │ │ ├── progress.tsx │ │ │ │ ├── radio-group.tsx │ │ │ │ ├── scroll-area.tsx │ │ │ │ ├── select.tsx │ │ │ │ ├── separator.tsx │ │ │ │ ├── skeleton.tsx │ │ │ │ ├── slider.tsx │ │ │ │ ├── sonner.tsx │ │ │ │ ├── spinner.tsx │ │ │ │ ├── switch.tsx │ │ │ │ ├── table.tsx │ │ │ │ ├── tabs.tsx │ │ │ │ ├── textarea.tsx │ │ │ │ ├── toast.tsx │ │ │ │ ├── toggle.tsx │ │ │ │ ├── tooltip.tsx │ │ │ │ └── user-avatar.tsx │ │ │ ├── utils/ │ │ │ │ ├── BookmarkAlreadyExistsToast.tsx │ │ │ │ ├── ValidAccountCheck.tsx │ │ │ │ └── useShowArchived.tsx │ │ │ └── wrapped/ │ │ │ ├── ShareButton.tsx │ │ │ ├── WrappedContent.tsx │ │ │ ├── WrappedModal.tsx │ │ │ └── index.ts │ │ ├── components.json │ │ ├── instrumentation.node.ts │ │ ├── instrumentation.ts │ │ ├── lib/ │ │ │ ├── attachments.tsx │ │ │ ├── auth/ │ │ │ │ └── client.ts │ │ │ ├── bookmark-drag.ts │ │ │ ├── bulkActions.ts │ │ │ ├── bulkTagActions.ts │ │ │ ├── clientConfig.tsx │ │ │ ├── drag-and-drop.ts │ │ │ ├── haptic.ts │ │ │ ├── hooks/ │ │ │ │ ├── bookmark-search.ts │ │ │ │ ├── relative-time.ts │ │ │ │ ├── upload-file.ts │ │ │ │ ├── useBookmarkImport.ts │ │ │ │ ├── useDialogFormReset.ts │ │ │ │ └── useImportSessions.ts │ │ │ ├── i18n/ │ │ │ │ ├── client.ts │ │ │ │ ├── locales/ │ │ │ │ │ ├── ar/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── cs/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── da/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── de/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── el/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── en/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── en_US/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── es/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── fa/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── fi/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── fr/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── ga/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── gl/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── hr/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── hu/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── it/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── ja/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── ko/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── nb_NO/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── nl/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── pl/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── pt/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── pt_BR/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── ru/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── sk/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── sl/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── sv/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── tr/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── uk/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── vi/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ ├── zh/ │ │ │ │ │ │ └── translation.json │ │ │ │ │ └── zhtw/ │ │ │ │ │ └── translation.json │ │ │ │ ├── provider.tsx │ │ │ │ ├── server.ts │ │ │ │ └── settings.ts │ │ │ ├── providers.tsx │ │ │ ├── readerSettings.tsx │ │ │ ├── store/ │ │ │ │ ├── useInBookmarkGridStore.ts │ │ │ │ ├── useInSearchPageStore.ts │ │ │ │ └── useSortOrderStore.ts │ │ │ ├── userLocalSettings/ │ │ │ │ ├── bookmarksLayout.tsx │ │ │ │ ├── types.ts │ │ │ │ └── userLocalSettings.ts │ │ │ ├── userSettings.tsx │ │ │ └── utils.ts │ │ ├── next-env.d.ts │ │ ├── next.config.mjs │ │ ├── package.json │ │ ├── postcss.config.cjs │ │ ├── public/ │ │ │ ├── blur.avif │ │ │ └── manifest.json │ │ ├── server/ │ │ │ ├── api/ │ │ │ │ └── client.ts │ │ │ └── auth.ts │ │ ├── tailwind.config.ts │ │ ├── tsconfig.json │ │ └── vitest.config.ts │ └── workers/ │ ├── .oxlintrc.json │ ├── exit.ts │ ├── index.ts │ ├── metascraper-plugins/ │ │ ├── metascraper-amazon-improved.ts │ │ └── metascraper-reddit.ts │ ├── metrics.ts │ ├── network.ts │ ├── package.json │ ├── scripts/ │ │ └── parseHtmlSubprocess.ts │ ├── server.ts │ ├── trpc.ts │ ├── tsconfig.json │ ├── tsdown.config.ts │ ├── utils.ts │ ├── workerTracing.ts │ ├── workerUtils.ts │ └── workers/ │ ├── adminMaintenance/ │ │ └── tasks/ │ │ ├── migrateLinkHtmlContent.ts │ │ └── tidyAssets.ts │ ├── adminMaintenanceWorker.ts │ ├── assetPreprocessingWorker.ts │ ├── backupWorker.ts │ ├── crawlerWorker.ts │ ├── feedWorker.ts │ ├── importWorker.ts │ ├── inference/ │ │ ├── inferenceWorker.ts │ │ ├── summarize.ts │ │ └── tagging.ts │ ├── ruleEngineWorker.ts │ ├── searchWorker.ts │ ├── utils/ │ │ ├── __fixtures__/ │ │ │ └── twz-feed.xml │ │ ├── feedParser.test.ts │ │ ├── feedParser.ts │ │ ├── fetchBookmarks.ts │ │ └── parseHtmlSubprocessIpc.ts │ ├── videoWorker.ts │ └── webhookWorker.ts ├── charts/ │ └── README.md ├── docker/ │ ├── Dockerfile │ ├── Dockerfile.dev │ ├── docker-compose.build.yml │ ├── docker-compose.dev.yml │ ├── docker-compose.yml │ └── root/ │ └── etc/ │ └── s6-overlay/ │ └── s6-rc.d/ │ ├── init-db-migration/ │ │ ├── run │ │ ├── type │ │ └── up │ ├── svc-web/ │ │ ├── dependencies.d/ │ │ │ └── init-db-migration │ │ ├── run │ │ └── type │ ├── svc-workers/ │ │ ├── dependencies.d/ │ │ │ └── init-db-migration │ │ ├── run │ │ └── type │ └── user/ │ └── contents.d/ │ └── .gitkeep ├── docs/ │ ├── .gitignore │ ├── .oxlintrc.json │ ├── README.md │ ├── babel.config.js │ ├── docs/ │ │ ├── 01-getting-started/ │ │ │ ├── 01-intro.md │ │ │ ├── 02-screenshots.md │ │ │ └── _category_.json │ │ ├── 02-installation/ │ │ │ ├── 01-docker.md │ │ │ ├── 02-unraid.md │ │ │ ├── 03-archlinux.md │ │ │ ├── 04-kubernetes.md │ │ │ ├── 06-debuntu.md │ │ │ ├── 07-minimal-install.md │ │ │ ├── 08-truenas.md │ │ │ ├── 09-cloud-hosting.md │ │ │ ├── 10-pikapods.md │ │ │ └── _category_.json │ │ ├── 03-configuration/ │ │ │ ├── 01-environment-variables.md │ │ │ ├── 02-different-ai-providers.md │ │ │ └── _category_.json │ │ ├── 04-using-karakeep/ │ │ │ ├── _category_.json │ │ │ ├── advanced-workflows.md │ │ │ ├── bookmarking.md │ │ │ ├── import.md │ │ │ ├── lists.md │ │ │ ├── quick-sharing.md │ │ │ ├── search-query-language.md │ │ │ └── tags.md │ │ ├── 05-integrations/ │ │ │ ├── 02-command-line.md │ │ │ ├── 03-mcp.md │ │ │ ├── 05-singlefile.md │ │ │ ├── 06-rss-feeds.md │ │ │ └── _category_.json │ │ ├── 06-administration/ │ │ │ ├── 01-security-considerations.md │ │ │ ├── 02-FAQ.md │ │ │ ├── 03-openai.md │ │ │ ├── 05-troubleshooting.md │ │ │ ├── 06-server-migration.md │ │ │ ├── 07-legacy-container-upgrade.md │ │ │ ├── 08-hoarder-to-karakeep-migration.md │ │ │ └── _category_.json │ │ ├── 07-community/ │ │ │ ├── 01-community-projects.md │ │ │ ├── 02-community-channels.md │ │ │ └── _category_.json │ │ ├── 08-development/ │ │ │ ├── 01-setup.md │ │ │ ├── 02-directories.md │ │ │ ├── 03-database.md │ │ │ ├── 04-architecture.md │ │ │ └── _category_.json │ │ └── api/ │ │ ├── _category_.json │ │ ├── add-bookmark-to-list.api.mdx │ │ ├── admin-update-user.api.mdx │ │ ├── attach-asset-to-bookmark.api.mdx │ │ ├── attach-tags-to-bookmark.api.mdx │ │ ├── check-bookmark-url.api.mdx │ │ ├── create-backup.api.mdx │ │ ├── create-bookmark.api.mdx │ │ ├── create-highlight.api.mdx │ │ ├── create-list.api.mdx │ │ ├── create-tag.api.mdx │ │ ├── delete-backup.api.mdx │ │ ├── delete-bookmark.api.mdx │ │ ├── delete-highlight.api.mdx │ │ ├── delete-list.api.mdx │ │ ├── delete-tag.api.mdx │ │ ├── detach-asset-from-bookmark.api.mdx │ │ ├── detach-tags-from-bookmark.api.mdx │ │ ├── download-backup.api.mdx │ │ ├── get-asset.api.mdx │ │ ├── get-backup.api.mdx │ │ ├── get-bookmark-highlights.api.mdx │ │ ├── get-bookmark-lists.api.mdx │ │ ├── get-bookmark.api.mdx │ │ ├── get-current-user-stats.api.mdx │ │ ├── get-current-user.api.mdx │ │ ├── get-highlight.api.mdx │ │ ├── get-list-bookmarks.api.mdx │ │ ├── get-list.api.mdx │ │ ├── get-tag-bookmarks.api.mdx │ │ ├── get-tag.api.mdx │ │ ├── karakeep-api.info.mdx │ │ ├── list-backups.api.mdx │ │ ├── list-bookmarks.api.mdx │ │ ├── list-highlights.api.mdx │ │ ├── list-lists.api.mdx │ │ ├── list-tags.api.mdx │ │ ├── remove-bookmark-from-list.api.mdx │ │ ├── replace-asset-on-bookmark.api.mdx │ │ ├── search-bookmarks.api.mdx │ │ ├── sidebar.ts │ │ ├── summarize-bookmark.api.mdx │ │ ├── update-bookmark.api.mdx │ │ ├── update-highlight.api.mdx │ │ ├── update-list.api.mdx │ │ ├── update-tag.api.mdx │ │ └── upload-asset.api.mdx │ ├── docusaurus.config.ts │ ├── package.json │ ├── sidebars.ts │ ├── src/ │ │ ├── css/ │ │ │ └── custom.css │ │ └── theme/ │ │ └── DocSidebarItem/ │ │ └── Category/ │ │ └── index.tsx │ ├── static/ │ │ ├── .nojekyll │ │ ├── _redirects │ │ └── robots.txt │ ├── tsconfig.json │ ├── versioned_docs/ │ │ ├── version-v0.28.0/ │ │ │ ├── 01-intro.md │ │ │ ├── 02-installation/ │ │ │ │ ├── 01-docker.md │ │ │ │ ├── 02-unraid.md │ │ │ │ ├── 03-archlinux.md │ │ │ │ ├── 04-kubernetes.md │ │ │ │ ├── 05-pikapods.md │ │ │ │ ├── 06-debuntu.md │ │ │ │ ├── 07-minimal-install.md │ │ │ │ ├── 08-truenas.md │ │ │ │ └── _category_.json │ │ │ ├── 03-configuration.md │ │ │ ├── 04-screenshots.md │ │ │ ├── 05-quick-sharing.md │ │ │ ├── 06-openai.md │ │ │ ├── 07-development/ │ │ │ │ ├── 01-setup.md │ │ │ │ ├── 02-directories.md │ │ │ │ ├── 03-database.md │ │ │ │ ├── 04-architecture.md │ │ │ │ └── _category_.json │ │ │ ├── 08-security-considerations.md │ │ │ ├── 09-command-line.md │ │ │ ├── 09-mcp.md │ │ │ ├── 10-import.md │ │ │ ├── 11-FAQ.md │ │ │ ├── 12-troubleshooting.md │ │ │ ├── 13-community-projects.md │ │ │ ├── 14-guides/ │ │ │ │ ├── 01-legacy-container-upgrade.md │ │ │ │ ├── 02-search-query-language.md │ │ │ │ ├── 03-singlefile.md │ │ │ │ ├── 04-hoarder-to-karakeep-migration.md │ │ │ │ ├── 05-different-ai-providers.md │ │ │ │ ├── 06-server-migration.md │ │ │ │ └── _category_.json │ │ │ └── api/ │ │ │ ├── _category_.json │ │ │ ├── add-a-bookmark-to-a-list.api.mdx │ │ │ ├── attach-asset.api.mdx │ │ │ ├── attach-tags-to-a-bookmark.api.mdx │ │ │ ├── create-a-new-bookmark.api.mdx │ │ │ ├── create-a-new-highlight.api.mdx │ │ │ ├── create-a-new-list.api.mdx │ │ │ ├── create-a-new-tag.api.mdx │ │ │ ├── delete-a-bookmark.api.mdx │ │ │ ├── delete-a-highlight.api.mdx │ │ │ ├── delete-a-list.api.mdx │ │ │ ├── delete-a-tag.api.mdx │ │ │ ├── detach-asset.api.mdx │ │ │ ├── detach-tags-from-a-bookmark.api.mdx │ │ │ ├── get-a-single-asset.api.mdx │ │ │ ├── get-a-single-bookmark.api.mdx │ │ │ ├── get-a-single-highlight.api.mdx │ │ │ ├── get-a-single-list.api.mdx │ │ │ ├── get-a-single-tag.api.mdx │ │ │ ├── get-all-bookmarks.api.mdx │ │ │ ├── get-all-highlights.api.mdx │ │ │ ├── get-all-lists.api.mdx │ │ │ ├── get-all-tags.api.mdx │ │ │ ├── get-bookmarks-in-the-list.api.mdx │ │ │ ├── get-bookmarks-with-the-tag.api.mdx │ │ │ ├── get-current-user-info.api.mdx │ │ │ ├── get-current-user-stats.api.mdx │ │ │ ├── get-highlights-of-a-bookmark.api.mdx │ │ │ ├── get-lists-of-a-bookmark.api.mdx │ │ │ ├── karakeep-api.info.mdx │ │ │ ├── remove-a-bookmark-from-a-list.api.mdx │ │ │ ├── replace-asset.api.mdx │ │ │ ├── search-bookmarks.api.mdx │ │ │ ├── sidebar.ts │ │ │ ├── summarize-a-bookmark.api.mdx │ │ │ ├── update-a-bookmark.api.mdx │ │ │ ├── update-a-highlight.api.mdx │ │ │ ├── update-a-list.api.mdx │ │ │ ├── update-a-tag.api.mdx │ │ │ ├── update-user.api.mdx │ │ │ └── upload-a-new-asset.api.mdx │ │ ├── version-v0.29.0/ │ │ │ ├── 01-intro.md │ │ │ ├── 02-installation/ │ │ │ │ ├── 01-docker.md │ │ │ │ ├── 02-unraid.md │ │ │ │ ├── 03-archlinux.md │ │ │ │ ├── 04-kubernetes.md │ │ │ │ ├── 05-pikapods.md │ │ │ │ ├── 06-debuntu.md │ │ │ │ ├── 07-minimal-install.md │ │ │ │ ├── 08-truenas.md │ │ │ │ └── _category_.json │ │ │ ├── 03-configuration.md │ │ │ ├── 04-screenshots.md │ │ │ ├── 05-quick-sharing.md │ │ │ ├── 06-openai.md │ │ │ ├── 07-development/ │ │ │ │ ├── 01-setup.md │ │ │ │ ├── 02-directories.md │ │ │ │ ├── 03-database.md │ │ │ │ ├── 04-architecture.md │ │ │ │ └── _category_.json │ │ │ ├── 08-security-considerations.md │ │ │ ├── 09-command-line.md │ │ │ ├── 09-mcp.md │ │ │ ├── 10-import.md │ │ │ ├── 11-FAQ.md │ │ │ ├── 12-troubleshooting.md │ │ │ ├── 13-community-projects.md │ │ │ ├── 14-guides/ │ │ │ │ ├── 01-legacy-container-upgrade.md │ │ │ │ ├── 02-search-query-language.md │ │ │ │ ├── 03-singlefile.md │ │ │ │ ├── 04-hoarder-to-karakeep-migration.md │ │ │ │ ├── 05-different-ai-providers.md │ │ │ │ ├── 06-server-migration.md │ │ │ │ └── _category_.json │ │ │ └── api/ │ │ │ ├── _category_.json │ │ │ ├── add-a-bookmark-to-a-list.api.mdx │ │ │ ├── attach-asset.api.mdx │ │ │ ├── attach-tags-to-a-bookmark.api.mdx │ │ │ ├── create-a-new-bookmark.api.mdx │ │ │ ├── create-a-new-highlight.api.mdx │ │ │ ├── create-a-new-list.api.mdx │ │ │ ├── create-a-new-tag.api.mdx │ │ │ ├── delete-a-backup.api.mdx │ │ │ ├── delete-a-bookmark.api.mdx │ │ │ ├── delete-a-highlight.api.mdx │ │ │ ├── delete-a-list.api.mdx │ │ │ ├── delete-a-tag.api.mdx │ │ │ ├── detach-asset.api.mdx │ │ │ ├── detach-tags-from-a-bookmark.api.mdx │ │ │ ├── download-a-backup.api.mdx │ │ │ ├── get-a-single-asset.api.mdx │ │ │ ├── get-a-single-backup.api.mdx │ │ │ ├── get-a-single-bookmark.api.mdx │ │ │ ├── get-a-single-highlight.api.mdx │ │ │ ├── get-a-single-list.api.mdx │ │ │ ├── get-a-single-tag.api.mdx │ │ │ ├── get-all-backups.api.mdx │ │ │ ├── get-all-bookmarks.api.mdx │ │ │ ├── get-all-highlights.api.mdx │ │ │ ├── get-all-lists.api.mdx │ │ │ ├── get-all-tags.api.mdx │ │ │ ├── get-bookmarks-in-the-list.api.mdx │ │ │ ├── get-bookmarks-with-the-tag.api.mdx │ │ │ ├── get-current-user-info.api.mdx │ │ │ ├── get-current-user-stats.api.mdx │ │ │ ├── get-highlights-of-a-bookmark.api.mdx │ │ │ ├── get-lists-of-a-bookmark.api.mdx │ │ │ ├── karakeep-api.info.mdx │ │ │ ├── remove-a-bookmark-from-a-list.api.mdx │ │ │ ├── replace-asset.api.mdx │ │ │ ├── search-bookmarks.api.mdx │ │ │ ├── sidebar.ts │ │ │ ├── summarize-a-bookmark.api.mdx │ │ │ ├── trigger-a-new-backup.api.mdx │ │ │ ├── update-a-bookmark.api.mdx │ │ │ ├── update-a-highlight.api.mdx │ │ │ ├── update-a-list.api.mdx │ │ │ ├── update-a-tag.api.mdx │ │ │ ├── update-user.api.mdx │ │ │ └── upload-a-new-asset.api.mdx │ │ ├── version-v0.30.0/ │ │ │ ├── 01-getting-started/ │ │ │ │ ├── 01-intro.md │ │ │ │ ├── 02-screenshots.md │ │ │ │ └── _category_.json │ │ │ ├── 02-installation/ │ │ │ │ ├── 01-docker.md │ │ │ │ ├── 02-unraid.md │ │ │ │ ├── 03-archlinux.md │ │ │ │ ├── 04-kubernetes.md │ │ │ │ ├── 06-debuntu.md │ │ │ │ ├── 07-minimal-install.md │ │ │ │ ├── 08-truenas.md │ │ │ │ ├── 09-cloud-hosting.md │ │ │ │ ├── 10-pikapods.md │ │ │ │ └── _category_.json │ │ │ ├── 03-configuration/ │ │ │ │ ├── 01-environment-variables.md │ │ │ │ ├── 02-different-ai-providers.md │ │ │ │ └── _category_.json │ │ │ ├── 04-using-karakeep/ │ │ │ │ ├── _category_.json │ │ │ │ ├── advanced-workflows.md │ │ │ │ ├── bookmarking.md │ │ │ │ ├── import.md │ │ │ │ ├── lists.md │ │ │ │ ├── quick-sharing.md │ │ │ │ ├── search-query-language.md │ │ │ │ └── tags.md │ │ │ ├── 05-integrations/ │ │ │ │ ├── 02-command-line.md │ │ │ │ ├── 03-mcp.md │ │ │ │ ├── 05-singlefile.md │ │ │ │ ├── 06-rss-feeds.md │ │ │ │ └── _category_.json │ │ │ ├── 06-administration/ │ │ │ │ ├── 01-security-considerations.md │ │ │ │ ├── 02-FAQ.md │ │ │ │ ├── 03-openai.md │ │ │ │ ├── 05-troubleshooting.md │ │ │ │ ├── 06-server-migration.md │ │ │ │ ├── 07-legacy-container-upgrade.md │ │ │ │ ├── 08-hoarder-to-karakeep-migration.md │ │ │ │ └── _category_.json │ │ │ ├── 07-community/ │ │ │ │ ├── 01-community-projects.md │ │ │ │ ├── 02-community-channels.md │ │ │ │ └── _category_.json │ │ │ ├── 08-development/ │ │ │ │ ├── 01-setup.md │ │ │ │ ├── 02-directories.md │ │ │ │ ├── 03-database.md │ │ │ │ ├── 04-architecture.md │ │ │ │ └── _category_.json │ │ │ └── api/ │ │ │ ├── _category_.json │ │ │ ├── add-a-bookmark-to-a-list.api.mdx │ │ │ ├── attach-asset.api.mdx │ │ │ ├── attach-tags-to-a-bookmark.api.mdx │ │ │ ├── create-a-new-bookmark.api.mdx │ │ │ ├── create-a-new-highlight.api.mdx │ │ │ ├── create-a-new-list.api.mdx │ │ │ ├── create-a-new-tag.api.mdx │ │ │ ├── delete-a-backup.api.mdx │ │ │ ├── delete-a-bookmark.api.mdx │ │ │ ├── delete-a-highlight.api.mdx │ │ │ ├── delete-a-list.api.mdx │ │ │ ├── delete-a-tag.api.mdx │ │ │ ├── detach-asset.api.mdx │ │ │ ├── detach-tags-from-a-bookmark.api.mdx │ │ │ ├── download-a-backup.api.mdx │ │ │ ├── get-a-single-asset.api.mdx │ │ │ ├── get-a-single-backup.api.mdx │ │ │ ├── get-a-single-bookmark.api.mdx │ │ │ ├── get-a-single-highlight.api.mdx │ │ │ ├── get-a-single-list.api.mdx │ │ │ ├── get-a-single-tag.api.mdx │ │ │ ├── get-all-backups.api.mdx │ │ │ ├── get-all-bookmarks.api.mdx │ │ │ ├── get-all-highlights.api.mdx │ │ │ ├── get-all-lists.api.mdx │ │ │ ├── get-all-tags.api.mdx │ │ │ ├── get-bookmarks-in-the-list.api.mdx │ │ │ ├── get-bookmarks-with-the-tag.api.mdx │ │ │ ├── get-current-user-info.api.mdx │ │ │ ├── get-current-user-stats.api.mdx │ │ │ ├── get-highlights-of-a-bookmark.api.mdx │ │ │ ├── get-lists-of-a-bookmark.api.mdx │ │ │ ├── karakeep-api.info.mdx │ │ │ ├── remove-a-bookmark-from-a-list.api.mdx │ │ │ ├── replace-asset.api.mdx │ │ │ ├── search-bookmarks.api.mdx │ │ │ ├── sidebar.ts │ │ │ ├── summarize-a-bookmark.api.mdx │ │ │ ├── trigger-a-new-backup.api.mdx │ │ │ ├── update-a-bookmark.api.mdx │ │ │ ├── update-a-highlight.api.mdx │ │ │ ├── update-a-list.api.mdx │ │ │ ├── update-a-tag.api.mdx │ │ │ ├── update-user.api.mdx │ │ │ └── upload-a-new-asset.api.mdx │ │ └── version-v0.31.0/ │ │ ├── 01-getting-started/ │ │ │ ├── 01-intro.md │ │ │ ├── 02-screenshots.md │ │ │ └── _category_.json │ │ ├── 02-installation/ │ │ │ ├── 01-docker.md │ │ │ ├── 02-unraid.md │ │ │ ├── 03-archlinux.md │ │ │ ├── 04-kubernetes.md │ │ │ ├── 06-debuntu.md │ │ │ ├── 07-minimal-install.md │ │ │ ├── 08-truenas.md │ │ │ ├── 09-cloud-hosting.md │ │ │ ├── 10-pikapods.md │ │ │ └── _category_.json │ │ ├── 03-configuration/ │ │ │ ├── 01-environment-variables.md │ │ │ ├── 02-different-ai-providers.md │ │ │ └── _category_.json │ │ ├── 04-using-karakeep/ │ │ │ ├── _category_.json │ │ │ ├── advanced-workflows.md │ │ │ ├── bookmarking.md │ │ │ ├── import.md │ │ │ ├── lists.md │ │ │ ├── quick-sharing.md │ │ │ ├── search-query-language.md │ │ │ └── tags.md │ │ ├── 05-integrations/ │ │ │ ├── 02-command-line.md │ │ │ ├── 03-mcp.md │ │ │ ├── 05-singlefile.md │ │ │ ├── 06-rss-feeds.md │ │ │ └── _category_.json │ │ ├── 06-administration/ │ │ │ ├── 01-security-considerations.md │ │ │ ├── 02-FAQ.md │ │ │ ├── 03-openai.md │ │ │ ├── 05-troubleshooting.md │ │ │ ├── 06-server-migration.md │ │ │ ├── 07-legacy-container-upgrade.md │ │ │ ├── 08-hoarder-to-karakeep-migration.md │ │ │ └── _category_.json │ │ ├── 07-community/ │ │ │ ├── 01-community-projects.md │ │ │ ├── 02-community-channels.md │ │ │ └── _category_.json │ │ ├── 08-development/ │ │ │ ├── 01-setup.md │ │ │ ├── 02-directories.md │ │ │ ├── 03-database.md │ │ │ ├── 04-architecture.md │ │ │ └── _category_.json │ │ └── api/ │ │ ├── _category_.json │ │ ├── add-bookmark-to-list.api.mdx │ │ ├── admin-update-user.api.mdx │ │ ├── attach-asset-to-bookmark.api.mdx │ │ ├── attach-tags-to-bookmark.api.mdx │ │ ├── check-bookmark-url.api.mdx │ │ ├── create-backup.api.mdx │ │ ├── create-bookmark.api.mdx │ │ ├── create-highlight.api.mdx │ │ ├── create-list.api.mdx │ │ ├── create-tag.api.mdx │ │ ├── delete-backup.api.mdx │ │ ├── delete-bookmark.api.mdx │ │ ├── delete-highlight.api.mdx │ │ ├── delete-list.api.mdx │ │ ├── delete-tag.api.mdx │ │ ├── detach-asset-from-bookmark.api.mdx │ │ ├── detach-tags-from-bookmark.api.mdx │ │ ├── download-backup.api.mdx │ │ ├── get-asset.api.mdx │ │ ├── get-backup.api.mdx │ │ ├── get-bookmark-highlights.api.mdx │ │ ├── get-bookmark-lists.api.mdx │ │ ├── get-bookmark.api.mdx │ │ ├── get-current-user-stats.api.mdx │ │ ├── get-current-user.api.mdx │ │ ├── get-highlight.api.mdx │ │ ├── get-list-bookmarks.api.mdx │ │ ├── get-list.api.mdx │ │ ├── get-tag-bookmarks.api.mdx │ │ ├── get-tag.api.mdx │ │ ├── karakeep-api.info.mdx │ │ ├── list-backups.api.mdx │ │ ├── list-bookmarks.api.mdx │ │ ├── list-highlights.api.mdx │ │ ├── list-lists.api.mdx │ │ ├── list-tags.api.mdx │ │ ├── remove-bookmark-from-list.api.mdx │ │ ├── replace-asset-on-bookmark.api.mdx │ │ ├── search-bookmarks.api.mdx │ │ ├── sidebar.ts │ │ ├── summarize-bookmark.api.mdx │ │ ├── update-bookmark.api.mdx │ │ ├── update-highlight.api.mdx │ │ ├── update-list.api.mdx │ │ ├── update-tag.api.mdx │ │ └── upload-asset.api.mdx │ ├── versioned_sidebars/ │ │ ├── version-v0.28.0-sidebars.json │ │ ├── version-v0.29.0-sidebars.json │ │ ├── version-v0.30.0-sidebars.json │ │ └── version-v0.31.0-sidebars.json │ └── versions.json ├── karakeep-linux.sh ├── kubernetes/ │ ├── .env_sample │ ├── .gitignore │ ├── .secrets_sample │ ├── Makefile │ ├── README.md │ ├── chrome-deployment.yaml │ ├── chrome-service.yaml │ ├── data-pvc.yaml │ ├── ingress_sample.yaml │ ├── kustomization.yaml │ ├── meilisearch-deployment.yaml │ ├── meilisearch-pvc.yaml │ ├── meilisearch-service.yaml │ ├── namespace.yaml │ ├── web-deployment.yaml │ └── web-service.yaml ├── package.json ├── packages/ │ ├── api/ │ │ ├── .oxlintrc.json │ │ ├── index.ts │ │ ├── middlewares/ │ │ │ ├── auth.ts │ │ │ └── trpcAdapter.ts │ │ ├── package.json │ │ ├── routes/ │ │ │ ├── admin.ts │ │ │ ├── assets.ts │ │ │ ├── backups.ts │ │ │ ├── bookmarks.ts │ │ │ ├── health.ts │ │ │ ├── highlights.ts │ │ │ ├── lists.ts │ │ │ ├── metrics.ts │ │ │ ├── public/ │ │ │ │ └── assets.ts │ │ │ ├── public.ts │ │ │ ├── rss.ts │ │ │ ├── tags.ts │ │ │ ├── trpc.ts │ │ │ ├── users.ts │ │ │ ├── version.ts │ │ │ └── webhooks.ts │ │ ├── tsconfig.json │ │ └── utils/ │ │ ├── assets.ts │ │ ├── pagination.ts │ │ ├── rss.ts │ │ ├── types.ts │ │ └── upload.ts │ ├── benchmarks/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── docker-compose.yml │ │ ├── package.json │ │ ├── setup/ │ │ │ └── html/ │ │ │ └── hello.html │ │ ├── src/ │ │ │ ├── benchmarks.ts │ │ │ ├── index.ts │ │ │ ├── log.ts │ │ │ ├── seed.ts │ │ │ ├── startContainers.ts │ │ │ ├── trpc.ts │ │ │ └── utils.ts │ │ └── tsconfig.json │ ├── db/ │ │ ├── .oxlintrc.json │ │ ├── drizzle/ │ │ │ ├── 0000_luxuriant_johnny_blaze.sql │ │ │ ├── 0001_dapper_trauma.sql │ │ │ ├── 0002_worried_beyonder.sql │ │ │ ├── 0003_parallel_supernaut.sql │ │ │ ├── 0004_skinny_vengeance.sql │ │ │ ├── 0005_quiet_gunslinger.sql │ │ │ ├── 0006_funny_mac_gargan.sql │ │ │ ├── 0007_messy_raza.sql │ │ │ ├── 0008_cloudy_skin.sql │ │ │ ├── 0009_cuddly_cammi.sql │ │ │ ├── 0010_curved_sharon_ventura.sql │ │ │ ├── 0011_ordinary_phalanx.sql │ │ │ ├── 0012_noisy_grim_reaper.sql │ │ │ ├── 0013_square_lady_ursula.sql │ │ │ ├── 0014_lonely_thaddeus_ross.sql │ │ │ ├── 0015_first_reavers.sql │ │ │ ├── 0016_shallow_rawhide_kid.sql │ │ │ ├── 0017_slippery_senator_kelly.sql │ │ │ ├── 0018_bright_infant_terrible.sql │ │ │ ├── 0019_many_vertigo.sql │ │ │ ├── 0020_sudden_dagger.sql │ │ │ ├── 0021_magical_firebrand.sql │ │ │ ├── 0022_tough_nextwave.sql │ │ │ ├── 0023_late_night_nurse.sql │ │ │ ├── 0024_premium_hammerhead.sql │ │ │ ├── 0025_aspiring_skaar.sql │ │ │ ├── 0026_silky_imperial_guard.sql │ │ │ ├── 0027_cute_talon.sql │ │ │ ├── 0028_melodic_norrin_radd.sql │ │ │ ├── 0029_short_gunslinger.sql │ │ │ ├── 0030_blue_synch.sql │ │ │ ├── 0031_yummy_famine.sql │ │ │ ├── 0032_futuristic_shiva.sql │ │ │ ├── 0033_nappy_molten_man.sql │ │ │ ├── 0034_wet_the_stranger.sql │ │ │ ├── 0035_gorgeous_may_parker.sql │ │ │ ├── 0036_luxuriant_white_queen.sql │ │ │ ├── 0037_daily_smiling_tiger.sql │ │ │ ├── 0038_calm_clint_barton.sql │ │ │ ├── 0039_purple_albert_cleary.sql │ │ │ ├── 0040_long_mindworm.sql │ │ │ ├── 0041_fat_bloodstrike.sql │ │ │ ├── 0042_square_gamma_corps.sql │ │ │ ├── 0043_puzzling_blonde_phantom.sql │ │ │ ├── 0044_add_password_salt.sql │ │ │ ├── 0045_add_rule_engine.sql │ │ │ ├── 0046_add_rss_feed_enabled_col.sql │ │ │ ├── 0047_add_summarization_status.sql │ │ │ ├── 0048_add_user_settings.sql │ │ │ ├── 0049_add_rss_token.sql │ │ │ ├── 0050_add_user_settings_archive_display_behaviour.sql │ │ │ ├── 0051_public_lists.sql │ │ │ ├── 0052_add_bookmark_quota.sql │ │ │ ├── 0053_storage_quota.sql │ │ │ ├── 0054_add_timezone.sql │ │ │ ├── 0055_content_asset_id.sql │ │ │ ├── 0056_user_invites.sql │ │ │ ├── 0057_salty_carmella_unuscione.sql │ │ │ ├── 0058_add_subscription.sql │ │ │ ├── 0059_browserless_user_setting.sql │ │ │ ├── 0060_drop_invite_expire_at.sql │ │ │ ├── 0061_merge_user_settings.sql │ │ │ ├── 0062_add_import_session.sql │ │ │ ├── 0063_add_bookmark_source.sql │ │ │ ├── 0064_add_import_tags_to_feeds.sql │ │ │ ├── 0065_collaborative_lists.sql │ │ │ ├── 0066_collaborative_lists_invites.sql │ │ │ ├── 0067_add_backups_table.sql │ │ │ ├── 0068_optimize_bookmark_indicies.sql │ │ │ ├── 0069_fix_pending_summarization.sql │ │ │ ├── 0070_add_reader_settings.sql │ │ │ ├── 0071_add_normalized_tag_name.sql │ │ │ ├── 0072_add_user_ai_preferences.sql │ │ │ ├── 0073_ai_tag_style.sql │ │ │ ├── 0074_reset_tagging_summarization.sql │ │ │ ├── 0075_change_default_tag_style.sql │ │ │ ├── 0076_add_api_key_last_used_tracking.sql │ │ │ ├── 0077_import_listpaths_to_listids.sql │ │ │ ├── 0078_add_import_session_indexes.sql │ │ │ ├── 0079_add_tag_granularity_settings.sql │ │ │ ├── 0080_user_reading_progress.sql │ │ │ └── meta/ │ │ │ ├── 0000_snapshot.json │ │ │ ├── 0001_snapshot.json │ │ │ ├── 0002_snapshot.json │ │ │ ├── 0003_snapshot.json │ │ │ ├── 0004_snapshot.json │ │ │ ├── 0005_snapshot.json │ │ │ ├── 0006_snapshot.json │ │ │ ├── 0007_snapshot.json │ │ │ ├── 0008_snapshot.json │ │ │ ├── 0009_snapshot.json │ │ │ ├── 0010_snapshot.json │ │ │ ├── 0011_snapshot.json │ │ │ ├── 0012_snapshot.json │ │ │ ├── 0013_snapshot.json │ │ │ ├── 0014_snapshot.json │ │ │ ├── 0015_snapshot.json │ │ │ ├── 0016_snapshot.json │ │ │ ├── 0017_snapshot.json │ │ │ ├── 0018_snapshot.json │ │ │ ├── 0019_snapshot.json │ │ │ ├── 0020_snapshot.json │ │ │ ├── 0021_snapshot.json │ │ │ ├── 0022_snapshot.json │ │ │ ├── 0023_snapshot.json │ │ │ ├── 0024_snapshot.json │ │ │ ├── 0025_snapshot.json │ │ │ ├── 0026_snapshot.json │ │ │ ├── 0027_snapshot.json │ │ │ ├── 0028_snapshot.json │ │ │ ├── 0029_snapshot.json │ │ │ ├── 0030_snapshot.json │ │ │ ├── 0031_snapshot.json │ │ │ ├── 0032_snapshot.json │ │ │ ├── 0033_snapshot.json │ │ │ ├── 0034_snapshot.json │ │ │ ├── 0035_snapshot.json │ │ │ ├── 0036_snapshot.json │ │ │ ├── 0037_snapshot.json │ │ │ ├── 0038_snapshot.json │ │ │ ├── 0039_snapshot.json │ │ │ ├── 0040_snapshot.json │ │ │ ├── 0041_snapshot.json │ │ │ ├── 0042_snapshot.json │ │ │ ├── 0043_snapshot.json │ │ │ ├── 0044_snapshot.json │ │ │ ├── 0045_snapshot.json │ │ │ ├── 0046_snapshot.json │ │ │ ├── 0047_snapshot.json │ │ │ ├── 0048_snapshot.json │ │ │ ├── 0049_snapshot.json │ │ │ ├── 0050_snapshot.json │ │ │ ├── 0051_snapshot.json │ │ │ ├── 0052_snapshot.json │ │ │ ├── 0053_snapshot.json │ │ │ ├── 0054_snapshot.json │ │ │ ├── 0055_snapshot.json │ │ │ ├── 0056_snapshot.json │ │ │ ├── 0057_snapshot.json │ │ │ ├── 0058_snapshot.json │ │ │ ├── 0059_snapshot.json │ │ │ ├── 0060_snapshot.json │ │ │ ├── 0061_snapshot.json │ │ │ ├── 0062_snapshot.json │ │ │ ├── 0063_snapshot.json │ │ │ ├── 0064_snapshot.json │ │ │ ├── 0065_snapshot.json │ │ │ ├── 0066_snapshot.json │ │ │ ├── 0067_snapshot.json │ │ │ ├── 0068_snapshot.json │ │ │ ├── 0069_snapshot.json │ │ │ ├── 0070_snapshot.json │ │ │ ├── 0071_snapshot.json │ │ │ ├── 0072_snapshot.json │ │ │ ├── 0073_snapshot.json │ │ │ ├── 0074_snapshot.json │ │ │ ├── 0075_snapshot.json │ │ │ ├── 0076_snapshot.json │ │ │ ├── 0077_snapshot.json │ │ │ ├── 0078_snapshot.json │ │ │ ├── 0079_snapshot.json │ │ │ ├── 0080_snapshot.json │ │ │ └── _journal.json │ │ ├── drizzle.config.ts │ │ ├── drizzle.ts │ │ ├── index.ts │ │ ├── instrumentation.ts │ │ ├── migrate.ts │ │ ├── package.json │ │ ├── schema.ts │ │ └── tsconfig.json │ ├── e2e_tests/ │ │ ├── .gitignore │ │ ├── .oxlintrc.json │ │ ├── docker-compose.yml │ │ ├── package.json │ │ ├── setup/ │ │ │ ├── html/ │ │ │ │ ├── feed.xml │ │ │ │ └── hello.html │ │ │ ├── seed.ts │ │ │ └── startContainers.ts │ │ ├── tests/ │ │ │ ├── api/ │ │ │ │ ├── assets.test.ts │ │ │ │ ├── backups.test.ts │ │ │ │ ├── bookmarks.test.ts │ │ │ │ ├── highlights.test.ts │ │ │ │ ├── lists.test.ts │ │ │ │ ├── public.test.ts │ │ │ │ ├── rss.test.ts │ │ │ │ ├── tags.test.ts │ │ │ │ └── users.test.ts │ │ │ ├── assetdb/ │ │ │ │ ├── assetdb-utils.ts │ │ │ │ ├── interface-compliance.test.ts │ │ │ │ ├── local-filesystem-store.test.ts │ │ │ │ └── s3-store.test.ts │ │ │ └── workers/ │ │ │ ├── crawler.test.ts │ │ │ ├── feed.test.ts │ │ │ └── import.test.ts │ │ ├── tsconfig.json │ │ ├── utils/ │ │ │ ├── api.ts │ │ │ ├── assets.ts │ │ │ ├── general.ts │ │ │ └── trpc.ts │ │ └── vitest.config.ts │ ├── open-api/ │ │ ├── .oxlintrc.json │ │ ├── index.ts │ │ ├── karakeep-openapi-spec.json │ │ ├── lib/ │ │ │ ├── admin.ts │ │ │ ├── assets.ts │ │ │ ├── backups.ts │ │ │ ├── bookmarks.ts │ │ │ ├── common.ts │ │ │ ├── errors.ts │ │ │ ├── highlights.ts │ │ │ ├── lists.ts │ │ │ ├── pagination.ts │ │ │ ├── tags.ts │ │ │ ├── types.ts │ │ │ └── users.ts │ │ ├── package.json │ │ └── tsconfig.json │ ├── plugins/ │ │ ├── .oxlintrc.json │ │ ├── package.json │ │ ├── queue-liteque/ │ │ │ ├── index.ts │ │ │ └── src/ │ │ │ └── index.ts │ │ ├── queue-restate/ │ │ │ ├── index.ts │ │ │ └── src/ │ │ │ ├── admin.ts │ │ │ ├── dispatcher.ts │ │ │ ├── env.ts │ │ │ ├── idProvider.ts │ │ │ ├── index.ts │ │ │ ├── runner.ts │ │ │ ├── semaphore.ts │ │ │ ├── service.ts │ │ │ ├── tests/ │ │ │ │ ├── docker-compose.yml │ │ │ │ ├── queue.test.ts │ │ │ │ ├── setup/ │ │ │ │ │ └── startContainers.ts │ │ │ │ └── utils.ts │ │ │ └── types.ts │ │ ├── ratelimit-memory/ │ │ │ ├── index.ts │ │ │ └── src/ │ │ │ ├── index.test.ts │ │ │ └── index.ts │ │ ├── ratelimit-redis/ │ │ │ ├── index.ts │ │ │ └── src/ │ │ │ ├── index.ts │ │ │ └── tests/ │ │ │ ├── docker-compose.yml │ │ │ ├── ratelimit-redis.test.ts │ │ │ ├── setup/ │ │ │ │ └── startContainers.ts │ │ │ └── utils.ts │ │ ├── search-meilisearch/ │ │ │ ├── index.ts │ │ │ └── src/ │ │ │ ├── env.ts │ │ │ └── index.ts │ │ ├── tsconfig.json │ │ └── vitest.config.ts │ ├── sdk/ │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .oxlintrc.json │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.ts │ │ │ └── karakeep-api.d.ts │ │ ├── tsconfig.json │ │ └── vite.config.mts │ ├── shared/ │ │ ├── .oxlintrc.json │ │ ├── assetdb.ts │ │ ├── concurrency.test.ts │ │ ├── concurrency.ts │ │ ├── config.ts │ │ ├── customFetch.ts │ │ ├── debug.ts │ │ ├── import-export/ │ │ │ ├── exporters.ts │ │ │ ├── fixtures/ │ │ │ │ └── linkwarden-export.json │ │ │ ├── importer.test.ts │ │ │ ├── importer.ts │ │ │ ├── index.ts │ │ │ ├── parsers.test.ts │ │ │ └── parsers.ts │ │ ├── index.ts │ │ ├── inference.ts │ │ ├── langs.ts │ │ ├── logger.ts │ │ ├── package.json │ │ ├── plugins.ts │ │ ├── prompts.server.ts │ │ ├── prompts.ts │ │ ├── queueing.ts │ │ ├── ratelimiting.ts │ │ ├── search.ts │ │ ├── searchQueryParser.test.ts │ │ ├── searchQueryParser.ts │ │ ├── signedTokens.test.ts │ │ ├── signedTokens.ts │ │ ├── storageQuota.ts │ │ ├── trpc.ts │ │ ├── tryCatch.ts │ │ ├── tsconfig.json │ │ ├── types/ │ │ │ ├── admin.ts │ │ │ ├── assets.ts │ │ │ ├── backups.ts │ │ │ ├── bookmarks.ts │ │ │ ├── config.ts │ │ │ ├── feeds.ts │ │ │ ├── highlights.ts │ │ │ ├── importSessions.ts │ │ │ ├── lists.ts │ │ │ ├── pagination.ts │ │ │ ├── prompts.ts │ │ │ ├── readers.ts │ │ │ ├── rules.ts │ │ │ ├── search.ts │ │ │ ├── tags.ts │ │ │ ├── uploads.ts │ │ │ ├── users.ts │ │ │ └── webhooks.ts │ │ ├── utils/ │ │ │ ├── assetUtils.ts │ │ │ ├── bookmarkUtils.ts │ │ │ ├── htmlUtils.ts │ │ │ ├── listUtils.ts │ │ │ ├── reading-progress-dom.test.ts │ │ │ ├── reading-progress-dom.ts │ │ │ ├── redirectUrl.test.ts │ │ │ ├── redirectUrl.ts │ │ │ ├── relativeDateUtils.ts │ │ │ ├── switch.ts │ │ │ └── tag.ts │ │ └── vitest.config.ts │ ├── shared-react/ │ │ ├── .oxlintrc.json │ │ ├── components/ │ │ │ ├── BookmarkHtmlHighlighter.tsx │ │ │ ├── ScrollProgressTracker.tsx │ │ │ ├── highlights.ts │ │ │ └── ui/ │ │ │ ├── button.tsx │ │ │ ├── popover.tsx │ │ │ └── textarea.tsx │ │ ├── hooks/ │ │ │ ├── assets.ts │ │ │ ├── bookmark-grid-context.tsx │ │ │ ├── bookmark-list-context.tsx │ │ │ ├── bookmarks.ts │ │ │ ├── highlights.ts │ │ │ ├── lists.ts │ │ │ ├── reader-settings.tsx │ │ │ ├── reading-progress.ts │ │ │ ├── rules.ts │ │ │ ├── search-history.ts │ │ │ ├── tags.ts │ │ │ ├── use-debounce.ts │ │ │ └── users.ts │ │ ├── lib/ │ │ │ └── utils.ts │ │ ├── package.json │ │ ├── providers/ │ │ │ └── trpc-provider.tsx │ │ ├── trpc.ts │ │ └── tsconfig.json │ ├── shared-server/ │ │ ├── .oxlintrc.json │ │ ├── index.ts │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── plugins.ts │ │ │ ├── queues.ts │ │ │ ├── services/ │ │ │ │ └── quotaService.ts │ │ │ ├── tracing.ts │ │ │ └── tracingTypes.ts │ │ └── tsconfig.json │ └── trpc/ │ ├── .oxlintrc.json │ ├── auth.ts │ ├── email.ts │ ├── index.ts │ ├── lib/ │ │ ├── __tests__/ │ │ │ ├── ruleEngine.test.ts │ │ │ └── search.test.ts │ │ ├── attachments.ts │ │ ├── impersonate.ts │ │ ├── rateLimit.ts │ │ ├── ruleEngine.ts │ │ ├── search.ts │ │ ├── tracing.ts │ │ └── turnstile.ts │ ├── models/ │ │ ├── assets.ts │ │ ├── backups.ts │ │ ├── bookmarks.ts │ │ ├── feeds.ts │ │ ├── highlights.ts │ │ ├── importSessions.ts │ │ ├── listInvitations.ts │ │ ├── lists.ts │ │ ├── rules.ts │ │ ├── tags.ts │ │ ├── users.ts │ │ └── webhooks.ts │ ├── package.json │ ├── routers/ │ │ ├── _app.ts │ │ ├── admin.test.ts │ │ ├── admin.ts │ │ ├── apiKeys.test.ts │ │ ├── apiKeys.ts │ │ ├── assets.test.ts │ │ ├── assets.ts │ │ ├── backups.ts │ │ ├── bookmarks.test.ts │ │ ├── bookmarks.ts │ │ ├── config.ts │ │ ├── feeds.test.ts │ │ ├── feeds.ts │ │ ├── highlights.test.ts │ │ ├── highlights.ts │ │ ├── importSessions.test.ts │ │ ├── importSessions.ts │ │ ├── invites.test.ts │ │ ├── invites.ts │ │ ├── lists.test.ts │ │ ├── lists.ts │ │ ├── prompts.test.ts │ │ ├── prompts.ts │ │ ├── publicBookmarks.ts │ │ ├── rules.test.ts │ │ ├── rules.ts │ │ ├── sharedLists.test.ts │ │ ├── subscriptions.test.ts │ │ ├── subscriptions.ts │ │ ├── tags.test.ts │ │ ├── tags.ts │ │ ├── users.test.ts │ │ ├── users.ts │ │ ├── webhooks.test.ts │ │ └── webhooks.ts │ ├── stats.ts │ ├── testUtils.ts │ ├── tsconfig.json │ └── vitest.config.ts ├── patches/ │ ├── playwright-extra@4.3.6.patch │ └── xcode@3.0.1.patch ├── pnpm-workspace.yaml ├── start-dev.sh ├── tooling/ │ ├── github/ │ │ ├── package.json │ │ └── setup/ │ │ └── action.yml │ ├── oxlint/ │ │ ├── oxlint-base.json │ │ ├── oxlint-nextjs.json │ │ ├── oxlint-react.json │ │ └── package.json │ ├── prettier/ │ │ ├── index.js │ │ ├── package.json │ │ └── tsconfig.json │ ├── tailwind/ │ │ ├── .oxlintrc.json │ │ ├── base.ts │ │ ├── globals.css │ │ ├── native.ts │ │ ├── package.json │ │ ├── tsconfig.json │ │ └── web.ts │ └── typescript/ │ ├── base.json │ ├── node.json │ └── package.json ├── tools/ │ └── compare-models/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src/ │ │ ├── apiClient.ts │ │ ├── bookmarkProcessor.ts │ │ ├── config.ts │ │ ├── index.ts │ │ ├── inferenceClient.ts │ │ ├── interactive.ts │ │ └── types.ts │ └── tsconfig.json └── turbo.json
SYMBOL INDEX (2128 symbols across 641 files)
FILE: apps/browser-extension/src/BookmarkDeletedPage.tsx
function BookmarkDeletedPage (line 1) | function BookmarkDeletedPage() {
FILE: apps/browser-extension/src/BookmarkSavedPage.tsx
function BookmarkSavedPage (line 18) | function BookmarkSavedPage() {
FILE: apps/browser-extension/src/CustomHeadersPage.tsx
function CustomHeadersPage (line 10) | function CustomHeadersPage() {
FILE: apps/browser-extension/src/Layout.tsx
function Layout (line 7) | function Layout() {
FILE: apps/browser-extension/src/Logo.tsx
function Logo (line 4) | function Logo() {
FILE: apps/browser-extension/src/NotConfiguredPage.tsx
function NotConfiguredPage (line 10) | function NotConfiguredPage() {
FILE: apps/browser-extension/src/OptionsPage.tsx
function OptionsPage (line 23) | function OptionsPage() {
FILE: apps/browser-extension/src/SavePage.tsx
function SavePage (line 17) | function SavePage() {
FILE: apps/browser-extension/src/SignInPage.tsx
type LoginState (line 11) | const enum LoginState {
function SignInPage (line 17) | function SignInPage() {
FILE: apps/browser-extension/src/Spinner.tsx
function Spinner (line 1) | function Spinner() {
FILE: apps/browser-extension/src/background/background.ts
constant OPEN_KARAKEEP_ID (line 17) | const OPEN_KARAKEEP_ID = "open-karakeep";
constant ADD_LINK_TO_KARAKEEP_ID (line 18) | const ADD_LINK_TO_KARAKEEP_ID = "add-link";
constant CLEAR_CURRENT_CACHE_ID (line 19) | const CLEAR_CURRENT_CACHE_ID = "clear-current-cache";
constant CLEAR_ALL_CACHE_ID (line 20) | const CLEAR_ALL_CACHE_ID = "clear-all-cache";
constant SEPARATOR_ID (line 21) | const SEPARATOR_ID = "separator-1";
constant VIEW_PAGE_IN_KARAKEEP (line 22) | const VIEW_PAGE_IN_KARAKEEP = "view-page-in-karakeep";
function checkSettingsState (line 28) | async function checkSettingsState(settings: Settings) {
function removeContextMenus (line 41) | function removeContextMenus() {
function registerContextMenus (line 56) | function registerContextMenus(settings: Settings) {
function handleContextMenuClick (line 104) | async function handleContextMenuClick(
function addLinkToKarakeep (line 144) | function addLinkToKarakeep({
function searchCurrentUrl (line 189) | async function searchCurrentUrl(tabUrl?: string) {
function clearCurrentPageCache (line 221) | async function clearCurrentPageCache() {
function clearAllCache (line 244) | async function clearAllCache() {
function handleCommand (line 269) | function handleCommand(command: string, tab: chrome.tabs.Tab) {
function setBadge (line 292) | async function setBadge(badgeStatus: string | null, tabId?: number) {
function checkAndUpdateIcon (line 312) | async function checkAndUpdateIcon(tabId: number) {
FILE: apps/browser-extension/src/background/protocol.ts
constant NEW_BOOKMARK_REQUEST_KEY_NAME (line 1) | const NEW_BOOKMARK_REQUEST_KEY_NAME = "karakeep-new-bookmark";
FILE: apps/browser-extension/src/components/BookmarkLists.tsx
function BookmarkLists (line 12) | function BookmarkLists({ bookmarkId }: { bookmarkId: string }) {
FILE: apps/browser-extension/src/components/ListsSelector.tsx
function ListsSelector (line 26) | function ListsSelector({ bookmarkId }: { bookmarkId: string }) {
FILE: apps/browser-extension/src/components/NoteEditor.tsx
function NoteEditor (line 12) | function NoteEditor({ bookmarkId }: { bookmarkId: string }) {
FILE: apps/browser-extension/src/components/TagList.tsx
function TagList (line 6) | function TagList({ bookmarkId }: { bookmarkId: string }) {
FILE: apps/browser-extension/src/components/TagsSelector.tsx
function TagsSelector (line 25) | function TagsSelector({ bookmarkId }: { bookmarkId: string }) {
FILE: apps/browser-extension/src/components/ui/badge.tsx
type BadgeProps (line 27) | interface BadgeProps
function Badge (line 32) | function Badge({ className, variant, ...props }: BadgeProps) {
FILE: apps/browser-extension/src/components/ui/button.tsx
type ButtonProps (line 37) | interface ButtonProps
FILE: apps/browser-extension/src/components/ui/command.tsx
type CommandDialogProps (line 24) | type CommandDialogProps = DialogProps;
FILE: apps/browser-extension/src/components/ui/dynamic-popover.tsx
type DynamicPopoverContentProps (line 6) | interface DynamicPopoverContentProps extends React.ComponentPropsWithout...
function useDebounce (line 26) | function useDebounce<T>(value: T, delay: number): T {
function getAvailableHeight (line 45) | function getAvailableHeight(element: HTMLElement): number {
function getContentHeight (line 66) | function getContentHeight(element: HTMLElement): number {
FILE: apps/browser-extension/src/components/ui/input.tsx
type InputProps (line 5) | type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
FILE: apps/browser-extension/src/components/ui/textarea.tsx
type TextareaProps (line 5) | type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
FILE: apps/browser-extension/src/main.tsx
function App (line 17) | function App() {
FILE: apps/browser-extension/src/utils/ThemeProvider.tsx
type Theme (line 5) | type Theme = "dark" | "light" | "system";
type ThemeProviderProps (line 7) | interface ThemeProviderProps {
type ThemeProviderState (line 11) | interface ThemeProviderState {
function ThemeProvider (line 23) | function ThemeProvider({ children, ...props }: ThemeProviderProps) {
FILE: apps/browser-extension/src/utils/badgeCache.ts
function fetchBadgeStatus (line 11) | async function fetchBadgeStatus(url: string): Promise<string | null> {
function getBadgeStatus (line 32) | async function getBadgeStatus(url: string): Promise<string | null> {
function clearBadgeStatus (line 53) | async function clearBadgeStatus(url?: string): Promise<void> {
FILE: apps/browser-extension/src/utils/css.ts
function cn (line 5) | function cn(...inputs: ClassValue[]) {
FILE: apps/browser-extension/src/utils/providers.tsx
function Providers (line 6) | function Providers({ children }: { children: React.ReactNode }) {
FILE: apps/browser-extension/src/utils/settings.ts
constant DEFAULT_BADGE_CACHE_EXPIRE_MS (line 4) | const DEFAULT_BADGE_CACHE_EXPIRE_MS = 60 * 60 * 1000;
constant DEFAULT_SHOW_COUNT_BADGE (line 5) | const DEFAULT_SHOW_COUNT_BADGE = false;
constant DEFAULT_SETTINGS (line 18) | const DEFAULT_SETTINGS: Settings = {
type Settings (line 28) | type Settings = z.infer<typeof zSettingsSchema>;
constant STORAGE (line 30) | const STORAGE = chrome.storage.sync;
function usePluginSettings (line 32) | function usePluginSettings() {
function getPluginSettings (line 72) | async function getPluginSettings() {
function subscribeToSettingsChanges (line 83) | function subscribeToSettingsChanges(
FILE: apps/browser-extension/src/utils/storagePersister.ts
constant TANSTACK_QUERY_CACHE_KEY (line 6) | const TANSTACK_QUERY_CACHE_KEY = "tanstack-query-cache-key";
FILE: apps/browser-extension/src/utils/trpc.ts
function initializeClients (line 23) | async function initializeClients() {
function getApiClient (line 115) | async function getApiClient() {
function getQueryClient (line 122) | async function getQueryClient() {
function cleanupApiClient (line 128) | function cleanupApiClient() {
FILE: apps/browser-extension/src/utils/type.ts
type MessageType (line 1) | const enum MessageType {
FILE: apps/browser-extension/src/utils/url.ts
function isHttpUrl (line 6) | function isHttpUrl(url: string) {
function normalizeUrl (line 17) | function normalizeUrl(url: string, base?: string): string {
function urlsMatchIgnoringAnchorAndTrailingSlash (line 35) | function urlsMatchIgnoringAnchorAndTrailingSlash(
FILE: apps/cli/src/commands/admin.ts
function toHumanReadableSize (line 15) | function toHumanReadableSize(size: number): string {
FILE: apps/cli/src/commands/bookmarks.ts
function collect (line 22) | function collect<T>(val: T, acc: T[]) {
type Bookmark (line 27) | type Bookmark = Omit<ZBookmark, "tags"> & {
function normalizeBookmark (line 31) | function normalizeBookmark(bookmark: ZBookmark): Bookmark {
function printBookmark (line 38) | function printBookmark(bookmark: ZBookmark) {
function printTagMessage (line 159) | function printTagMessage(
function updateTags (line 172) | async function updateTags(addTags: string[], removeTags: string[], id: s...
FILE: apps/cli/src/commands/dump.ts
constant FAIL (line 18) | const FAIL = chalk.red("✗");
constant DOTS (line 19) | const DOTS = chalk.gray("…");
function line (line 21) | function line(msg: string) {
function stepStart (line 25) | function stepStart(title: string) {
function stepEndSuccess (line 29) | function stepEndSuccess(extra?: string) {
function stepEndFail (line 33) | function stepEndFail(extra?: string) {
function progressUpdate (line 37) | function progressUpdate(
function progressDone (line 58) | function progressDone() {
function ensureDir (line 62) | async function ensureDir(p: string) {
function writeJson (line 66) | async function writeJson(filePath: string, data: unknown) {
function writeJsonl (line 72) | async function writeJsonl(
function createTarGz (line 88) | async function createTarGz(srcDir: string, outFile: string): Promise<voi...
function buildListMembership (line 379) | async function buildListMembership(
function downloadAsset (line 413) | async function downloadAsset(
FILE: apps/cli/src/commands/lists.ts
function addToList (line 65) | async function addToList(listId: string, bookmarkId: string) {
FILE: apps/cli/src/commands/migrate.ts
constant FAIL (line 21) | const FAIL = chalk.red("✗");
constant DOTS (line 22) | const DOTS = chalk.gray("…");
function line (line 24) | function line(msg: string) {
function stepStart (line 28) | function stepStart(title: string) {
function stepEndSuccess (line 32) | function stepEndSuccess(extra?: string) {
function stepEndFail (line 36) | function stepEndFail(extra?: string) {
function progressUpdate (line 40) | function progressUpdate(
function progressDone (line 61) | function progressDone() {
function migrateUserSettings (line 295) | async function migrateUserSettings(
function migrateLists (line 311) | async function migrateLists(
function migrateFeeds (line 410) | async function migrateFeeds(
function migratePrompts (line 436) | async function migratePrompts(
function migrateWebhooks (line 466) | async function migrateWebhooks(
function migrateTags (line 487) | async function migrateTags(
type RuleIdMaps (line 523) | interface RuleIdMaps {
function migrateRules (line 529) | async function migrateRules(
function remapRuleIds (line 561) | function remapRuleIds(
function buildBookmarkListMembership (line 623) | async function buildBookmarkListMembership(
function migrateBookmarks (line 657) | async function migrateBookmarks(
FILE: apps/cli/src/commands/wipe.ts
constant FAIL (line 13) | const FAIL = chalk.red("✗");
constant DOTS (line 14) | const DOTS = chalk.gray("…");
function line (line 16) | function line(msg: string) {
function stepStart (line 20) | function stepStart(title: string) {
function stepEndSuccess (line 24) | function stepEndSuccess(extra?: string) {
function stepEndFail (line 28) | function stepEndFail(extra?: string) {
function progressUpdate (line 32) | function progressUpdate(
function progressDone (line 53) | function progressDone() {
function wipeRules (line 209) | async function wipeRules(
function wipeFeeds (line 235) | async function wipeFeeds(
function wipeWebhooks (line 261) | async function wipeWebhooks(
function wipePrompts (line 287) | async function wipePrompts(
function wipeBookmarks (line 313) | async function wipeBookmarks(
function wipeLists (line 354) | async function wipeLists(
function wipeTags (line 401) | async function wipeTags(api: ReturnType<typeof getAPIClient>) {
FILE: apps/cli/src/lib/globals.ts
type GlobalOptions (line 1) | interface GlobalOptions {
function setGlobalOptions (line 9) | function setGlobalOptions(opts: GlobalOptions) {
function getGlobalOptions (line 13) | function getGlobalOptions() {
FILE: apps/cli/src/lib/output.ts
function printObject (line 11) | function printObject(
function printStatusMessage (line 28) | function printStatusMessage(success: boolean, message: unknown): void {
function printSuccess (line 38) | function printSuccess(message: string) {
function printError (line 48) | function printError(message: string) {
function printErrorMessageWithReason (line 58) | function printErrorMessageWithReason(message: string, error: object) {
FILE: apps/cli/src/lib/trpc.ts
function getAPIClient (line 8) | function getAPIClient() {
function getAPIClientFor (line 26) | function getAPIClientFor(opts: { serverAddr: string; apiKey: string }) {
FILE: apps/cli/src/vite-env.d.ts
type ImportMetaEnv (line 3) | interface ImportMetaEnv {
type ImportMeta (line 7) | interface ImportMeta {
FILE: apps/landing/components/ui/button.tsx
type ButtonProps (line 36) | interface ButtonProps
FILE: apps/landing/lib/utils.ts
function cn (line 5) | function cn(...inputs: ClassValue[]) {
FILE: apps/landing/src/App.tsx
function App (line 12) | function App() {
FILE: apps/landing/src/Apps.tsx
type Listing (line 9) | interface Listing {
function ListingSection (line 61) | function ListingSection({
function Apps (line 101) | function Apps() {
FILE: apps/landing/src/Homepage.tsx
function Homepage (line 165) | function Homepage() {
FILE: apps/landing/src/Navbar.tsx
function NavBar (line 10) | function NavBar() {
FILE: apps/landing/src/Pricing.tsx
constant CONTACT_EMAIL (line 8) | const CONTACT_EMAIL = "mailto:support@karakeep.app";
function PricingHeader (line 80) | function PricingHeader() {
function PricingCards (line 91) | function PricingCards() {
function FAQ (line 170) | function FAQ() {
function Pricing (line 209) | function Pricing() {
FILE: apps/landing/src/Privacy.tsx
function PrivacyPolicy (line 3) | function PrivacyPolicy() {
FILE: apps/landing/src/SEO.tsx
constant BASE_URL (line 1) | const BASE_URL = "https://karakeep.app";
constant DEFAULT_DESCRIPTION (line 2) | const DEFAULT_DESCRIPTION =
type SEOProps (line 5) | interface SEOProps {
function SEO (line 11) | function SEO({
FILE: apps/landing/src/Terms.tsx
function Terms (line 3) | function Terms() {
FILE: apps/landing/src/components/Banner.tsx
function Banner (line 5) | function Banner() {
FILE: apps/landing/src/components/CallToAction.tsx
function CallToAction (line 6) | function CallToAction() {
FILE: apps/landing/src/components/FeatureShowcase.tsx
type FeatureBullet (line 5) | interface FeatureBullet {
type FeatureShowcaseProps (line 10) | interface FeatureShowcaseProps {
function FeatureShowcase (line 21) | function FeatureShowcase({
FILE: apps/landing/src/components/FeaturesGrid.tsx
type Feature (line 3) | interface Feature {
function FeaturesGrid (line 9) | function FeaturesGrid({ features }: { features: Feature[] }) {
FILE: apps/landing/src/components/Footer.tsx
function Footer (line 27) | function Footer() {
FILE: apps/landing/src/components/Hero.tsx
function Hero (line 8) | function Hero() {
FILE: apps/landing/src/components/Layout.tsx
function Layout (line 7) | function Layout() {
FILE: apps/landing/src/components/OpenSource.tsx
function OpenSource (line 7) | function OpenSource() {
FILE: apps/landing/src/components/Platforms.tsx
function Platforms (line 38) | function Platforms() {
FILE: apps/landing/src/constants.ts
constant GITHUB_LINK (line 1) | const GITHUB_LINK = "https://github.com/karakeep-app/karakeep";
constant DOCS_LINK (line 2) | const DOCS_LINK = "https://docs.karakeep.app";
constant DEMO_LINK (line 3) | const DEMO_LINK = "https://try.karakeep.app";
constant CLOUD_SIGNUP_LINK (line 4) | const CLOUD_SIGNUP_LINK = "https://cloud.karakeep.app/signup";
FILE: apps/mcp/src/index.ts
function run (line 10) | async function run() {
FILE: apps/mcp/src/utils.ts
function toMcpToolError (line 5) | function toMcpToolError(
function compactBookmark (line 19) | function compactBookmark(
FILE: apps/mobile/app.config.js
constant IS_DEV (line 1) | const IS_DEV = process.env.APP_VARIANT === "development";
FILE: apps/mobile/app/+not-found.tsx
function NotFound (line 4) | function NotFound() {
FILE: apps/mobile/app/dashboard/(tabs)/(highlights)/_layout.tsx
function Layout (line 4) | function Layout() {
FILE: apps/mobile/app/dashboard/(tabs)/(highlights)/index.tsx
function Highlights (line 8) | function Highlights() {
FILE: apps/mobile/app/dashboard/(tabs)/(home)/_layout.tsx
function Layout (line 4) | function Layout() {
FILE: apps/mobile/app/dashboard/(tabs)/(home)/index.tsx
function HeaderRight (line 16) | function HeaderRight({
function Home (line 112) | function Home() {
FILE: apps/mobile/app/dashboard/(tabs)/(lists)/_layout.tsx
function Layout (line 4) | function Layout() {
FILE: apps/mobile/app/dashboard/(tabs)/(lists)/index.tsx
function HeaderRight (line 18) | function HeaderRight({ openNewListModal }: { openNewListModal: () => voi...
type ListLink (line 32) | interface ListLink {
function traverseTree (line 45) | function traverseTree(
function Lists (line 79) | function Lists() {
FILE: apps/mobile/app/dashboard/(tabs)/(settings)/_layout.tsx
function Layout (line 4) | function Layout() {
FILE: apps/mobile/app/dashboard/(tabs)/(settings)/index.tsx
function SectionHeader (line 26) | function SectionHeader({ title }: { title: string }) {
function Settings (line 34) | function Settings() {
FILE: apps/mobile/app/dashboard/(tabs)/(tags)/_layout.tsx
function Layout (line 4) | function Layout() {
FILE: apps/mobile/app/dashboard/(tabs)/(tags)/index.tsx
type TagItem (line 17) | interface TagItem {
function Tags (line 24) | function Tags() {
FILE: apps/mobile/app/dashboard/(tabs)/_layout.tsx
function TabLayout (line 11) | function TabLayout() {
FILE: apps/mobile/app/dashboard/(tabs)/index.tsx
function TabIndex (line 3) | function TabIndex() {
FILE: apps/mobile/app/dashboard/_layout.tsx
function onAppStateChange (line 9) | function onAppStateChange(status: AppStateStatus) {
function Dashboard (line 15) | function Dashboard() {
FILE: apps/mobile/app/dashboard/archive.tsx
function Archive (line 3) | function Archive() {
FILE: apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx
function BookmarkView (line 22) | function BookmarkView() {
FILE: apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx
function TitleEditor (line 42) | function TitleEditor({
function NotesEditor (line 68) | function NotesEditor({
function TagList (line 96) | function TagList({
function ManageLists (line 141) | function ManageLists({ bookmark }: { bookmark: ZBookmark }) {
function AISummarySection (line 154) | function AISummarySection({
FILE: apps/mobile/app/dashboard/bookmarks/[slug]/manage_tags.tsx
constant NEW_TAG_ID (line 18) | const NEW_TAG_ID = "new-tag";
FILE: apps/mobile/app/dashboard/favourites.tsx
function Favourites (line 3) | function Favourites() {
FILE: apps/mobile/app/dashboard/lists/[slug]/index.tsx
function ListView (line 16) | function ListView() {
function ListActionsMenu (line 56) | function ListActionsMenu({
FILE: apps/mobile/app/dashboard/lists/new.tsx
type ListType (line 11) | type ListType = "manual" | "smart";
FILE: apps/mobile/app/dashboard/search.tsx
constant MAX_DISPLAY_SUGGESTIONS (line 20) | const MAX_DISPLAY_SUGGESTIONS = 5;
function Search (line 22) | function Search() {
FILE: apps/mobile/app/dashboard/settings/bookmark-default-view.tsx
function BookmarkDefaultViewSettings (line 9) | function BookmarkDefaultViewSettings() {
FILE: apps/mobile/app/dashboard/settings/reader-settings.tsx
function ReaderSettingsPage (line 22) | function ReaderSettingsPage() {
FILE: apps/mobile/app/dashboard/settings/theme.tsx
function ThemePage (line 7) | function ThemePage() {
FILE: apps/mobile/app/dashboard/tags/[slug].tsx
function TagView (line 10) | function TagView() {
FILE: apps/mobile/app/error.tsx
function ErrorPage (line 4) | function ErrorPage() {
FILE: apps/mobile/app/index.tsx
function App (line 5) | function App() {
FILE: apps/mobile/app/server-address.tsx
function ServerAddress (line 12) | function ServerAddress() {
FILE: apps/mobile/app/sharing.tsx
type Mode (line 19) | type Mode =
function SaveBookmark (line 25) | function SaveBookmark({ setMode }: { setMode: (mode: Mode) => void }) {
function Sharing (line 97) | function Sharing() {
FILE: apps/mobile/app/signin.tsx
type LoginType (line 22) | enum LoginType {
function Signin (line 27) | function Signin() {
FILE: apps/mobile/app/test-connection.tsx
function TestConnection (line 10) | function TestConnection() {
FILE: apps/mobile/components/CustomHeadersModal.tsx
type CustomHeadersModalProps (line 11) | interface CustomHeadersModalProps {
function CustomHeadersModal (line 18) | function CustomHeadersModal({
FILE: apps/mobile/components/FullPageError.tsx
function FullPageError (line 6) | function FullPageError({
FILE: apps/mobile/components/SplashScreenController.tsx
function SplashScreenController (line 6) | function SplashScreenController() {
FILE: apps/mobile/components/TailwindResolver.tsx
function TailwindResolverImpl (line 4) | function TailwindResolverImpl({
FILE: apps/mobile/components/bookmarks/BookmarkAssetImage.tsx
function BookmarkAssetImage (line 5) | function BookmarkAssetImage({
FILE: apps/mobile/components/bookmarks/BookmarkAssetView.tsx
type BookmarkAssetViewProps (line 10) | interface BookmarkAssetViewProps {
function BookmarkAssetView (line 14) | function BookmarkAssetView({
FILE: apps/mobile/components/bookmarks/BookmarkCard.tsx
function ActionBar (line 47) | function ActionBar({ bookmark }: { bookmark: ZBookmark }) {
function TagList (line 311) | function TagList({ bookmark }: { bookmark: ZBookmark }) {
function LinkCard (line 336) | function LinkCard({
function TextCard (line 424) | function TextCard({
function AssetCard (line 467) | function AssetCard({
function BookmarkCard (line 522) | function BookmarkCard({
FILE: apps/mobile/components/bookmarks/BookmarkHtmlHighlighterDom.tsx
function BookmarkHtmlHighlighterDom (line 9) | function BookmarkHtmlHighlighterDom({
FILE: apps/mobile/components/bookmarks/BookmarkLinkPreview.tsx
function BookmarkLinkBrowserPreview (line 28) | function BookmarkLinkBrowserPreview({
function BookmarkLinkPdfPreview (line 46) | function BookmarkLinkPdfPreview({ bookmark }: { bookmark: ZBookmark }) {
function BookmarkLinkReaderPreview (line 70) | function BookmarkLinkReaderPreview({
function BookmarkLinkArchivePreview (line 196) | function BookmarkLinkArchivePreview({
function BookmarkLinkScreenshotPreview (line 229) | function BookmarkLinkScreenshotPreview({
FILE: apps/mobile/components/bookmarks/BookmarkLinkTypeSelector.tsx
type BookmarkLinkType (line 9) | type BookmarkLinkType =
function getAvailableViewTypes (line 16) | function getAvailableViewTypes(bookmark: ZBookmark): BookmarkLinkType[] {
type BookmarkLinkTypeSelectorProps (line 43) | interface BookmarkLinkTypeSelectorProps {
function BookmarkLinkTypeSelector (line 49) | function BookmarkLinkTypeSelector({
FILE: apps/mobile/components/bookmarks/BookmarkLinkView.tsx
type BookmarkLinkViewProps (line 13) | interface BookmarkLinkViewProps {
function BookmarkLinkView (line 18) | function BookmarkLinkView({
FILE: apps/mobile/components/bookmarks/BookmarkList.tsx
function BookmarkList (line 12) | function BookmarkList({
FILE: apps/mobile/components/bookmarks/BookmarkTextMarkdown.tsx
function BookmarkTextMarkdown (line 4) | function BookmarkTextMarkdown({ text }: { text: string }) {
FILE: apps/mobile/components/bookmarks/BookmarkTextView.tsx
type BookmarkTextViewProps (line 12) | interface BookmarkTextViewProps {
function BookmarkTextView (line 16) | function BookmarkTextView({ bookmark }: BookmarkTextViewProps) {
FILE: apps/mobile/components/bookmarks/BottomActions.tsx
type BottomActionsProps (line 11) | interface BottomActionsProps {
function BottomActions (line 15) | function BottomActions({ bookmark }: BottomActionsProps) {
FILE: apps/mobile/components/bookmarks/NotePreview.tsx
type NotePreviewProps (line 10) | interface NotePreviewProps {
function NotePreview (line 16) | function NotePreview({
FILE: apps/mobile/components/bookmarks/PDFViewer.tsx
type PDFViewerProps (line 9) | interface PDFViewerProps {
function PDFViewer (line 14) | function PDFViewer({ source, headers }: PDFViewerProps) {
FILE: apps/mobile/components/bookmarks/TagPill.tsx
function TagPill (line 6) | function TagPill({
FILE: apps/mobile/components/bookmarks/UpdatingBookmarkList.tsx
function UpdatingBookmarkList (line 11) | function UpdatingBookmarkList({
FILE: apps/mobile/components/highlights/HighlightCard.tsx
constant HIGHLIGHT_COLOR_MAP (line 16) | const HIGHLIGHT_COLOR_MAP = {
function HighlightCard (line 23) | function HighlightCard({
FILE: apps/mobile/components/highlights/HighlightList.tsx
function HighlightList (line 12) | function HighlightList({
FILE: apps/mobile/components/navigation/stack.tsx
type StackProps (line 5) | interface StackProps extends React.ComponentProps<typeof Stack> {
function StackImpl (line 10) | function StackImpl({ contentStyle, headerStyle, ...props }: StackProps) {
FILE: apps/mobile/components/reader/ReaderPreview.tsx
constant PREVIEW_TEXT (line 9) | const PREVIEW_TEXT =
type ReaderPreviewRef (line 12) | interface ReaderPreviewRef {
type ReaderPreviewProps (line 20) | interface ReaderPreviewProps {
FILE: apps/mobile/components/settings/UserProfileHeader.tsx
type UserProfileHeaderProps (line 5) | interface UserProfileHeaderProps {
function UserProfileHeader (line 11) | function UserProfileHeader({
FILE: apps/mobile/components/sharing/ErrorAnimation.tsx
function ErrorAnimation (line 13) | function ErrorAnimation() {
FILE: apps/mobile/components/sharing/LoadingAnimation.tsx
function LoadingAnimation (line 16) | function LoadingAnimation() {
FILE: apps/mobile/components/sharing/SuccessAnimation.tsx
type ParticleProps (line 16) | interface ParticleProps {
function Particle (line 22) | function Particle({ angle, delay, color }: ParticleProps) {
type SuccessAnimationProps (line 59) | interface SuccessAnimationProps {
function SuccessAnimation (line 63) | function SuccessAnimation({
FILE: apps/mobile/components/ui/ActionButton.tsx
function ActionButton (line 4) | function ActionButton({
FILE: apps/mobile/components/ui/Avatar.tsx
type AvatarProps (line 8) | interface AvatarProps {
constant AVATAR_COLORS (line 16) | const AVATAR_COLORS = [
function nameToColor (line 29) | function nameToColor(name: string | null | undefined): string {
function isExternalUrl (line 38) | function isExternalUrl(url: string) {
function Avatar (line 42) | function Avatar({
FILE: apps/mobile/components/ui/Button.tsx
function convertToRGBA (line 81) | function convertToRGBA(rgb: string, opacity: number): string {
constant ANDROID_RIPPLE (line 95) | const ANDROID_RIPPLE = {
constant BORDER_CURVE (line 131) | const BORDER_CURVE: ViewStyle = {
type ButtonVariantProps (line 135) | type ButtonVariantProps = Omit<
type AndroidOnlyButtonProps (line 142) | interface AndroidOnlyButtonProps {
type ButtonProps (line 149) | type ButtonProps = PressableProps & ButtonVariantProps & AndroidOnlyButt...
FILE: apps/mobile/components/ui/ChevronRight.tsx
function ChevronRight (line 4) | function ChevronRight({
FILE: apps/mobile/components/ui/Divider.tsx
function Divider (line 4) | function Divider({
FILE: apps/mobile/components/ui/EmptyState.tsx
function EmptyState (line 7) | function EmptyState({
FILE: apps/mobile/components/ui/FullPageSpinner.tsx
function FullPageSpinner (line 3) | function FullPageSpinner() {
FILE: apps/mobile/components/ui/GroupedList.tsx
function GroupedSection (line 9) | function GroupedSection({
function RowSeparator (line 37) | function RowSeparator() {
function NavigationRow (line 50) | function NavigationRow({
FILE: apps/mobile/components/ui/Input.tsx
type InputProps (line 7) | interface InputProps extends TextInputProps {
FILE: apps/mobile/components/ui/SearchInput/SearchInput.ios.tsx
constant BORDER_CURVE (line 19) | const BORDER_CURVE: ViewStyle = {
function focus (line 106) | function focus() {
function blur (line 110) | function blur() {
function clear (line 114) | function clear() {
function onFocus (line 118) | function onFocus(e: Parameters<NonNullable<typeof onFocusProp>>[0]) {
FILE: apps/mobile/components/ui/SearchInput/SearchInput.tsx
function focus (line 38) | function focus() {
function blur (line 42) | function blur() {
function clear (line 46) | function clear() {
FILE: apps/mobile/components/ui/SearchInput/types.ts
type SearchInputProps (line 3) | interface SearchInputProps extends TextInputProps {
type SearchInputRef (line 11) | type SearchInputRef = TextInput;
FILE: apps/mobile/components/ui/Skeleton.tsx
function Skeleton (line 6) | function Skeleton({
FILE: apps/mobile/components/ui/Text.tsx
function Text (line 36) | function Text({
FILE: apps/mobile/components/ui/Toast.tsx
type ToastVariant (line 10) | type ToastVariant = keyof typeof toastVariants;
function useToast (line 13) | function useToast() {
FILE: apps/mobile/lib/hooks.ts
type AssetSource (line 8) | interface AssetSource {
function useAssetUrl (line 13) | function useAssetUrl(assetId: string): AssetSource {
function useServerVersion (line 21) | function useServerVersion() {
function useArchiveFilter (line 47) | function useArchiveFilter(): {
FILE: apps/mobile/lib/providers.tsx
function Providers (line 10) | function Providers({ children }: { children: React.ReactNode }) {
FILE: apps/mobile/lib/readerSettings.tsx
constant MOBILE_FONT_FAMILIES (line 17) | const MOBILE_FONT_FAMILIES: Record<
constant WEBVIEW_FONT_FAMILIES (line 34) | const WEBVIEW_FONT_FAMILIES: Record<ZReaderFontFamily, string> = {
function ReaderSettingsProvider (line 44) | function ReaderSettingsProvider({ children }: { children: ReactNode }) {
FILE: apps/mobile/lib/session.ts
function useSession (line 8) | function useSession() {
function useIsLoggedIn (line 28) | function useIsLoggedIn() {
FILE: apps/mobile/lib/settings.ts
constant SETTING_NAME (line 8) | const SETTING_NAME = "settings";
type Settings (line 28) | type Settings = z.infer<typeof zSettingsSchema>;
type AppSettingsState (line 30) | interface AppSettingsState {
function useAppSettings (line 78) | function useAppSettings() {
FILE: apps/mobile/lib/upload.ts
function useUploadAsset (line 14) | function useUploadAsset(
FILE: apps/mobile/lib/useColorScheme.tsx
function useColorScheme (line 8) | function useColorScheme() {
function useInitialAndroidBarSync (line 36) | function useInitialAndroidBarSync() {
function setNavigationBar (line 48) | function setNavigationBar(colorScheme: "light" | "dark") {
FILE: apps/mobile/lib/useMenuIconColors.ts
function useMenuIconColors (line 3) | function useMenuIconColors() {
FILE: apps/mobile/lib/utils.ts
function cn (line 5) | function cn(...inputs: ClassValue[]) {
function condProps (line 35) | function condProps(
function buildApiHeaders (line 51) | function buildApiHeaders(
FILE: apps/mobile/metro.config.js
function withMonorepoPaths (line 25) | function withMonorepoPaths(config) {
function withTurborepoManagedCache (line 51) | function withTurborepoManagedCache(config) {
FILE: apps/mobile/plugins/camera-not-required.js
function setCustomConfigAsync (line 10) | async function setCustomConfigAsync(_config, androidManifest) {
FILE: apps/mobile/plugins/trust-local-certs.js
function setCustomConfigAsync (line 16) | async function setCustomConfigAsync(config, androidManifest) {
FILE: apps/mobile/tailwind.config.js
function withOpacity (line 57) | function withOpacity(variableName) {
FILE: apps/mobile/theme/colors.ts
constant SYSTEM_COLORS (line 1) | const SYSTEM_COLORS = {
constant COLORS (line 34) | const COLORS = SYSTEM_COLORS;
FILE: apps/mobile/theme/index.ts
constant NAV_THEME (line 5) | const NAV_THEME = {
FILE: apps/web/@types/i18next.d.ts
type CustomTypeOptions (line 7) | interface CustomTypeOptions {
FILE: apps/web/app/admin/admin_tools/page.tsx
function generateMetadata (line 5) | async function generateMetadata(): Promise<Metadata> {
function AdminToolsPage (line 13) | function AdminToolsPage() {
FILE: apps/web/app/admin/background_jobs/page.tsx
function generateMetadata (line 5) | async function generateMetadata(): Promise<Metadata> {
function BackgroundJobsPage (line 13) | function BackgroundJobsPage() {
FILE: apps/web/app/admin/layout.tsx
function AdminLayout (line 45) | async function AdminLayout({
FILE: apps/web/app/admin/overview/page.tsx
function generateMetadata (line 6) | async function generateMetadata(): Promise<Metadata> {
function AdminOverviewPage (line 14) | function AdminOverviewPage() {
FILE: apps/web/app/admin/page.tsx
function AdminHomepage (line 3) | function AdminHomepage() {
FILE: apps/web/app/admin/users/page.tsx
function generateMetadata (line 9) | async function generateMetadata(): Promise<Metadata> {
function AdminUsersPage (line 17) | function AdminUsersPage() {
FILE: apps/web/app/api/[[...route]]/route.ts
constant GET (line 23) | const GET = handle(app);
constant POST (line 24) | const POST = handle(app);
constant PATCH (line 25) | const PATCH = handle(app);
constant DELETE (line 26) | const DELETE = handle(app);
constant OPTIONS (line 27) | const OPTIONS = handle(app);
constant PUT (line 28) | const PUT = handle(app);
FILE: apps/web/app/api/bookmarks/export/route.tsx
function GET (line 23) | async function GET(request: NextRequest) {
FILE: apps/web/app/check-email/page.tsx
function CheckEmailPage (line 20) | function CheckEmailPage() {
FILE: apps/web/app/dashboard/@modal/(.)preview/[bookmarkId]/page.tsx
function BookmarkPreviewPage (line 14) | function BookmarkPreviewPage(props: {
FILE: apps/web/app/dashboard/@modal/[...catchAll]/page.tsx
function CatchAll (line 1) | function CatchAll() {
FILE: apps/web/app/dashboard/@modal/default.tsx
function Default (line 1) | function Default() {
FILE: apps/web/app/dashboard/archive/page.tsx
function generateMetadata (line 6) | async function generateMetadata(): Promise<Metadata> {
function header (line 14) | function header() {
function ArchivedBookmarkPage (line 25) | async function ArchivedBookmarkPage() {
FILE: apps/web/app/dashboard/bookmarks/page.tsx
function BookmarksPage (line 4) | async function BookmarksPage() {
FILE: apps/web/app/dashboard/cleanups/page.tsx
function Cleanups (line 6) | async function Cleanups() {
FILE: apps/web/app/dashboard/error.tsx
function Error (line 5) | function Error() {
FILE: apps/web/app/dashboard/favourites/page.tsx
function generateMetadata (line 5) | async function generateMetadata(): Promise<Metadata> {
function FavouritesBookmarkPage (line 13) | async function FavouritesBookmarkPage() {
FILE: apps/web/app/dashboard/feeds/[feedId]/page.tsx
function FeedPage (line 6) | async function FeedPage(props: {
FILE: apps/web/app/dashboard/highlights/page.tsx
function generateMetadata (line 7) | async function generateMetadata(): Promise<Metadata> {
function HighlightsPage (line 15) | async function HighlightsPage() {
FILE: apps/web/app/dashboard/layout.tsx
function Dashboard (line 25) | async function Dashboard({
FILE: apps/web/app/dashboard/lists/[listId]/page.tsx
function generateMetadata (line 10) | async function generateMetadata(props: {
function ListPage (line 27) | async function ListPage(props: {
FILE: apps/web/app/dashboard/lists/page.tsx
function ListsPage (line 9) | async function ListsPage() {
FILE: apps/web/app/dashboard/not-found.tsx
function NotFound (line 7) | function NotFound() {
FILE: apps/web/app/dashboard/preview/[bookmarkId]/page.tsx
function BookmarkPreviewPage (line 6) | async function BookmarkPreviewPage(props: {
FILE: apps/web/app/dashboard/search/page.tsx
function SearchComp (line 10) | function SearchComp() {
function SearchPage (line 44) | function SearchPage() {
FILE: apps/web/app/dashboard/tags/[tagId]/page.tsx
function generateMetadata (line 11) | async function generateMetadata(props: {
function TagPage (line 28) | async function TagPage(props: {
FILE: apps/web/app/dashboard/tags/page.tsx
function generateMetadata (line 5) | async function generateMetadata(): Promise<Metadata> {
function TagsPage (line 13) | async function TagsPage() {
FILE: apps/web/app/forgot-password/page.tsx
function ForgotPasswordPage (line 6) | async function ForgotPasswordPage() {
FILE: apps/web/app/invite/[token]/page.tsx
type InvitePageProps (line 6) | interface InvitePageProps {
function InvitePage (line 12) | async function InvitePage({ params }: InvitePageProps) {
FILE: apps/web/app/layout.tsx
function RootLayout (line 48) | async function RootLayout({
FILE: apps/web/app/logout/page.tsx
function Logout (line 9) | function Logout() {
FILE: apps/web/app/page.tsx
function Home (line 4) | async function Home() {
FILE: apps/web/app/public/layout.tsx
function PublicLayout (line 1) | function PublicLayout({
FILE: apps/web/app/public/lists/[listId]/not-found.tsx
function PublicListPageNotFound (line 3) | function PublicListPageNotFound() {
FILE: apps/web/app/public/lists/[listId]/page.tsx
function generateMetadata (line 9) | async function generateMetadata(props: {
function PublicListPage (line 40) | async function PublicListPage(props: {
FILE: apps/web/app/reader/[bookmarkId]/page.tsx
function ReaderViewPage (line 21) | function ReaderViewPage() {
FILE: apps/web/app/reader/layout.tsx
function ReaderLayout (line 10) | async function ReaderLayout({
FILE: apps/web/app/reset-password/page.tsx
type ResetPasswordPageProps (line 6) | interface ResetPasswordPageProps {
function ResetPasswordPage (line 12) | async function ResetPasswordPage({
FILE: apps/web/app/settings/ai/page.tsx
function generateMetadata (line 5) | async function generateMetadata(): Promise<Metadata> {
function AISettingsPage (line 13) | function AISettingsPage() {
FILE: apps/web/app/settings/api-keys/page.tsx
function generateMetadata (line 7) | async function generateMetadata(): Promise<Metadata> {
function ApiKeysPage (line 15) | async function ApiKeysPage() {
FILE: apps/web/app/settings/assets/layout.tsx
function generateMetadata (line 4) | async function generateMetadata(): Promise<Metadata> {
function AssetsLayout (line 12) | function AssetsLayout({
FILE: apps/web/app/settings/assets/page.tsx
function AssetsSettingsPage (line 35) | function AssetsSettingsPage() {
FILE: apps/web/app/settings/backups/page.tsx
function BackupsPage (line 7) | function BackupsPage() {
FILE: apps/web/app/settings/broken-links/layout.tsx
function generateMetadata (line 4) | async function generateMetadata(): Promise<Metadata> {
function BrokenLinksLayout (line 12) | function BrokenLinksLayout({
FILE: apps/web/app/settings/broken-links/page.tsx
function BrokenLinksPage (line 28) | function BrokenLinksPage() {
FILE: apps/web/app/settings/feeds/page.tsx
function generateMetadata (line 5) | async function generateMetadata(): Promise<Metadata> {
function FeedSettingsPage (line 13) | function FeedSettingsPage() {
FILE: apps/web/app/settings/import/[sessionId]/page.tsx
function generateMetadata (line 5) | async function generateMetadata(): Promise<Metadata> {
function ImportSessionDetailPage (line 13) | async function ImportSessionDetailPage({
FILE: apps/web/app/settings/import/page.tsx
function generateMetadata (line 5) | async function generateMetadata(): Promise<Metadata> {
function ImportSettingsPage (line 13) | function ImportSettingsPage() {
FILE: apps/web/app/settings/info/page.tsx
function generateMetadata (line 11) | async function generateMetadata(): Promise<Metadata> {
function InfoPage (line 19) | async function InfoPage() {
FILE: apps/web/app/settings/layout.tsx
function SettingsLayout (line 114) | async function SettingsLayout({
FILE: apps/web/app/settings/page.tsx
function SettingsHomepage (line 3) | function SettingsHomepage() {
FILE: apps/web/app/settings/rules/layout.tsx
function generateMetadata (line 4) | async function generateMetadata(): Promise<Metadata> {
function RulesLayout (line 12) | function RulesLayout({
FILE: apps/web/app/settings/rules/page.tsx
function RulesSettingsPage (line 19) | function RulesSettingsPage() {
FILE: apps/web/app/settings/stats/layout.tsx
function generateMetadata (line 4) | async function generateMetadata(): Promise<Metadata> {
function StatsLayout (line 12) | function StatsLayout({
FILE: apps/web/app/settings/stats/page.tsx
type BookmarkSource (line 39) | type BookmarkSource = z.infer<typeof zBookmarkSourceSchema>;
function formatBytes (line 41) | function formatBytes(bytes: number): string {
function formatNumber (line 49) | function formatNumber(num: number): string {
function formatSourceName (line 64) | function formatSourceName(source: BookmarkSource | null): string {
function getSourceIcon (line 79) | function getSourceIcon(source: BookmarkSource | null): React.ReactNode {
function SimpleBarChart (line 103) | function SimpleBarChart({
function StatCard (line 136) | function StatCard({
function StatsPage (line 163) | function StatsPage() {
FILE: apps/web/app/settings/subscription/page.tsx
function generateMetadata (line 10) | async function generateMetadata(): Promise<Metadata> {
function SubscriptionPage (line 18) | async function SubscriptionPage() {
FILE: apps/web/app/settings/webhooks/page.tsx
function generateMetadata (line 5) | async function generateMetadata(): Promise<Metadata> {
function WebhookSettingsPage (line 13) | function WebhookSettingsPage() {
FILE: apps/web/app/signin/page.tsx
function SignInPage (line 6) | async function SignInPage() {
FILE: apps/web/app/signup/page.tsx
function SignUpPage (line 11) | async function SignUpPage({
FILE: apps/web/app/verify-email/page.tsx
function VerifyEmailPage (line 23) | function VerifyEmailPage() {
FILE: apps/web/components/DemoModeBanner.tsx
function DemoModeBanner (line 1) | function DemoModeBanner() {
FILE: apps/web/components/KarakeepIcon.tsx
function KarakeepLogo (line 3) | function KarakeepLogo({ height }: { height: number }) {
FILE: apps/web/components/admin/AddUserDialog.tsx
type AdminCreateUserSchema (line 39) | type AdminCreateUserSchema = z.infer<typeof zAdminCreateUserSchema>;
function AddUserDialog (line 41) | function AddUserDialog({
FILE: apps/web/components/admin/AdminCard.tsx
function AdminCard (line 3) | function AdminCard({
FILE: apps/web/components/admin/AdminNotices.tsx
type AdminNotice (line 12) | interface AdminNotice {
function useAdminNotices (line 18) | function useAdminNotices() {
function AdminNotices (line 28) | function AdminNotices() {
function AdminNoticeBadge (line 49) | function AdminNoticeBadge() {
FILE: apps/web/components/admin/BackgroundJobs.tsx
type JobStats (line 38) | interface JobStats {
type JobAction (line 44) | interface JobAction {
function JobStatusExplanation (line 50) | function JobStatusExplanation() {
function JobCardSkeleton (line 108) | function JobCardSkeleton() {
function JobCard (line 155) | function JobCard({
function useJobActions (line 257) | function useJobActions() {
function BackgroundJobs (line 480) | function BackgroundJobs() {
FILE: apps/web/components/admin/BasicStats.tsx
constant REPO_LATEST_RELEASE_API (line 10) | const REPO_LATEST_RELEASE_API =
constant REPO_RELEASE_PAGE (line 12) | const REPO_RELEASE_PAGE = "https://github.com/karakeep-app/karakeep/rele...
function useLatestRelease (line 14) | function useLatestRelease() {
function ReleaseInfo (line 31) | function ReleaseInfo() {
function StatsSkeleton (line 58) | function StatsSkeleton() {
function BasicStats (line 74) | function BasicStats() {
FILE: apps/web/components/admin/BookmarkDebugger.tsx
function BookmarkDebugger (line 40) | function BookmarkDebugger() {
FILE: apps/web/components/admin/CreateInviteDialog.tsx
type CreateInviteDialogProps (line 35) | interface CreateInviteDialogProps {
function CreateInviteDialog (line 39) | function CreateInviteDialog({
FILE: apps/web/components/admin/InvitesList.tsx
function InvitesList (line 28) | function InvitesList() {
FILE: apps/web/components/admin/InvitesListSkeleton.tsx
function InvitesListSkeleton (line 14) | function InvitesListSkeleton() {
FILE: apps/web/components/admin/ResetPasswordDialog.tsx
type ResetPasswordDialogProps (line 33) | interface ResetPasswordDialogProps {
type ResetPasswordSchema (line 38) | type ResetPasswordSchema = z.infer<typeof resetPasswordSchema>;
function ResetPasswordDialog (line 40) | function ResetPasswordDialog({
FILE: apps/web/components/admin/ServiceConnections.tsx
function ConnectionStatus (line 9) | function ConnectionStatus({
function ConnectionsSkeleton (line 85) | function ConnectionsSkeleton() {
function ServiceConnections (line 109) | function ServiceConnections() {
FILE: apps/web/components/admin/UpdateUserDialog.tsx
type UpdateUserSchema (line 39) | type UpdateUserSchema = z.infer<typeof updateUserSchema>;
type UpdateUserDialogProps (line 41) | interface UpdateUserDialogProps {
function UpdateUserDialog (line 48) | function UpdateUserDialog({
FILE: apps/web/components/admin/UserList.tsx
function toHumanReadableSize (line 31) | function toHumanReadableSize(size: number) {
function UsersSection (line 38) | function UsersSection() {
FILE: apps/web/components/admin/UserListSkeleton.tsx
function UserListSkeleton (line 14) | function UserListSkeleton() {
FILE: apps/web/components/dashboard/BulkBookmarksAction.tsx
constant MAX_CONCURRENT_BULK_ACTIONS (line 39) | const MAX_CONCURRENT_BULK_ACTIONS = 50;
function BulkBookmarksAction (line 41) | function BulkBookmarksAction() {
FILE: apps/web/components/dashboard/EditableText.tsx
type Props (line 13) | interface Props {
function EditMode (line 23) | function EditMode({
function ViewMode (line 94) | function ViewMode({
function EditableText (line 135) | function EditableText(props: {
FILE: apps/web/components/dashboard/ErrorFallback.tsx
function ErrorFallback (line 7) | function ErrorFallback() {
FILE: apps/web/components/dashboard/GlobalActions.tsx
function GlobalActions (line 8) | function GlobalActions() {
FILE: apps/web/components/dashboard/SortOrderToggle.tsx
function SortOrderToggle (line 16) | function SortOrderToggle() {
FILE: apps/web/components/dashboard/UploadDropzone.tsx
function useUploadAsset (line 17) | function useUploadAsset() {
function useUploadAssets (line 79) | function useUploadAssets({
function UploadDropzone (line 108) | function UploadDropzone({
FILE: apps/web/components/dashboard/ViewOptions.tsx
type LayoutType (line 49) | type LayoutType = "masonry" | "grid" | "list" | "compact";
function ViewOptions (line 58) | function ViewOptions() {
FILE: apps/web/components/dashboard/bookmarks/AssetCard.tsx
function AssetImage (line 15) | function AssetImage({
function AssetCard (line 68) | function AssetCard({
FILE: apps/web/components/dashboard/bookmarks/BookmarkActionBar.tsx
function BookmarkActionBar (line 11) | function BookmarkActionBar({
FILE: apps/web/components/dashboard/bookmarks/BookmarkCard.tsx
function BookmarkCard (line 12) | function BookmarkCard({
FILE: apps/web/components/dashboard/bookmarks/BookmarkFormattedCreatedAt.tsx
function BookmarkFormattedCreatedAt (line 3) | function BookmarkFormattedCreatedAt(prop: { createdAt: Date }) {
FILE: apps/web/components/dashboard/bookmarks/BookmarkLayoutAdaptingCard.tsx
type Props (line 47) | interface Props {
function BottomRow (line 58) | function BottomRow({
function OwnerIndicator (line 81) | function OwnerIndicator({ bookmark }: { bookmark: ZBookmark }) {
function MultiBookmarkSelector (line 118) | function MultiBookmarkSelector({ bookmark }: { bookmark: ZBookmark }) {
function DragHandle (line 172) | function DragHandle({
function HoverActionBar (line 231) | function HoverActionBar({ bookmark }: { bookmark: ZBookmark }) {
function ListView (line 286) | function ListView({
function GridView (line 343) | function GridView({
function CompactView (line 404) | function CompactView({ bookmark, title, footer, className }: Props) {
function BookmarkLayoutAdaptingCard (line 458) | function BookmarkLayoutAdaptingCard(props: Props) {
FILE: apps/web/components/dashboard/bookmarks/BookmarkMarkdownComponent.tsx
function BookmarkMarkdownComponent (line 7) | function BookmarkMarkdownComponent({
FILE: apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx
type ActionItem (line 60) | interface ActionItem {
type SubsectionItem (line 70) | interface SubsectionItem {
type ActionItemType (line 81) | type ActionItemType = ActionItem | SubsectionItem;
function isSubsectionItem (line 83) | function isSubsectionItem(item: ActionItemType): item is SubsectionItem {
function BookmarkOptions (line 87) | function BookmarkOptions({ bookmark }: { bookmark: ZBookmark }) {
FILE: apps/web/components/dashboard/bookmarks/BookmarkOwnerIcon.tsx
type BookmarkOwnerIconProps (line 8) | interface BookmarkOwnerIconProps {
function BookmarkOwnerIcon (line 13) | function BookmarkOwnerIcon({
FILE: apps/web/components/dashboard/bookmarks/BookmarkTagsEditor.tsx
function BookmarkTagsEditor (line 8) | function BookmarkTagsEditor({
FILE: apps/web/components/dashboard/bookmarks/BookmarkedTextEditor.tsx
function BookmarkedTextEditor (line 11) | function BookmarkedTextEditor({
FILE: apps/web/components/dashboard/bookmarks/Bookmarks.tsx
function Bookmarks (line 10) | async function Bookmarks({
FILE: apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx
function StyledBookmarkCard (line 25) | function StyledBookmarkCard({ children }: { children: React.ReactNode }) {
function getBreakpointConfig (line 33) | function getBreakpointConfig(userColumns: number) {
function BookmarksGrid (line 51) | function BookmarksGrid({
FILE: apps/web/components/dashboard/bookmarks/BookmarksGridSkeleton.tsx
function getBreakpointConfig (line 14) | function getBreakpointConfig(userColumns: number) {
function BookmarkCardSkeleton (line 31) | function BookmarkCardSkeleton({ height }: { height: string }) {
function BookmarksGridSkeleton (line 46) | function BookmarksGridSkeleton({
FILE: apps/web/components/dashboard/bookmarks/BulkManageListsModal.tsx
function BulkManageListsModal (line 28) | function BulkManageListsModal({
FILE: apps/web/components/dashboard/bookmarks/BulkTagModal.tsx
function BulkTagModal (line 20) | function BulkTagModal({
FILE: apps/web/components/dashboard/bookmarks/DeleteBookmarkConfirmationDialog.tsx
function DeleteBookmarkConfirmationDialog (line 10) | function DeleteBookmarkConfirmationDialog({
FILE: apps/web/components/dashboard/bookmarks/EditBookmarkDialog.tsx
function EditBookmarkDialog (line 53) | function EditBookmarkDialog({
FILE: apps/web/components/dashboard/bookmarks/EditorCard.tsx
type MultiUrlImportState (line 28) | interface MultiUrlImportState {
function EditorCard (line 33) | function EditorCard({ className }: { className?: string }) {
FILE: apps/web/components/dashboard/bookmarks/FooterLinkURL.tsx
function FooterLinkURL (line 3) | function FooterLinkURL({ url }: { url: string | null }) {
FILE: apps/web/components/dashboard/bookmarks/LinkCard.tsx
function LinkTitle (line 32) | function LinkTitle({ bookmark }: { bookmark: ZBookmarkTypeLink }) {
function LinkImage (line 42) | function LinkImage({
function LinkCard (line 90) | function LinkCard({
FILE: apps/web/components/dashboard/bookmarks/ManageListsModal.tsx
function ManageListsModal (line 38) | function ManageListsModal({
function useManageListsModal (line 222) | function useManageListsModal(bookmarkId: string) {
FILE: apps/web/components/dashboard/bookmarks/NoBookmarksBanner.tsx
function NoBookmarksBanner (line 6) | function NoBookmarksBanner() {
FILE: apps/web/components/dashboard/bookmarks/NotePreview.tsx
type NotePreviewProps (line 15) | interface NotePreviewProps {
function NotePreview (line 21) | function NotePreview({ note, bookmarkId, className }: NotePreviewProps) {
FILE: apps/web/components/dashboard/bookmarks/SummarizeBookmarkArea.tsx
function AISummary (line 17) | function AISummary({
function SummarizeBookmarkArea (line 103) | function SummarizeBookmarkArea({
FILE: apps/web/components/dashboard/bookmarks/TagList.tsx
function TagList (line 9) | function TagList({
FILE: apps/web/components/dashboard/bookmarks/TagModal.tsx
function TagModal (line 17) | function TagModal({
function useTagModel (line 46) | function useTagModel(bookmark: ZBookmark) {
FILE: apps/web/components/dashboard/bookmarks/TagsEditor.tsx
function TagsEditor (line 25) | function TagsEditor({
FILE: apps/web/components/dashboard/bookmarks/TextCard.tsx
function TextCard (line 16) | function TextCard({
FILE: apps/web/components/dashboard/bookmarks/UnknownCard.tsx
function UnknownCard (line 10) | function UnknownCard({
FILE: apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx
function UpdatableBookmarksGrid (line 17) | function UpdatableBookmarksGrid({
FILE: apps/web/components/dashboard/bookmarks/action-buttons/ArchiveBookmarkButton.tsx
type ArchiveBookmarkButtonProps (line 9) | interface ArchiveBookmarkButtonProps extends Omit<
FILE: apps/web/components/dashboard/bookmarks/icons.tsx
function FavouritedActionIcon (line 3) | function FavouritedActionIcon({
function ArchivedActionIcon (line 27) | function ArchivedActionIcon({
FILE: apps/web/components/dashboard/cleanups/TagDuplicationDetention.tsx
type Suggestion (line 33) | interface Suggestion {
function normalizeTag (line 38) | function normalizeTag(tag: string) {
function updateMergeInto (line 45) | function updateMergeInto(suggestion: Suggestion, newMergeIntoId: string) {
function deleteSuggestion (line 53) | function deleteSuggestion(suggestion: Suggestion) {
function ApplyAllButton (line 60) | function ApplyAllButton({ suggestions }: { suggestions: Suggestion[] }) {
function SuggestionRow (line 118) | function SuggestionRow({
function TagDuplicationDetection (line 202) | function TagDuplicationDetection() {
FILE: apps/web/components/dashboard/feeds/FeedSelector.tsx
function FeedSelector (line 15) | function FeedSelector({
FILE: apps/web/components/dashboard/header/Header.tsx
function Header (line 9) | async function Header() {
FILE: apps/web/components/dashboard/header/ProfileOptions.tsx
function DarkModeToggle (line 35) | function DarkModeToggle() {
function SidebarProfileOptions (line 56) | function SidebarProfileOptions() {
FILE: apps/web/components/dashboard/highlights/AllHighlights.tsx
function Highlight (line 23) | function Highlight({ highlight }: { highlight: ZHighlight }) {
function AllHighlights (line 44) | function AllHighlights({
FILE: apps/web/components/dashboard/highlights/HighlightCard.tsx
function HighlightCard (line 11) | function HighlightCard({
FILE: apps/web/components/dashboard/lists/AllListsView.tsx
function ListItem (line 23) | function ListItem({
function AllListsView (line 69) | function AllListsView({
FILE: apps/web/components/dashboard/lists/BookmarkListSelector.tsx
function BookmarkListSelector (line 23) | function BookmarkListSelector({
FILE: apps/web/components/dashboard/lists/CollapsibleBookmarkLists.tsx
type RenderFunc (line 11) | type RenderFunc = (params: {
type IsOpenFunc (line 19) | type IsOpenFunc = (list: ZBookmarkListTreeNode) => boolean;
function ListItem (line 21) | function ListItem({
function CollapsibleBookmarkLists (line 82) | function CollapsibleBookmarkLists({
FILE: apps/web/components/dashboard/lists/DeleteListConfirmationDialog.tsx
function DeleteListConfirmationDialog (line 13) | function DeleteListConfirmationDialog({
FILE: apps/web/components/dashboard/lists/EditListModal.tsx
function EditListModal (line 61) | function EditListModal({
FILE: apps/web/components/dashboard/lists/LeaveListConfirmationDialog.tsx
function LeaveListConfirmationDialog (line 12) | function LeaveListConfirmationDialog({
FILE: apps/web/components/dashboard/lists/ListHeader.tsx
function ListHeader (line 23) | function ListHeader({
FILE: apps/web/components/dashboard/lists/ListOptions.tsx
function ListOptions (line 31) | function ListOptions({
FILE: apps/web/components/dashboard/lists/ManageCollaboratorsModal.tsx
function ManageCollaboratorsModal (line 34) | function ManageCollaboratorsModal({
FILE: apps/web/components/dashboard/lists/MergeListModal.tsx
function MergeListModal (line 35) | function MergeListModal({
FILE: apps/web/components/dashboard/lists/PendingInvitationsCard.tsx
type Invitation (line 18) | interface Invitation {
function InvitationRow (line 31) | function InvitationRow({ invitation }: { invitation: Invitation }) {
function PendingInvitationsCard (line 140) | function PendingInvitationsCard() {
FILE: apps/web/components/dashboard/lists/PublicListLink.tsx
function PublicListLink (line 13) | function PublicListLink({ list }: { list: ZBookmarkList }) {
FILE: apps/web/components/dashboard/lists/RssLink.tsx
function RssLink (line 16) | function RssLink({ listId }: { listId: string }) {
FILE: apps/web/components/dashboard/lists/ShareListModal.tsx
function ShareListModal (line 20) | function ShareListModal({
FILE: apps/web/components/dashboard/preview/ActionBar.tsx
function ActionBar (line 20) | function ActionBar({ bookmark }: { bookmark: ZBookmark }) {
FILE: apps/web/components/dashboard/preview/AssetContentSection.tsx
constant BIG_FILE_SIZE (line 18) | const BIG_FILE_SIZE = 20 * 1024 * 1024;
function PDFContentSection (line 20) | function PDFContentSection({ bookmark }: { bookmark: ZBookmark }) {
function ImageContentSection (line 87) | function ImageContentSection({ bookmark }: { bookmark: ZBookmark }) {
function AssetContentSection (line 105) | function AssetContentSection({ bookmark }: { bookmark: ZBookmark }) {
FILE: apps/web/components/dashboard/preview/AttachmentBox.tsx
function AttachmentBox (line 37) | function AttachmentBox({
FILE: apps/web/components/dashboard/preview/BookmarkPreview.tsx
function ContentLoading (line 47) | function ContentLoading() {
function CreationTime (line 59) | function CreationTime({ createdAt }: { createdAt: Date }) {
function BookmarkMetadata (line 75) | function BookmarkMetadata({ bookmark }: { bookmark: ZBookmark }) {
function PublishedDate (line 105) | function PublishedDate({ datePublished }: { datePublished: Date }) {
function BookmarkPreview (line 122) | function BookmarkPreview({
FILE: apps/web/components/dashboard/preview/HighlightsBox.tsx
function HighlightsBox (line 16) | function HighlightsBox({
FILE: apps/web/components/dashboard/preview/LinkContentSection.tsx
function CustomRendererErrorFallback (line 45) | function CustomRendererErrorFallback({ error }: { error: Error }) {
function FullPageArchiveSection (line 65) | function FullPageArchiveSection({ link }: { link: ZBookmarkedLink }) {
function ScreenshotSection (line 78) | function ScreenshotSection({ link }: { link: ZBookmarkedLink }) {
function VideoSection (line 93) | function VideoSection({ link }: { link: ZBookmarkedLink }) {
function PDFSection (line 107) | function PDFSection({ link }: { link: ZBookmarkedLink }) {
function LinkContentSection (line 117) | function LinkContentSection({
FILE: apps/web/components/dashboard/preview/NoteEditor.tsx
function NoteEditor (line 8) | function NoteEditor({
FILE: apps/web/components/dashboard/preview/ReaderSettingsPopover.tsx
type ReaderSettingsPopoverProps (line 43) | interface ReaderSettingsPopoverProps {
function ReaderSettingsPopover (line 49) | function ReaderSettingsPopover({
FILE: apps/web/components/dashboard/preview/ReaderView.tsx
function ReaderView (line 20) | function ReaderView({
FILE: apps/web/components/dashboard/preview/ReadingProgressBanner.tsx
function ReadingProgressBanner (line 6) | function ReadingProgressBanner({
FILE: apps/web/components/dashboard/preview/TextContentSection.tsx
function TextContentSection (line 9) | function TextContentSection({ bookmark }: { bookmark: ZBookmark }) {
FILE: apps/web/components/dashboard/preview/content-renderers/AmazonRenderer.tsx
function extractAmazonProductInfo (line 7) | function extractAmazonProductInfo(
function canRenderAmazon (line 34) | function canRenderAmazon(bookmark: ZBookmark): boolean {
function AmazonRendererComponent (line 43) | function AmazonRendererComponent({ bookmark }: { bookmark: ZBookmark }) {
FILE: apps/web/components/dashboard/preview/content-renderers/TikTokRenderer.tsx
function extractTikTokVideoId (line 7) | function extractTikTokVideoId(url: string): string | null {
function canRenderTikTok (line 24) | function canRenderTikTok(bookmark: ZBookmark): boolean {
function TikTokRendererComponent (line 33) | function TikTokRendererComponent({ bookmark }: { bookmark: ZBookmark }) {
FILE: apps/web/components/dashboard/preview/content-renderers/XRenderer.tsx
function extractTweetId (line 8) | function extractTweetId(url: string): string | null {
function canRenderX (line 23) | function canRenderX(bookmark: ZBookmark): boolean {
function XRendererComponent (line 32) | function XRendererComponent({ bookmark }: { bookmark: ZBookmark }) {
FILE: apps/web/components/dashboard/preview/content-renderers/YouTubeRenderer.tsx
function extractYouTubeVideoId (line 7) | function extractYouTubeVideoId(url: string): string | null {
function canRenderYouTube (line 23) | function canRenderYouTube(bookmark: ZBookmark): boolean {
function YouTubeRendererComponent (line 32) | function YouTubeRendererComponent({ bookmark }: { bookmark: ZBookmark }) {
FILE: apps/web/components/dashboard/preview/content-renderers/registry.ts
class ContentRendererRegistryImpl (line 5) | class ContentRendererRegistryImpl implements ContentRendererRegistry {
method register (line 11) | register(renderer: ContentRenderer): void {
method getRenderers (line 15) | getRenderers(bookmark: ZBookmark): ContentRenderer[] {
method getAllRenderers (line 21) | getAllRenderers(): ContentRenderer[] {
FILE: apps/web/components/dashboard/preview/content-renderers/types.ts
type ContentRenderer (line 3) | interface ContentRenderer {
type ContentRendererRegistry (line 12) | interface ContentRendererRegistry {
FILE: apps/web/components/dashboard/rules/RuleEngineActionBuilder.tsx
type ActionBuilderProps (line 26) | interface ActionBuilderProps {
function ActionBuilder (line 31) | function ActionBuilder({ value, onChange }: ActionBuilderProps) {
FILE: apps/web/components/dashboard/rules/RuleEngineConditionBuilder.tsx
type ConditionBuilderProps (line 41) | interface ConditionBuilderProps {
function ConditionBuilder (line 49) | function ConditionBuilder({
FILE: apps/web/components/dashboard/rules/RuleEngineEventSelector.tsx
type EventSelectorProps (line 16) | interface EventSelectorProps {
function EventSelector (line 21) | function EventSelector({ value, onChange }: EventSelectorProps) {
FILE: apps/web/components/dashboard/rules/RuleEngineRuleEditor.tsx
type RuleEditorProps (line 27) | interface RuleEditorProps {
function RuleEditor (line 32) | function RuleEditor({ rule, onCancel }: RuleEditorProps) {
FILE: apps/web/components/dashboard/rules/RuleEngineRuleList.tsx
function RuleList (line 17) | function RuleList({
function formatEventType (line 143) | function formatEventType(type: string): string {
FILE: apps/web/components/dashboard/search/QueryExplainerTooltip.tsx
function QueryExplainerTooltip (line 9) | function QueryExplainerTooltip({
FILE: apps/web/components/dashboard/search/SearchInput.tsx
function useFocusSearchOnKeyPress (line 34) | function useFocusSearchOnKeyPress(
FILE: apps/web/components/dashboard/search/useSearchAutocomplete.ts
constant MAX_DISPLAY_SUGGESTIONS (line 21) | const MAX_DISPLAY_SUGGESTIONS = 5;
type SearchTranslationKey (line 23) | type SearchTranslationKey = `search.${keyof typeof translation.search}`;
type QualifierDefinition (line 25) | interface QualifierDefinition {
constant QUALIFIER_DEFINITIONS (line 32) | const QUALIFIER_DEFINITIONS = [
type AutocompleteSuggestionItem (line 109) | interface AutocompleteSuggestionItem {
type HistorySuggestionItem (line 119) | interface HistorySuggestionItem {
type SuggestionItem (line 127) | type SuggestionItem = AutocompleteSuggestionItem | HistorySuggestionItem;
type SuggestionGroup (line 129) | interface SuggestionGroup {
type ParsedSearchState (line 151) | interface ParsedSearchState {
type UseSearchAutocompleteParams (line 159) | interface UseSearchAutocompleteParams {
constant SOURCE_VALUES (line 417) | const SOURCE_VALUES = zBookmarkSourceSchema.options;
FILE: apps/web/components/dashboard/sidebar/AllLists.tsx
function useDropTarget (line 32) | function useDropTarget(listId: string, listName: string) {
function DroppableListSidebarItem (line 91) | function DroppableListSidebarItem({
function AllLists (line 172) | function AllLists({
FILE: apps/web/components/dashboard/sidebar/InvitationNotificationBadge.tsx
function InvitationNotificationBadge (line 7) | function InvitationNotificationBadge() {
FILE: apps/web/components/dashboard/tags/AllTagsView.tsx
function DeleteAllUnusedTags (line 46) | function DeleteAllUnusedTags({ numUnusedTags }: { numUnusedTags: number ...
function AllTagsView (line 82) | function AllTagsView() {
FILE: apps/web/components/dashboard/tags/BulkTagAction.tsx
constant MAX_CONCURRENT_BULK_ACTIONS (line 16) | const MAX_CONCURRENT_BULK_ACTIONS = 50;
function BulkTagAction (line 18) | function BulkTagAction() {
FILE: apps/web/components/dashboard/tags/CreateTagModal.tsx
function CreateTagModal (line 38) | function CreateTagModal() {
FILE: apps/web/components/dashboard/tags/DeleteTagConfirmationDialog.tsx
function DeleteTagConfirmationDialog (line 8) | function DeleteTagConfirmationDialog({
FILE: apps/web/components/dashboard/tags/EditableTagName.tsx
function EditableTagName (line 11) | function EditableTagName({
FILE: apps/web/components/dashboard/tags/MergeTagModal.tsx
function MergeTagModal (line 30) | function MergeTagModal({
FILE: apps/web/components/dashboard/tags/TagAutocomplete.tsx
type TagAutocompleteProps (line 25) | interface TagAutocompleteProps {
function TagAutocomplete (line 31) | function TagAutocomplete({
FILE: apps/web/components/dashboard/tags/TagOptions.tsx
function TagOptions (line 17) | function TagOptions({
FILE: apps/web/components/invite/InviteAcceptForm.tsx
type InviteAcceptFormProps (line 47) | interface InviteAcceptFormProps {
function InviteAcceptForm (line 51) | function InviteAcceptForm({ token }: InviteAcceptFormProps) {
FILE: apps/web/components/public/lists/PublicBookmarkGrid.tsx
function TagPill (line 27) | function TagPill({ tag }: { tag: string }) {
function BookmarkCard (line 41) | function BookmarkCard({ bookmark }: { bookmark: ZPublicBookmark }) {
function getBreakpointConfig (line 175) | function getBreakpointConfig() {
function PublicBookmarkGrid (line 187) | function PublicBookmarkGrid({
FILE: apps/web/components/public/lists/PublicListHeader.tsx
function PublicListHeader (line 6) | function PublicListHeader({
FILE: apps/web/components/settings/AISettings.tsx
function AIPreferences (line 64) | function AIPreferences() {
function TagStyleSelector (line 219) | function TagStyleSelector() {
function CuratedTagsSelector (line 321) | function CuratedTagsSelector() {
function PromptEditor (line 457) | function PromptEditor() {
function PromptRow (line 560) | function PromptRow({ prompt }: { prompt: ZPrompt }) {
function TaggingRules (line 696) | function TaggingRules() {
function expandTagPlaceholders (line 733) | function expandTagPlaceholders(
function hasTagPlaceholder (line 755) | function hasTagPlaceholder(texts: string[]): boolean {
function PromptDemo (line 762) | function PromptDemo() {
function AISettings (line 875) | function AISettings() {
FILE: apps/web/components/settings/AddApiKey.tsx
function AddApiKeyForm (line 39) | function AddApiKeyForm({ onSuccess }: { onSuccess: (key: string) => void...
function AddApiKey (line 114) | function AddApiKey() {
FILE: apps/web/components/settings/ApiKeySettings.tsx
function ApiKeys (line 17) | async function ApiKeys() {
FILE: apps/web/components/settings/ApiKeySuccess.tsx
function ApiKeySuccess (line 4) | function ApiKeySuccess({
FILE: apps/web/components/settings/BackupSettings.tsx
function BackupConfigurationForm (line 60) | function BackupConfigurationForm() {
function BackupRow (line 208) | function BackupRow({ backup }: { backup: z.infer<typeof zBackupSchema> }) {
function BackupsList (line 333) | function BackupsList() {
function BackupSettings (line 415) | function BackupSettings() {
FILE: apps/web/components/settings/ChangePassword.tsx
function ChangePassword (line 28) | function ChangePassword() {
FILE: apps/web/components/settings/DeleteAccount.tsx
function DeleteAccount (line 37) | function DeleteAccount() {
FILE: apps/web/components/settings/DeleteApiKey.tsx
function DeleteApiKey (line 14) | function DeleteApiKey({
FILE: apps/web/components/settings/FeedSettings.tsx
function FeedsEditorDialog (line 65) | function FeedsEditorDialog() {
function EditFeedDialog (line 197) | function EditFeedDialog({ feed }: { feed: ZFeed }) {
function FeedRow (line 347) | function FeedRow({ feed }: { feed: ZFeed }) {
function FeedSettings (line 469) | function FeedSettings() {
FILE: apps/web/components/settings/ImportExport.tsx
function ImportCard (line 26) | function ImportCard({
function ExportButton (line 51) | function ExportButton() {
function ImportExportRow (line 134) | function ImportExportRow() {
function ImportExport (line 330) | function ImportExport() {
FILE: apps/web/components/settings/ImportSessionCard.tsx
type ImportSessionCardProps (line 36) | interface ImportSessionCardProps {
function getStatusColor (line 40) | function getStatusColor(status: string) {
function getStatusIcon (line 59) | function getStatusIcon(status: string) {
function ImportSessionCard (line 78) | function ImportSessionCard({ session }: ImportSessionCardProps) {
FILE: apps/web/components/settings/ImportSessionDetail.tsx
type FilterType (line 50) | type FilterType =
type SimpleTFunction (line 57) | type SimpleTFunction = (
type ImportSessionResultItem (line 62) | interface ImportSessionResultItem {
function getStatusColor (line 74) | function getStatusColor(status: string) {
function getStatusIcon (line 93) | function getStatusIcon(status: string) {
function getResultBadge (line 112) | function getResultBadge(
function getTypeIcon (line 178) | function getTypeIcon(type: string) {
function getTypeLabel (line 191) | function getTypeLabel(type: string, t: SimpleTFunction) {
function getTitleDisplay (line 204) | function getTitleDisplay(
function ImportSessionDetail (line 233) | function ImportSessionDetail({
FILE: apps/web/components/settings/ImportSessionsSection.tsx
function ImportSessionsSection (line 12) | function ImportSessionsSection() {
FILE: apps/web/components/settings/ReaderSettings.tsx
function ReaderSettings (line 42) | function ReaderSettings() {
FILE: apps/web/components/settings/RegenerateApiKey.tsx
function RegenerateApiKey (line 26) | function RegenerateApiKey({
FILE: apps/web/components/settings/SettingsPage.tsx
function SettingsPage (line 11) | function SettingsPage({
function SettingsSection (line 38) | function SettingsSection({
FILE: apps/web/components/settings/SubscriptionSettings.tsx
function SubscriptionSettings (line 17) | function SubscriptionSettings() {
FILE: apps/web/components/settings/UserAvatar.tsx
function UserAvatar (line 21) | function UserAvatar() {
FILE: apps/web/components/settings/UserDetails.tsx
function UserDetails (line 9) | async function UserDetails() {
FILE: apps/web/components/settings/UserOptions.tsx
function UserOptions (line 56) | function UserOptions() {
FILE: apps/web/components/settings/WebhookEventSelector.tsx
function WebhookEventSelector (line 22) | function WebhookEventSelector({
FILE: apps/web/components/settings/WebhookSettings.tsx
function WebhooksEditorDialog (line 60) | function WebhooksEditorDialog() {
function EditWebhookDialog (line 185) | function EditWebhookDialog({ webhook }: { webhook: ZWebhook }) {
function EditTokenDialog (line 310) | function EditTokenDialog({ webhook }: { webhook: ZWebhook }) {
function WebhookRow (line 442) | function WebhookRow({ webhook }: { webhook: ZWebhook }) {
function WebhookSettings (line 491) | function WebhookSettings() {
FILE: apps/web/components/shared/sidebar/MobileSidebar.tsx
function MobileSidebar (line 7) | async function MobileSidebar({
FILE: apps/web/components/shared/sidebar/ModileSidebarItem.tsx
function MobileSidebarItem (line 8) | function MobileSidebarItem({
FILE: apps/web/components/shared/sidebar/Sidebar.tsx
function Sidebar (line 10) | async function Sidebar({
FILE: apps/web/components/shared/sidebar/SidebarItem.tsx
function SidebarItem (line 8) | function SidebarItem({
FILE: apps/web/components/shared/sidebar/SidebarLayout.tsx
function SidebarLayout (line 12) | function SidebarLayout({
FILE: apps/web/components/shared/sidebar/SidebarVersion.tsx
constant GITHUB_OWNER_REPO (line 20) | const GITHUB_OWNER_REPO = "karakeep-app/karakeep";
constant GITHUB_REPO_URL (line 21) | const GITHUB_REPO_URL = `https://github.com/${GITHUB_OWNER_REPO}`;
constant GITHUB_RELEASE_URL (line 22) | const GITHUB_RELEASE_URL = `${GITHUB_REPO_URL}/releases/tag/`;
constant RELEASE_API_URL (line 23) | const RELEASE_API_URL = `https://api.github.com/repos/${GITHUB_OWNER_REP...
constant LOCAL_STORAGE_KEY (line 24) | const LOCAL_STORAGE_KEY = "karakeep:whats-new:last-seen-version";
constant RELEASE_NOTES_STALE_TIME (line 25) | const RELEASE_NOTES_STALE_TIME = 1000 * 60 * 10;
function isStableRelease (line 33) | function isStableRelease(version?: string) {
type SidebarVersionProps (line 48) | interface SidebarVersionProps {
function SidebarVersion (line 55) | function SidebarVersion({
FILE: apps/web/components/shared/sidebar/TSidebarItem.ts
type TSidebarItem (line 1) | interface TSidebarItem {
FILE: apps/web/components/signin/CredentialsForm.tsx
constant SIGNIN_FAILED (line 29) | const SIGNIN_FAILED = "Incorrect email or password";
constant OAUTH_FAILED (line 30) | const OAUTH_FAILED = "OAuth login failed: ";
constant VERIFY_EMAIL_ERROR (line 32) | const VERIFY_EMAIL_ERROR = "Please verify your email address before sign...
function CredentialsForm (line 34) | function CredentialsForm() {
FILE: apps/web/components/signin/ForgotPasswordForm.tsx
function ForgotPasswordForm (line 36) | function ForgotPasswordForm() {
FILE: apps/web/components/signin/OAuthAutoRedirect.tsx
function OAuthAutoRedirect (line 8) | function OAuthAutoRedirect({
FILE: apps/web/components/signin/ResetPasswordForm.tsx
type ResetPasswordFormProps (line 43) | interface ResetPasswordFormProps {
function ResetPasswordForm (line 47) | function ResetPasswordForm({ token }: ResetPasswordFormProps) {
FILE: apps/web/components/signin/SignInForm.tsx
function SignInForm (line 18) | async function SignInForm() {
FILE: apps/web/components/signin/SignInProviderButton.tsx
function SignInProviderButton (line 6) | function SignInProviderButton({
FILE: apps/web/components/signup/SignUpForm.tsx
constant VERIFY_EMAIL_ERROR (line 40) | const VERIFY_EMAIL_ERROR = "Please verify your email address before sign...
type SignUpFormProps (line 42) | interface SignUpFormProps {
function SignUpForm (line 46) | function SignUpForm({ redirectUrl }: SignUpFormProps) {
FILE: apps/web/components/subscription/QuotaProgress.tsx
function formatBytes (line 18) | function formatBytes(bytes: number): string {
function formatNumber (line 26) | function formatNumber(num: number): string {
type QuotaProgressItemProps (line 36) | interface QuotaProgressItemProps {
function QuotaProgressItem (line 46) | function QuotaProgressItem({
function QuotaProgress (line 114) | function QuotaProgress() {
FILE: apps/web/components/theme-provider.tsx
function ThemeProvider (line 7) | function ThemeProvider({ children, ...props }: ThemeProviderProps) {
function useToggleTheme (line 15) | function useToggleTheme() {
FILE: apps/web/components/ui/action-button.tsx
type ActionButtonProps (line 14) | interface ActionButtonProps extends ButtonProps {
FILE: apps/web/components/ui/action-confirming-dialog.tsx
function ActionConfirmingDialog (line 15) | function ActionConfirmingDialog({
FILE: apps/web/components/ui/back-button.tsx
function BackButton (line 8) | function BackButton({ ...props }: ButtonProps) {
FILE: apps/web/components/ui/badge.tsx
type BadgeProps (line 26) | interface BadgeProps
function Badge (line 31) | function Badge({ className, variant, ...props }: BadgeProps) {
FILE: apps/web/components/ui/calendar.tsx
function Calendar (line 13) | function Calendar({
function CalendarDayButton (line 171) | function CalendarDayButton({
FILE: apps/web/components/ui/collapsible.tsx
function CollapsibleTriggerTriangle (line 13) | function CollapsibleTriggerTriangle({
function CollapsibleTriggerChevron (line 33) | function CollapsibleTriggerChevron({
FILE: apps/web/components/ui/copy-button.tsx
function CopyBtn (line 8) | function CopyBtn({
function CopyBtnV2 (line 43) | function CopyBtnV2({
FILE: apps/web/components/ui/field.tsx
function FieldSet (line 10) | function FieldSet({ className, ...props }: React.ComponentProps<"fieldse...
function FieldLegend (line 24) | function FieldLegend({
function FieldGroup (line 44) | function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {
function Field (line 81) | function Field({
function FieldContent (line 97) | function FieldContent({ className, ...props }: React.ComponentProps<"div...
function FieldLabel (line 110) | function FieldLabel({
function FieldTitle (line 128) | function FieldTitle({ className, ...props }: React.ComponentProps<"div">) {
function FieldDescription (line 141) | function FieldDescription({ className, ...props }: React.ComponentProps<...
function FieldSeparator (line 156) | function FieldSeparator({
function FieldError (line 186) | function FieldError({
FILE: apps/web/components/ui/file-picker-button.tsx
type FilePickerButtonProps (line 5) | interface FilePickerButtonProps extends Omit<ActionButtonProps, "onClick...
FILE: apps/web/components/ui/form.tsx
type FormFieldContextValue (line 11) | interface FormFieldContextValue<
type FormItemContextValue (line 58) | interface FormItemContextValue {
FILE: apps/web/components/ui/full-page-spinner.tsx
function FullPageSpinner (line 3) | function FullPageSpinner() {
FILE: apps/web/components/ui/info-tooltip.tsx
function InfoTooltip (line 9) | function InfoTooltip({
FILE: apps/web/components/ui/input.tsx
type InputProps (line 4) | interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
FILE: apps/web/components/ui/kbd.tsx
function Kbd (line 3) | function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
function KbdGroup (line 18) | function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {
FILE: apps/web/components/ui/markdown/markdown-editor.tsx
function onError (line 34) | function onError(error: Error) {
constant EDITOR_NODES (line 38) | const EDITOR_NODES = [
type MarkdownEditorProps (line 49) | interface MarkdownEditorProps {
FILE: apps/web/components/ui/markdown/markdown-readonly.tsx
function PreWithCopyBtn (line 10) | function PreWithCopyBtn({ className, ...props }: React.ComponentProps<"p...
function MarkdownReadonly (line 25) | function MarkdownReadonly({
FILE: apps/web/components/ui/markdown/plugins/toolbar-plugin.tsx
function MarkdownToolTip (line 39) | function MarkdownToolTip() {
function ToolbarPlugin (line 122) | function ToolbarPlugin({
FILE: apps/web/components/ui/multiple-choice-dialog.tsx
function MultipleChoiceDialog (line 11) | function MultipleChoiceDialog({
FILE: apps/web/components/ui/skeleton.tsx
function Skeleton (line 3) | function Skeleton({
FILE: apps/web/components/ui/sonner.tsx
type ToasterProps (line 13) | type ToasterProps = React.ComponentProps<typeof Sonner>;
FILE: apps/web/components/ui/spinner.tsx
function LoadingSpinner (line 3) | function LoadingSpinner({ className }: { className?: string }) {
FILE: apps/web/components/ui/toast.tsx
type ToastProps (line 113) | type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
type ToastActionElement (line 115) | type ToastActionElement = React.ReactElement<typeof ToastAction>;
FILE: apps/web/components/ui/user-avatar.tsx
type UserAvatarProps (line 9) | interface UserAvatarProps {
function UserAvatar (line 21) | function UserAvatar({
FILE: apps/web/components/utils/BookmarkAlreadyExistsToast.tsx
function BookmarkAlreadyExistsToast (line 4) | function BookmarkAlreadyExistsToast({
FILE: apps/web/components/utils/ValidAccountCheck.tsx
function ValidAccountCheck (line 13) | function ValidAccountCheck() {
FILE: apps/web/components/utils/useShowArchived.tsx
function useShowArchived (line 5) | function useShowArchived() {
FILE: apps/web/components/wrapped/ShareButton.tsx
type ShareButtonProps (line 8) | interface ShareButtonProps {
function ShareButton (line 13) | function ShareButton({
FILE: apps/web/components/wrapped/WrappedContent.tsx
type WrappedStats (line 28) | type WrappedStats = z.infer<typeof zWrappedStatsResponseSchema>;
type BookmarkSource (line 29) | type BookmarkSource = z.infer<typeof zBookmarkSourceSchema>;
type WrappedContentProps (line 31) | interface WrappedContentProps {
function formatSourceName (line 60) | function formatSourceName(source: BookmarkSource | null): string {
function getSourceIcon (line 75) | function getSourceIcon(source: BookmarkSource | null, className = "h-5 w...
FILE: apps/web/components/wrapped/WrappedModal.tsx
type WrappedModalProps (line 19) | interface WrappedModalProps {
function WrappedModal (line 24) | function WrappedModal({ open, onClose }: WrappedModalProps) {
FILE: apps/web/instrumentation.ts
function register (line 1) | async function register() {
FILE: apps/web/lib/attachments.tsx
constant ASSET_TYPE_TO_ICON (line 15) | const ASSET_TYPE_TO_ICON: Record<ZAssetType, React.ReactNode> = {
FILE: apps/web/lib/bookmark-drag.ts
constant BOOKMARK_DRAG_MIME (line 5) | const BOOKMARK_DRAG_MIME = "application/x-karakeep-bookmark";
FILE: apps/web/lib/bulkActions.ts
type BookmarkState (line 7) | interface BookmarkState {
FILE: apps/web/lib/bulkTagActions.ts
type TagState (line 3) | interface TagState {
FILE: apps/web/lib/clientConfig.tsx
function useClientConfig (line 29) | function useClientConfig() {
FILE: apps/web/lib/drag-and-drop.ts
type DraggingState (line 4) | interface DraggingState {
function useDragAndDrop (line 10) | function useDragAndDrop(
FILE: apps/web/lib/haptic.ts
function hasVibrate (line 9) | function hasVibrate(
function haptic (line 25) | function haptic() {
FILE: apps/web/lib/hooks/bookmark-search.ts
function useSearchQuery (line 11) | function useSearchQuery() {
function useDoBookmarkSearch (line 32) | function useDoBookmarkSearch() {
function useBookmarkSearch (line 70) | function useBookmarkSearch() {
FILE: apps/web/lib/hooks/relative-time.ts
function useRelativeTime (line 4) | function useRelativeTime(date: Date) {
FILE: apps/web/lib/hooks/upload-file.ts
function useUpload (line 10) | function useUpload({
FILE: apps/web/lib/hooks/useBookmarkImport.ts
type ImportProgress (line 18) | interface ImportProgress {
function useBookmarkImport (line 23) | function useBookmarkImport() {
FILE: apps/web/lib/hooks/useDialogFormReset.ts
function useDialogFormReset (line 13) | function useDialogFormReset<T extends FieldValues>(
FILE: apps/web/lib/hooks/useImportSessions.ts
function useCreateImportSession (line 13) | function useCreateImportSession() {
function useListImportSessions (line 34) | function useListImportSessions() {
function useImportSessionStats (line 46) | function useImportSessionStats(importSessionId: string) {
function useDeleteImportSession (line 65) | function useDeleteImportSession() {
function usePauseImportSession (line 90) | function usePauseImportSession() {
function useResumeImportSession (line 115) | function useResumeImportSession() {
function useImportSessionResults (line 140) | function useImportSessionResults(
FILE: apps/web/lib/i18n/server.ts
function useTranslation (line 23) | async function useTranslation<
FILE: apps/web/lib/i18n/settings.ts
function getOptions (line 8) | function getOptions(lng: string = fallbackLng, ns: string = defaultNS) {
FILE: apps/web/lib/providers.tsx
function makeQueryClient (line 23) | function makeQueryClient() {
function getQueryClient (line 37) | function getQueryClient() {
function Providers (line 51) | function Providers({
FILE: apps/web/lib/readerSettings.tsx
constant LOCAL_STORAGE_KEY (line 20) | const LOCAL_STORAGE_KEY = "karakeep-reader-settings";
function getLocalOverridesFromStorage (line 22) | function getLocalOverridesFromStorage(): ReaderSettingsPartial {
function saveLocalOverridesToStorage (line 32) | function saveLocalOverridesToStorage(overrides: ReaderSettingsPartial): ...
type SessionOverridesContextValue (line 38) | interface SessionOverridesContextValue {
function ReaderSettingsProvider (line 48) | function ReaderSettingsProvider({
function useReaderSettings (line 85) | function useReaderSettings() {
FILE: apps/web/lib/store/useInBookmarkGridStore.ts
type InBookmarkGridState (line 3) | interface InBookmarkGridState {
FILE: apps/web/lib/store/useInSearchPageStore.ts
type InSearchPageState (line 3) | interface InSearchPageState {
FILE: apps/web/lib/store/useSortOrderStore.ts
type SortOrderState (line 5) | interface SortOrderState {
FILE: apps/web/lib/userLocalSettings/bookmarksLayout.tsx
function useUserLocalSettings (line 23) | function useUserLocalSettings() {
function useBookmarkDisplaySettings (line 27) | function useBookmarkDisplaySettings() {
function useBookmarkLayout (line 37) | function useBookmarkLayout() {
function useInterfaceLang (line 42) | function useInterfaceLang() {
function useGridColumns (line 47) | function useGridColumns() {
function bookmarkLayoutSwitch (line 52) | function bookmarkLayoutSwitch<T>(
function useBookmarkLayoutSwitch (line 59) | function useBookmarkLayoutSwitch<T>(
FILE: apps/web/lib/userLocalSettings/types.ts
constant USER_LOCAL_SETTINGS_COOKIE_NAME (line 3) | const USER_LOCAL_SETTINGS_COOKIE_NAME = "hoarder-user-local-settings";
type BookmarksLayoutTypes (line 6) | type BookmarksLayoutTypes = z.infer<typeof zBookmarkGridLayout>;
type UserLocalSettings (line 18) | type UserLocalSettings = z.infer<typeof zUserLocalSettings>;
function parseUserLocalSettings (line 20) | function parseUserLocalSettings(str: string | undefined) {
function defaultUserLocalSettings (line 28) | function defaultUserLocalSettings() {
FILE: apps/web/lib/userLocalSettings/userLocalSettings.ts
function getUserLocalSettings (line 12) | async function getUserLocalSettings(): Promise<UserLocalSettings> {
function readModifyWrite (line 19) | async function readModifyWrite(
function updateBookmarksLayout (line 34) | async function updateBookmarksLayout(layout: BookmarksLayoutTypes) {
function updateInterfaceLang (line 38) | async function updateInterfaceLang(lang: string) {
function updateGridColumns (line 42) | async function updateGridColumns(gridColumns: number) {
function updateShowNotes (line 46) | async function updateShowNotes(showNotes: boolean) {
function updateShowTags (line 50) | async function updateShowTags(showTags: boolean) {
function updateShowTitle (line 54) | async function updateShowTitle(showTitle: boolean) {
function updateImageFit (line 58) | async function updateImageFit(imageFit: "cover" | "contain") {
FILE: apps/web/lib/userSettings.tsx
function UserSettingsContextProvider (line 26) | function UserSettingsContextProvider({
function useUserSettings (line 47) | function useUserSettings() {
FILE: apps/web/lib/utils.ts
function cn (line 5) | function cn(...inputs: ClassValue[]) {
type OS (line 9) | type OS = "macos" | "ios" | "windows" | "android" | "linux" | null;
function formatBytes (line 11) | function formatBytes(bytes: number, decimals = 2) {
function getOS (line 23) | function getOS() {
function match (line 45) | function match<T extends string | number | symbol, U>(
function matchFunc (line 52) | function matchFunc<T extends string | number | symbol, U>(
FILE: apps/web/next.config.mjs
method headers (line 23) | async headers() {
FILE: apps/web/server/api/client.ts
function createContextFromRequest (line 10) | async function createContextFromRequest(req: Request) {
FILE: apps/web/server/auth.ts
type UserRole (line 24) | type UserRole = "admin" | "user";
type JWT (line 27) | interface JWT {
type Session (line 39) | interface Session {
type DefaultUser (line 46) | interface DefaultUser {
function isFirstUser (line 56) | async function isFirstUser(): Promise<boolean> {
function isAdmin (line 66) | async function isAdmin(email: string): Promise<boolean> {
method authorize (line 102) | async authorize(credentials) {
method profile (line 135) | async profile(profile: Record<string, string>) {
method signIn (line 164) | async signIn({ user: credUser, credentials, profile }) {
method jwt (line 198) | async jwt({ token, user }) {
method session (line 210) | async session({ session, token }) {
FILE: apps/workers/index.ts
type WorkerName (line 86) | type WorkerName = keyof typeof workerBuilders | "import";
function isWorkerEnabled (line 90) | function isWorkerEnabled(name: WorkerName) {
function main (line 100) | async function main() {
FILE: apps/workers/metascraper-plugins/metascraper-amazon-improved.ts
constant REGEX_AMAZON_URL (line 21) | const REGEX_AMAZON_URL =
FILE: apps/workers/metascraper-plugins/metascraper-reddit.ts
type RedditPostData (line 66) | type RedditPostData = z.infer<typeof redditPostSchema>;
type RedditFetchResult (line 76) | interface RedditFetchResult {
constant REDDIT_CACHE_TTL_MS (line 81) | const REDDIT_CACHE_TTL_MS = 60 * 1000;
type RedditCacheEntry (line 83) | interface RedditCacheEntry {
constant REDDIT_LOGO_URL (line 186) | const REDDIT_LOGO_URL =
FILE: apps/workers/network.ts
constant DISALLOWED_IP_RANGES (line 12) | const DISALLOWED_IP_RANGES = new Set([
function resolveHostAddresses (line 37) | async function resolveHostAddresses(hostname: string): Promise<string[]> {
function isAddressForbidden (line 74) | function isAddressForbidden(address: string): boolean {
function getBookmarkDomain (line 89) | function getBookmarkDomain(url?: string | null): string | undefined {
type UrlValidationResult (line 98) | type UrlValidationResult =
function hostnameMatchesAnyPattern (line 102) | function hostnameMatchesAnyPattern(
function isHostnameAllowedForInternalAccess (line 126) | function isHostnameAllowedForInternalAccess(hostname: string): boolean {
function validateUrl (line 136) | async function validateUrl(
function getRandomProxy (line 224) | function getRandomProxy(proxyList: string[]): string {
function matchesNoProxy (line 228) | function matchesNoProxy(url: string, noProxy: string[]) {
function getProxyAgent (line 239) | function getProxyAgent(url: string) {
function cloneHeaders (line 268) | function cloneHeaders(init?: HeadersInit): Headers {
function isRedirectResponse (line 298) | function isRedirectResponse(response: Response): boolean {
type FetchWithProxyOptions (line 308) | type FetchWithProxyOptions = Omit<
type PreparedFetchOptions (line 315) | interface PreparedFetchOptions {
function prepareFetchOptions (line 323) | function prepareFetchOptions(
type BuildFetchOptionsInput (line 346) | interface BuildFetchOptionsInput {
function buildFetchOptions (line 354) | function buildFetchOptions({
FILE: apps/workers/scripts/parseHtmlSubprocess.ts
constant LAZY_SRC_ATTRS (line 87) | const LAZY_SRC_ATTRS = [
function normalizeLazyLoadImages (line 98) | function normalizeLazyLoadImages(document: Document): void {
function extractReadableContent (line 123) | function extractReadableContent(
function main (line 149) | async function main() {
FILE: apps/workers/server.ts
function buildServer (line 20) | function buildServer() {
FILE: apps/workers/trpc.ts
function buildImpersonatingTRPCClient (line 10) | async function buildImpersonatingTRPCClient(userId: string) {
FILE: apps/workers/utils.ts
function withTimeout (line 1) | function withTimeout<T, Ret>(
FILE: apps/workers/workerTracing.ts
type WorkerRunFn (line 6) | type WorkerRunFn<TData, TResult = void> = (
function withWorkerTracing (line 25) | function withWorkerTracing<TData, TResult = void>(
FILE: apps/workers/workerUtils.ts
type DBAssetType (line 6) | type DBAssetType = typeof assets.$inferInsert;
function updateAsset (line 7) | async function updateAsset(
function getBookmarkDetails (line 19) | async function getBookmarkDetails(bookmarkId: string) {
FILE: apps/workers/workers/adminMaintenance/tasks/migrateLinkHtmlContent.ts
constant BATCH_SIZE (line 20) | const BATCH_SIZE = 25;
type BookmarkHtmlRow (line 22) | interface BookmarkHtmlRow {
function getBookmarksWithLargeInlineHtml (line 28) | async function getBookmarksWithLargeInlineHtml(limit: number, cursor?: s...
function migrateBookmarkHtml (line 57) | async function migrateBookmarkHtml(
function runMigrateLargeLinkHtmlTask (line 152) | async function runMigrateLargeLinkHtmlTask(
FILE: apps/workers/workers/adminMaintenance/tasks/tidyAssets.ts
function handleAsset (line 14) | async function handleAsset(
function runTidyAssetsTask (line 57) | async function runTidyAssetsTask(
FILE: apps/workers/workers/adminMaintenanceWorker.ts
class AdminMaintenanceWorker (line 17) | class AdminMaintenanceWorker {
method build (line 18) | static async build() {
function runAdminMaintenance (line 66) | async function runAdminMaintenance(job: DequeuedJob<ZAdminMaintenanceTas...
FILE: apps/workers/workers/assetPreprocessingWorker.ts
class AssetPreprocessingWorker (line 35) | class AssetPreprocessingWorker {
method build (line 36) | static async build() {
function readImageText (line 76) | async function readImageText(buffer: Buffer) {
function readImageTextWithLLM (line 94) | async function readImageTextWithLLM(
function readPDFText (line 124) | async function readPDFText(buffer: Buffer): Promise<{
function extractAndSavePDFScreenshot (line 141) | async function extractAndSavePDFScreenshot(
function extractAndSaveImageText (line 232) | async function extractAndSaveImageText(
function extractAndSavePDFText (line 291) | async function extractAndSavePDFText(
function getBookmark (line 328) | async function getBookmark(bookmarkId: string) {
function run (line 338) | async function run(req: DequeuedJob<AssetPreprocessingRequest>) {
FILE: apps/workers/workers/backupWorker.ts
class BackupWorker (line 114) | class BackupWorker {
method build (line 115) | static async build() {
function run (line 166) | async function run(req: DequeuedJob<ZBackupRequest>) {
function streamBookmarksToJsonFile (line 309) | async function streamBookmarksToJsonFile(
function createZipArchiveFromFile (line 404) | async function createZipArchiveFromFile(
function cleanupOldBackups (line 437) | async function cleanupOldBackups(
FILE: apps/workers/workers/crawlerWorker.ts
function abortPromise (line 95) | function abortPromise(signal: AbortSignal): Promise<never> {
function redactUrlCredentials (line 123) | function redactUrlCredentials(url: string): string {
function normalizeContentType (line 142) | function normalizeContentType(header: string | null): string | null {
function shouldRetryCrawlStatusCode (line 149) | function shouldRetryCrawlStatusCode(statusCode: number | null): boolean {
type Cookie (line 156) | interface Cookie {
type CrawlerRunResult (line 180) | interface CrawlerRunResult {
function getPlaywrightProxyConfig (line 184) | function getPlaywrightProxyConfig(): BrowserContextOptions["proxy"] {
constant CONTEXT_CLOSE_TIMEOUT_MS (line 223) | const CONTEXT_CLOSE_TIMEOUT_MS = 10_000;
constant PAGE_CLOSE_TIMEOUT_MS (line 224) | const PAGE_CLOSE_TIMEOUT_MS = 5_000;
function startContextReaper (line 230) | function startContextReaper() {
function startBrowserInstance (line 284) | async function startBrowserInstance() {
function launchBrowser (line 313) | async function launchBrowser() {
class CrawlerWorker (line 346) | class CrawlerWorker {
method ensureInitialized (line 349) | private static ensureInitialized() {
method build (line 384) | static async build(queue: Queue<ZCrawlLinkRequest>) {
function loadCookiesFromFile (line 466) | async function loadCookiesFromFile(): Promise<void> {
type DBAssetType (line 489) | type DBAssetType = typeof assets.$inferInsert;
function browserlessCrawlPage (line 491) | async function browserlessCrawlPage(
function crawlPage (line 527) | async function crawlPage(
function getSubprocessScriptPath (line 1031) | function getSubprocessScriptPath(): string {
function getSubprocessCommand (line 1041) | function getSubprocessCommand(): { cmd: string; args: string[] } {
function runParseSubprocess (line 1059) | async function runParseSubprocess(
function storeScreenshot (line 1153) | async function storeScreenshot(
function storePdf (line 1212) | async function storePdf(
function downloadAndStoreFile (line 1265) | async function downloadAndStoreFile(
function downloadAndStoreImage (line 1374) | async function downloadAndStoreImage(
function archiveWebpage (line 1389) | async function archiveWebpage(
function getContentType (line 1483) | async function getContentType(
function handleAsAssetBookmark (line 1537) | async function handleAsAssetBookmark(
type StoreHtmlResult (line 1612) | type StoreHtmlResult =
function storeHtmlContent (line 1617) | async function storeHtmlContent(
function crawlAndParseUrl (line 1693) | async function crawlAndParseUrl(
function checkDomainRateLimit (line 1994) | async function checkDomainRateLimit(url: string, jobId: string): Promise...
function runCrawler (line 2044) | async function runCrawler(
FILE: apps/workers/workers/feedWorker.ts
function getFeedMinuteOffset (line 22) | function getFeedMinuteOffset(feedId: string): number {
class FeedWorker (line 86) | class FeedWorker {
method build (line 87) | static async build() {
function run (line 130) | async function run(req: DequeuedJob<ZFeedRequestSchema>) {
FILE: apps/workers/workers/importWorker.ts
function sleep (line 73) | function sleep(ms: number): Promise<void> {
function getSafeErrorMessage (line 81) | function getSafeErrorMessage(error: unknown): string {
class ImportWorker (line 101) | class ImportWorker {
method start (line 110) | async start() {
method stop (line 143) | stop() {
method processBatch (line 148) | private async processBatch(): Promise<number> {
method updateGauges (line 235) | private async updateGauges() {
method checkAndCompleteIdleSessions (line 264) | private async checkAndCompleteIdleSessions() {
method countPendingItems (line 278) | private async countPendingItems(): Promise<number> {
method getNextBatchFairly (line 295) | private async getNextBatchFairly(limit: number): Promise<string[]> {
method attachBookmarkToLists (line 321) | private async attachBookmarkToLists(
method processOneBookmark (line 350) | private async processOneBookmark(
method updateSessionLastProcessedAt (line 486) | private async updateSessionLastProcessedAt(sessionId: string) {
method checkAndCompleteEmptySessions (line 493) | private async checkAndCompleteEmptySessions(sessionIds: string[]) {
method checkAndCompleteProcessingItems (line 521) | private async checkAndCompleteProcessingItems(): Promise<number> {
method getAvailableCapacity (line 630) | private async getAvailableCapacity(): Promise<number> {
method resetStaleProcessingItems (line 657) | private async resetStaleProcessingItems(): Promise<number> {
FILE: apps/workers/workers/inference/inferenceWorker.ts
function attemptMarkStatus (line 17) | async function attemptMarkStatus(
class OpenAiWorker (line 40) | class OpenAiWorker {
method build (line 41) | static async build() {
function runOpenAI (line 76) | async function runOpenAI(job: DequeuedJob<ZOpenAIRequest>) {
FILE: apps/workers/workers/inference/summarize.ts
function fetchBookmarkDetailsForSummary (line 19) | async function fetchBookmarkDetailsForSummary(bookmarkId: string) {
function runSummarization (line 46) | async function runSummarization(
FILE: apps/workers/workers/inference/tagging.ts
function parseJsonFromLLMResponse (line 38) | function parseJsonFromLLMResponse(response: string): unknown {
function tagNormalizer (line 74) | function tagNormalizer() {
function buildPrompt (line 84) | async function buildPrompt(
function inferTagsFromImage (line 132) | async function inferTagsFromImage(
function fetchCustomPrompts (line 175) | async function fetchCustomPrompts(
function replaceTagsPlaceholders (line 201) | async function replaceTagsPlaceholders(
function containsTagsPlaceholder (line 225) | function containsTagsPlaceholder(prompts: { text: string }[]): boolean {
function inferTagsFromPDF (line 236) | async function inferTagsFromPDF(
function inferTagsFromText (line 265) | async function inferTagsFromText(
function inferTags (line 294) | async function inferTags(
function connectTags (line 392) | async function connectTags(
function fetchBookmark (line 494) | async function fetchBookmark(linkId: string) {
function runTagging (line 505) | async function runTagging(
FILE: apps/workers/workers/ruleEngineWorker.ts
class RuleEngineWorker (line 18) | class RuleEngineWorker {
method build (line 19) | static async build() {
function getBookmarkUserId (line 55) | async function getBookmarkUserId(bookmarkId: string) {
function runRuleEngine (line 64) | async function runRuleEngine(job: DequeuedJob<ZRuleEngineRequest>) {
FILE: apps/workers/workers/searchWorker.ts
class SearchIndexingWorker (line 22) | class SearchIndexingWorker {
method build (line 23) | static async build() {
function runIndex (line 59) | async function runIndex(
function runDelete (line 117) | async function runDelete(
function runSearchIndexing (line 125) | async function runSearchIndexing(job: DequeuedJob<ZSearchIndexingRequest...
FILE: apps/workers/workers/utils/feedParser.ts
type ParsedFeedItem (line 32) | type ParsedFeedItem = z.infer<typeof feedItemSchema>;
function parseFeedItems (line 34) | async function parseFeedItems(
FILE: apps/workers/workers/utils/fetchBookmarks.ts
function fetchAllBookmarksForUser (line 15) | async function fetchAllBookmarksForUser(
FILE: apps/workers/workers/utils/parseHtmlSubprocessIpc.ts
type ParseSubprocessInput (line 32) | type ParseSubprocessInput = z.infer<typeof parseSubprocessInputSchema>;
type ParseSubprocessOutput (line 33) | type ParseSubprocessOutput = z.infer<typeof parseSubprocessOutputSchema>;
type ParseSubprocessError (line 34) | type ParseSubprocessError = z.infer<typeof parseSubprocessErrorSchema>;
FILE: apps/workers/workers/videoWorker.ts
constant TMP_FOLDER (line 30) | const TMP_FOLDER = path.join(os.tmpdir(), "video_downloads");
class VideoWorker (line 32) | class VideoWorker {
method build (line 33) | static async build() {
function prepareYtDlpArguments (line 70) | function prepareYtDlpArguments(
function runWorker (line 92) | async function runWorker(job: DequeuedJob<ZVideoRequest>) {
function deleteLeftOverAssetFile (line 226) | async function deleteLeftOverAssetFile(
function findAssetFile (line 258) | async function findAssetFile(assetId: string): Promise<string | null> {
FILE: apps/workers/workers/webhookWorker.ts
class WebhookWorker (line 17) | class WebhookWorker {
method build (line 18) | static async build() {
function fetchBookmark (line 57) | async function fetchBookmark(bookmarkId: string) {
function fetchUserWebhooks (line 70) | async function fetchUserWebhooks(userId: string) {
function runWebhook (line 76) | async function runWebhook(job: DequeuedJob<ZWebhookRequest>) {
FILE: docs/src/theme/DocSidebarItem/Category/index.tsx
function useAutoExpandActiveCategory (line 53) | function useAutoExpandActiveCategory({
function useCategoryHrefWithSSRFallback (line 79) | function useCategoryHrefWithSSRFallback(
function CollapseButton (line 96) | function CollapseButton({
function DocSidebarItemCategory (line 134) | function DocSidebarItemCategory({
FILE: packages/api/middlewares/trpcAdapter.ts
function trpcCodeToHttpCode (line 5) | function trpcCodeToHttpCode(code: TRPCError["code"]) {
FILE: packages/api/utils/assets.ts
function serveAsset (line 12) | async function serveAsset(c: Context, assetId: string, userId: string) {
FILE: packages/api/utils/pagination.ts
function adaptPagination (line 19) | function adaptPagination<
FILE: packages/api/utils/rss.ts
function toRSS (line 10) | function toRSS(
FILE: packages/api/utils/upload.ts
constant MAX_UPLOAD_SIZE_BYTES (line 18) | const MAX_UPLOAD_SIZE_BYTES = serverConfig.maxAssetSizeMb * 1024 * 1024;
function webStreamToNode (line 21) | function webStreamToNode(
function toWebReadableStream (line 28) | function toWebReadableStream(
function uploadAsset (line 42) | async function uploadAsset(
FILE: packages/benchmarks/src/benchmarks.ts
type CompletedTaskResult (line 9) | type CompletedTaskResult = Extract<TaskResult, { state: "completed" }>;
type BenchmarkRow (line 11) | interface BenchmarkRow {
type BenchmarkOptions (line 20) | interface BenchmarkOptions {
function runBenchmarks (line 25) | async function runBenchmarks(
function toRow (line 189) | function toRow(name: string, result: CompletedTaskResult): BenchmarkRow {
function renderTable (line 204) | function renderTable(rows: BenchmarkRow[]): void {
FILE: packages/benchmarks/src/index.ts
type CliConfig (line 6) | interface CliConfig {
function numberFromEnv (line 17) | function numberFromEnv(key: string, fallback: number): number {
function loadConfig (line 24) | function loadConfig(): CliConfig {
function main (line 37) | async function main() {
FILE: packages/benchmarks/src/log.ts
constant ICONS (line 1) | const ICONS = {
function logStep (line 8) | function logStep(title: string): void {
function logInfo (line 12) | function logInfo(message: string): void {
function logSuccess (line 16) | function logSuccess(message: string): void {
function logWarn (line 20) | function logWarn(message: string): void {
FILE: packages/benchmarks/src/seed.ts
type SeedConfig (line 11) | interface SeedConfig {
type SeededBookmark (line 19) | interface SeededBookmark {
type UserSeedData (line 26) | interface UserSeedData {
type SeedResult (line 35) | interface SeedResult {
constant TOPICS (line 46) | const TOPICS = [
function seedUserData (line 59) | async function seedUserData(
function seedData (line 171) | async function seedData(config: SeedConfig): Promise<SeedResult> {
FILE: packages/benchmarks/src/startContainers.ts
function getRandomPort (line 9) | async function getRandomPort(): Promise<number> {
function waitForHealthy (line 21) | async function waitForHealthy(port: number): Promise<void> {
function captureDockerLogs (line 33) | async function captureDockerLogs(composeDir: string): Promise<void> {
type RunningContainers (line 58) | interface RunningContainers {
function startContainers (line 63) | async function startContainers(): Promise<RunningContainers> {
FILE: packages/benchmarks/src/trpc.ts
type TrpcClient (line 6) | type TrpcClient = ReturnType<typeof getTrpcClient>;
function getTrpcClient (line 8) | function getTrpcClient(apiKey?: string) {
FILE: packages/benchmarks/src/utils.ts
function sleep (line 1) | function sleep(ms: number): Promise<void> {
function waitUntil (line 5) | async function waitUntil(
function formatNumber (line 25) | function formatNumber(num: number, fractionDigits = 2): string {
function formatMs (line 29) | function formatMs(ms: number): string {
FILE: packages/db/drizzle.ts
type DB (line 29) | type DB = typeof db;
function getInMemoryDB (line 31) | function getInMemoryDB(runMigrations: boolean) {
FILE: packages/db/drizzle/0000_luxuriant_johnny_blaze.sql
type `account` (line 1) | CREATE TABLE `account` (
type `apiKey` (line 17) | CREATE TABLE `apiKey` (
type `bookmarkLinks` (line 27) | CREATE TABLE `bookmarkLinks` (
type `bookmarkTags` (line 38) | CREATE TABLE `bookmarkTags` (
type `bookmarks` (line 46) | CREATE TABLE `bookmarks` (
type `session` (line 55) | CREATE TABLE `session` (
type `tagsOnBookmarks` (line 62) | CREATE TABLE `tagsOnBookmarks` (
type `user` (line 72) | CREATE TABLE `user` (
type `verificationToken` (line 81) | CREATE TABLE `verificationToken` (
type `apiKey_name_unique` (line 88) | CREATE UNIQUE INDEX `apiKey_name_unique` ON `apiKey` (`name`)
type `apiKey_keyId_unique` (line 89) | CREATE UNIQUE INDEX `apiKey_keyId_unique` ON `apiKey` (`keyId`)
type `apiKey_name_userId_unique` (line 90) | CREATE UNIQUE INDEX `apiKey_name_userId_unique` ON `apiKey` (`name`,`use...
type `bookmarkTags_userId_name_unique` (line 91) | CREATE UNIQUE INDEX `bookmarkTags_userId_name_unique` ON `bookmarkTags` ...
type `user_email_unique` (line 92) | CREATE UNIQUE INDEX `user_email_unique` ON `user` (`email`)
FILE: packages/db/drizzle/0001_dapper_trauma.sql
type `bookmarkTexts` (line 1) | CREATE TABLE `bookmarkTexts` (
FILE: packages/db/drizzle/0002_worried_beyonder.sql
type `bookmarkLists` (line 1) | CREATE TABLE `bookmarkLists` (
type `bookmarksInLists` (line 10) | CREATE TABLE `bookmarksInLists` (
type `bookmarkLists_name_userId_unique` (line 19) | CREATE UNIQUE INDEX `bookmarkLists_name_userId_unique` ON `bookmarkLists...
FILE: packages/db/drizzle/0008_cloudy_skin.sql
type `bookmarkLists_userId_idx` (line 1) | CREATE INDEX `bookmarkLists_userId_idx` ON `bookmarkLists` (`userId`)
type `bookmarkTags_name_idx` (line 2) | CREATE INDEX `bookmarkTags_name_idx` ON `bookmarkTags` (`name`)
type `bookmarkTags_userId_idx` (line 3) | CREATE INDEX `bookmarkTags_userId_idx` ON `bookmarkTags` (`userId`)
type `bookmarks_userId_idx` (line 4) | CREATE INDEX `bookmarks_userId_idx` ON `bookmarks` (`userId`)
type `bookmarks_archived_idx` (line 5) | CREATE INDEX `bookmarks_archived_idx` ON `bookmarks` (`archived`)
type `bookmarks_favourited_idx` (line 6) | CREATE INDEX `bookmarks_favourited_idx` ON `bookmarks` (`favourited`)
type `bookmarksInLists_bookmarkId_idx` (line 7) | CREATE INDEX `bookmarksInLists_bookmarkId_idx` ON `bookmarksInLists` (`b...
type `bookmarksInLists_listId_idx` (line 8) | CREATE INDEX `bookmarksInLists_listId_idx` ON `bookmarksInLists` (`listId`)
type `tagsOnBookmarks_tagId_idx` (line 9) | CREATE INDEX `tagsOnBookmarks_tagId_idx` ON `tagsOnBookmarks` (`bookmark...
type `tagsOnBookmarks_bookmarkId_idx` (line 10) | CREATE INDEX `tagsOnBookmarks_bookmarkId_idx` ON `tagsOnBookmarks` (`boo...
FILE: packages/db/drizzle/0009_cuddly_cammi.sql
type `bookmarks_createdAt_idx` (line 1) | CREATE INDEX `bookmarks_createdAt_idx` ON `bookmarks` (`createdAt`)
FILE: packages/db/drizzle/0010_curved_sharon_ventura.sql
type `assets` (line 1) | CREATE TABLE `assets` (
type `assets_userId_idx` (line 11) | CREATE INDEX `assets_userId_idx` ON `assets` (`userId`)
FILE: packages/db/drizzle/0011_ordinary_phalanx.sql
type `bookmarkAssets` (line 1) | CREATE TABLE `bookmarkAssets` (
FILE: packages/db/drizzle/0012_noisy_grim_reaper.sql
type `bookmarkAssets2` (line 1) | CREATE TABLE `bookmarkAssets2` (
FILE: packages/db/drizzle/0021_magical_firebrand.sql
type `bookmarkLinks_url_idx` (line 1) | CREATE INDEX `bookmarkLinks_url_idx` ON `bookmarkLinks` (`url`)
FILE: packages/db/drizzle/0024_premium_hammerhead.sql
type `assets` (line 1) | CREATE TABLE `assets` (
type `assets_bookmarkId_idx` (line 8) | CREATE INDEX `assets_bookmarkId_idx` ON `assets` (`bookmarkId`)
type `assets_assetType_idx` (line 10) | CREATE INDEX `assets_assetType_idx` ON `assets` (`assetType`)
FILE: packages/db/drizzle/0026_silky_imperial_guard.sql
type `config` (line 1) | CREATE TABLE `config` (
FILE: packages/db/drizzle/0027_cute_talon.sql
type `customPrompts` (line 1) | CREATE TABLE `customPrompts` (
type `customPrompts_userId_idx` (line 11) | CREATE INDEX `customPrompts_userId_idx` ON `customPrompts` (`userId`)
FILE: packages/db/drizzle/0029_short_gunslinger.sql
type `assets_new` (line 1) | CREATE TABLE `assets_new` (
type `assets_bookmarkId_idx` (line 12) | CREATE INDEX `assets_bookmarkId_idx` ON `assets` (`bookmarkId`)
type `assets_assetType_idx` (line 13) | CREATE INDEX `assets_assetType_idx` ON `assets` (`assetType`)
type `assets_userId_idx` (line 14) | CREATE INDEX `assets_userId_idx` ON `assets` (`userId`)
FILE: packages/db/drizzle/0032_futuristic_shiva.sql
type `rssFeedImports` (line 1) | CREATE TABLE `rssFeedImports` (
type `rssFeeds` (line 11) | CREATE TABLE `rssFeeds` (
type `rssFeedImports_feedIdIdx_idx` (line 22) | CREATE INDEX `rssFeedImports_feedIdIdx_idx` ON `rssFeedImports` (`rssFee...
type `rssFeedImports_entryIdIdx_idx` (line 23) | CREATE INDEX `rssFeedImports_entryIdIdx_idx` ON `rssFeedImports` (`entry...
type `rssFeedImports_rssFeedId_entryId_unique` (line 24) | CREATE UNIQUE INDEX `rssFeedImports_rssFeedId_entryId_unique` ON `rssFee...
type `rssFeeds_userId_idx` (line 25) | CREATE INDEX `rssFeeds_userId_idx` ON `rssFeeds` (`userId`)
FILE: packages/db/drizzle/0033_nappy_molten_man.sql
type `tagsOnBookmarks_tagId_idx` (line 2) | CREATE INDEX `tagsOnBookmarks_tagId_idx` ON `tagsOnBookmarks` (`tagId`)
FILE: packages/db/drizzle/0035_gorgeous_may_parker.sql
type `highlights` (line 1) | CREATE TABLE `highlights` (
type `highlights_bookmarkId_idx` (line 14) | CREATE INDEX `highlights_bookmarkId_idx` ON `highlights` (`bookmarkId`)
type `highlights_userId_idx` (line 15) | CREATE INDEX `highlights_userId_idx` ON `highlights` (`userId`)
FILE: packages/db/drizzle/0039_purple_albert_cleary.sql
type `webhooks` (line 1) | CREATE TABLE `webhooks` (
type `webhooks_userId_idx` (line 10) | CREATE INDEX `webhooks_userId_idx` ON `webhooks` (`userId`)
FILE: packages/db/drizzle/0045_add_rule_engine.sql
type `ruleEngineActions` (line 1) | CREATE TABLE `ruleEngineActions` (
type `ruleEngineActions_userId_idx` (line 14) | CREATE INDEX `ruleEngineActions_userId_idx` ON `ruleEngineActions` (`use...
type `ruleEngineActions_ruleId_idx` (line 15) | CREATE INDEX `ruleEngineActions_ruleId_idx` ON `ruleEngineActions` (`rul...
type `ruleEngineRules` (line 16) | CREATE TABLE `ruleEngineRules` (
type `ruleEngine_userId_idx` (line 31) | CREATE INDEX `ruleEngine_userId_idx` ON `ruleEngineRules` (`userId`)
type `bookmarkLists_userId_id_idx` (line 32) | CREATE UNIQUE INDEX `bookmarkLists_userId_id_idx` ON `bookmarkLists` (`u...
type `bookmarkTags_userId_id_idx` (line 33) | CREATE UNIQUE INDEX `bookmarkTags_userId_id_idx` ON `bookmarkTags` (`use...
FILE: packages/db/drizzle/0048_add_user_settings.sql
type `userSettings` (line 1) | CREATE TABLE `userSettings` (
FILE: packages/db/drizzle/0056_user_invites.sql
type `invites` (line 1) | CREATE TABLE `invites` (
type `invites_token_unique` (line 12) | CREATE UNIQUE INDEX `invites_token_unique` ON `invites` (`token`)
FILE: packages/db/drizzle/0057_salty_carmella_unuscione.sql
type `passwordResetToken` (line 1) | CREATE TABLE `passwordResetToken` (
type `passwordResetToken_token_unique` (line 10) | CREATE UNIQUE INDEX `passwordResetToken_token_unique` ON `passwordResetT...
type `passwordResetTokens_userId_idx` (line 11) | CREATE INDEX `passwordResetTokens_userId_idx` ON `passwordResetToken` (`...
FILE: packages/db/drizzle/0058_add_subscription.sql
type `subscriptions` (line 1) | CREATE TABLE `subscriptions` (
type `subscriptions_userId_unique` (line 17) | CREATE UNIQUE INDEX `subscriptions_userId_unique` ON `subscriptions` (`u...
type `subscriptions_userId_idx` (line 18) | CREATE INDEX `subscriptions_userId_idx` ON `subscriptions` (`userId`)
type `subscriptions_stripeCustomerId_idx` (line 19) | CREATE INDEX `subscriptions_stripeCustomerId_idx` ON `subscriptions` (`s...
FILE: packages/db/drizzle/0062_add_import_session.sql
type `importSessionBookmarks` (line 1) | CREATE TABLE `importSessionBookmarks` (
type `importSessionBookmarks_sessionId_idx` (line 10) | CREATE INDEX `importSessionBookmarks_sessionId_idx` ON `importSessionBoo...
type `importSessionBookmarks_bookmarkId_idx` (line 11) | CREATE INDEX `importSessionBookmarks_bookmarkId_idx` ON `importSessionBo...
type `importSessionBookmarks_importSessionId_bookmarkId_unique` (line 12) | CREATE UNIQUE INDEX `importSessionBookmarks_importSessionId_bookmarkId_u...
type `importSessions` (line 13) | CREATE TABLE `importSessions` (
type `importSessions_userId_idx` (line 25) | CREATE INDEX `importSessions_userId_idx` ON `importSessions` (`userId`)
FILE: packages/db/drizzle/0065_collaborative_lists.sql
type `listCollaborators` (line 1) | CREATE TABLE `listCollaborators` (
type `listCollaborators_listId_idx` (line 13) | CREATE INDEX `listCollaborators_listId_idx` ON `listCollaborators` (`lis...
type `listCollaborators_userId_idx` (line 14) | CREATE INDEX `listCollaborators_userId_idx` ON `listCollaborators` (`use...
type `listCollaborators_listId_userId_unique` (line 15) | CREATE UNIQUE INDEX `listCollaborators_listId_userId_unique` ON `listCol...
FILE: packages/db/drizzle/0066_collaborative_lists_invites.sql
type `listInvitations` (line 1) | CREATE TABLE `listInvitations` (
type `listInvitations_listId_idx` (line 15) | CREATE INDEX `listInvitations_listId_idx` ON `listInvitations` (`listId`)
type `listInvitations_userId_idx` (line 16) | CREATE INDEX `listInvitations_userId_idx` ON `listInvitations` (`userId`)
type `listInvitations_status_idx` (line 17) | CREATE INDEX `listInvitations_status_idx` ON `listInvitations` (`status`)
type `listInvitations_listId_userId_unique` (line 18) | CREATE UNIQUE INDEX `listInvitations_listId_userId_unique` ON `listInvit...
FILE: packages/db/drizzle/0067_add_backups_table.sql
type `backups` (line 1) | CREATE TABLE `backups` (
type `backups_userId_idx` (line 14) | CREATE INDEX `backups_userId_idx` ON `backups` (`userId`)
type `backups_createdAt_idx` (line 15) | CREATE INDEX `backups_createdAt_idx` ON `backups` (`createdAt`)
FILE: packages/db/drizzle/0068_optimize_bookmark_indicies.sql
type `bookmarks_userId_createdAt_id_idx` (line 3) | CREATE INDEX `bookmarks_userId_createdAt_id_idx` ON `bookmarks` (`userId...
type `bookmarks_userId_archived_createdAt_id_idx` (line 4) | CREATE INDEX `bookmarks_userId_archived_createdAt_id_idx` ON `bookmarks`...
type `bookmarks_userId_favourited_createdAt_id_idx` (line 5) | CREATE INDEX `bookmarks_userId_favourited_createdAt_id_idx` ON `bookmark...
type `bookmarksInLists_listId_bookmarkId_idx` (line 6) | CREATE INDEX `bookmarksInLists_listId_bookmarkId_idx` ON `bookmarksInLis...
type `rssFeedImports_rssFeedId_bookmarkId_idx` (line 7) | CREATE INDEX `rssFeedImports_rssFeedId_bookmarkId_idx` ON `rssFeedImport...
type `tagsOnBookmarks_tagId_bookmarkId_idx` (line 8) | CREATE INDEX `tagsOnBookmarks_tagId_bookmarkId_idx` ON `tagsOnBookmarks`...
FILE: packages/db/drizzle/0071_add_normalized_tag_name.sql
type `bookmarkTags_normalizedName_idx` (line 2) | CREATE INDEX `bookmarkTags_normalizedName_idx` ON `bookmarkTags` (`norma...
FILE: packages/db/drizzle/0077_import_listpaths_to_listids.sql
type `importStagingBookmarks` (line 1) | CREATE TABLE `importStagingBookmarks` (
type `importStaging_session_status_idx` (line 23) | CREATE INDEX `importStaging_session_status_idx` ON `importStagingBookmar...
type `importStaging_completedAt_idx` (line 24) | CREATE INDEX `importStaging_completedAt_idx` ON `importStagingBookmarks`...
FILE: packages/db/drizzle/0078_add_import_session_indexes.sql
type `importSessions_status_idx` (line 1) | CREATE INDEX `importSessions_status_idx` ON `importSessions` (`status`)
type `importStaging_status_idx` (line 2) | CREATE INDEX `importStaging_status_idx` ON `importStagingBookmarks` (`st...
type `importStaging_status_processingStartedAt_idx` (line 3) | CREATE INDEX `importStaging_status_processingStartedAt_idx` ON `importSt...
FILE: packages/db/drizzle/0080_user_reading_progress.sql
type `userReadingProgress` (line 1) | CREATE TABLE `userReadingProgress` (
type `userReadingProgress_bookmarkId_idx` (line 13) | CREATE INDEX `userReadingProgress_bookmarkId_idx` ON `userReadingProgres...
type `userReadingProgress_userId_idx` (line 14) | CREATE INDEX `userReadingProgress_userId_idx` ON `userReadingProgress` (...
type `userReadingProgress_bookmarkId_userId_unique` (line 15) | CREATE UNIQUE INDEX `userReadingProgress_bookmarkId_userId_unique` ON `u...
FILE: packages/db/index.ts
type KarakeepDBTransaction (line 13) | type KarakeepDBTransaction = SQLiteTransaction<
FILE: packages/db/instrumentation.ts
constant TRACER_NAME (line 4) | const TRACER_NAME = "@karakeep/db";
function getOperationType (line 6) | function getOperationType(sql: string): string {
function instrumentDatabase (line 20) | function instrumentDatabase(
FILE: packages/db/schema.ts
function createdAtField (line 18) | function createdAtField() {
function modifiedAtField (line 24) | function modifiedAtField() {
type AssetTypes (line 273) | const enum AssetTypes {
FILE: packages/e2e_tests/setup/seed.ts
function setup (line 5) | async function setup({ provide }: GlobalSetupContext) {
type ProvidedContext (line 24) | interface ProvidedContext {
FILE: packages/e2e_tests/setup/startContainers.ts
function getRandomPort (line 9) | async function getRandomPort(): Promise<number> {
function waitForHealthy (line 21) | async function waitForHealthy(port: number, timeout = 60000): Promise<vo...
type ProvidedContext (line 92) | interface ProvidedContext {
FILE: packages/e2e_tests/tests/api/bookmarks.test.ts
function uploadSinglefileAsset (line 547) | async function uploadSinglefileAsset(ifexists?: string) {
FILE: packages/e2e_tests/tests/api/public.test.ts
constant SINGING_SECRET (line 13) | const SINGING_SECRET = "secret";
function seedDatabase (line 24) | async function seedDatabase(currentApiKey: string) {
FILE: packages/e2e_tests/tests/api/rss.test.ts
function fetchRssFeed (line 15) | async function fetchRssFeed(listId: string, token: string) {
function seedDatabase (line 21) | async function seedDatabase() {
FILE: packages/e2e_tests/tests/assetdb/assetdb-utils.ts
type TestAssetData (line 20) | interface TestAssetData {
function createTestAssetData (line 27) | function createTestAssetData(
function createTestImageData (line 43) | function createTestImageData(): TestAssetData {
function createTestPdfData (line 63) | function createTestPdfData(): TestAssetData {
function createTempDirectory (line 113) | async function createTempDirectory(): Promise<string> {
function cleanupTempDirectory (line 120) | async function cleanupTempDirectory(tempDir: string): Promise<void> {
function createLocalFileSystemStore (line 128) | function createLocalFileSystemStore(
function createS3Store (line 134) | function createS3Store(bucketName: string): S3AssetStore {
function createTestBucket (line 148) | async function createTestBucket(bucketName: string): Promise<S3Client> {
function cleanupTestBucket (line 174) | async function cleanupTestBucket(
function createTempFile (line 212) | async function createTempFile(
function streamToBuffer (line 222) | async function streamToBuffer(
function generateLargeBuffer (line 235) | function generateLargeBuffer(sizeInMB: number): Buffer {
function assertAssetExists (line 247) | async function assertAssetExists(
function assertAssetNotExists (line 258) | async function assertAssetNotExists(
function getAllAssetsArray (line 275) | async function getAllAssetsArray(store: AssetStore): Promise<
FILE: packages/e2e_tests/tests/assetdb/interface-compliance.test.ts
type TestContext (line 24) | interface TestContext {
function createLocalContext (line 29) | async function createLocalContext(): Promise<TestContext> {
function createS3Context (line 41) | async function createS3Context(): Promise<TestContext> {
FILE: packages/e2e_tests/tests/workers/crawler.test.ts
function getBookmark (line 18) | async function getBookmark(bookmarkId: string) {
FILE: packages/e2e_tests/utils/api.ts
function getAuthHeader (line 3) | function getAuthHeader(apiKey: string) {
function uploadTestAsset (line 10) | async function uploadTestAsset(
function createTestUser (line 37) | async function createTestUser() {
FILE: packages/e2e_tests/utils/assets.ts
function createTestPdfFile (line 7) | function createTestPdfFile(fileName = "test.pdf"): File {
FILE: packages/e2e_tests/utils/general.ts
function waitUntil (line 1) | async function waitUntil(
FILE: packages/e2e_tests/utils/trpc.ts
function getTrpcClient (line 6) | function getTrpcClient(apiKey?: string) {
FILE: packages/open-api/index.ts
function getOpenApiDocumentation (line 18) | function getOpenApiDocumentation() {
function writeDocumentation (line 111) | function writeDocumentation() {
function checkDocumentation (line 119) | function checkDocumentation() {
FILE: packages/plugins/queue-liteque/src/index.ts
class LitequeQueueWrapper (line 24) | class LitequeQueueWrapper<T> implements Queue<T> {
method constructor (line 25) | constructor(
method ensureInit (line 31) | ensureInit(): Promise<void> {
method name (line 35) | name(): string {
method enqueue (line 39) | async enqueue(
method stats (line 48) | async stats() {
method cancelAllNonRunning (line 52) | async cancelAllNonRunning(): Promise<number> {
method _impl (line 57) | get _impl(): LQ<T> {
class LitequeQueueClient (line 62) | class LitequeQueueClient implements QueueClient {
method prepare (line 69) | async prepare(): Promise<void> {
method start (line 73) | async start(): Promise<void> {
method createQueue (line 77) | createQueue<T>(name: string, options: QueueOptions): Queue<T> {
method createRunner (line 90) | createRunner<T, R = void>(
method shutdown (line 138) | async shutdown(): Promise<void> {
class LitequeQueueProvider (line 143) | class LitequeQueueProvider implements PluginProvider<QueueClient> {
method getClient (line 146) | async getClient(): Promise<QueueClient | null> {
FILE: packages/plugins/queue-restate/src/admin.ts
type InvocationStatus (line 14) | type InvocationStatus = z.infer<typeof zStatus>;
class AdminClient (line 16) | class AdminClient {
method constructor (line 17) | constructor(private addr: string) {}
method upsertDeployment (line 19) | async upsertDeployment(deploymentAddr: string) {
method getStats (line 36) | async getStats(
FILE: packages/plugins/queue-restate/src/dispatcher.ts
function buildDispatcherService (line 15) | function buildDispatcherService<T, R>(
FILE: packages/plugins/queue-restate/src/idProvider.ts
function genId (line 18) | async function genId(ctx: Context) {
FILE: packages/plugins/queue-restate/src/index.ts
class RestateQueueWrapper (line 21) | class RestateQueueWrapper<T> implements Queue<T> {
method constructor (line 22) | constructor(
method ensureInit (line 28) | ensureInit(): Promise<void> {
method name (line 32) | name(): string {
method enqueue (line 36) | async enqueue(
method stats (line 70) | async stats(): Promise<{
method cancelAllNonRunning (line 90) | async cancelAllNonRunning(): Promise<number> {
class RestateRunnerWrapper (line 95) | class RestateRunnerWrapper<T> implements Runner<T> {
method constructor (line 96) | constructor(
method run (line 106) | async run(): Promise<void> {
method stop (line 110) | async stop(): Promise<void> {
method runUntilEmpty (line 114) | async runUntilEmpty(): Promise<void> {
method dispatcherService (line 118) | get dispatcherService(): restate.ServiceDefinition<string, unknown> {
method runnerService (line 122) | get runnerService(): restate.ServiceDefinition<string, unknown> {
class RestateQueueClient (line 127) | class RestateQueueClient implements QueueClient {
method constructor (line 132) | constructor() {
method prepare (line 138) | async prepare(): Promise<void> {
method start (line 142) | async start(): Promise<void> {
method createQueue (line 175) | createQueue<T>(name: string, opts: QueueOptions): Queue<T> {
method createRunner (line 184) | createRunner<T, R = void>(
method shutdown (line 203) | async shutdown(): Promise<void> {
class RestateQueueProvider (line 208) | class RestateQueueProvider implements PluginProvider<QueueClient> {
method isConfigured (line 211) | static isConfigured(): boolean {
method getClient (line 215) | async getClient(): Promise<QueueClient | null> {
FILE: packages/plugins/queue-restate/src/runner.ts
function serializeError (line 9) | function serializeError(error: Error): SerializedError {
function runnerServiceName (line 17) | function runnerServiceName(queueName: string): string {
function buildRunnerService (line 21) | function buildRunnerService<T, R>(
FILE: packages/plugins/queue-restate/src/semaphore.ts
type QueueItem (line 11) | interface QueueItem {
type LegacyQueueState (line 18) | interface LegacyQueueState {
type QueueState (line 25) | interface QueueState {
type GroupState (line 31) | interface GroupState {
function selectAndPopItem (line 178) | function selectAndPopItem(
function pruneExpiredLeases (line 223) | function pruneExpiredLeases(state: QueueState, now: number) {
function tick (line 232) | async function tick(
function getState (line 251) | async function getState(
function idempotencyKeyAlreadyExists (line 265) | function idempotencyKeyAlreadyExists(
function setState (line 277) | function setState(ctx: ObjectContext<LegacyQueueState>, state: QueueStat...
class RestateSemaphore (line 283) | class RestateSemaphore {
method constructor (line 284) | constructor(
method acquire (line 291) | async acquire(priority: number, groupId?: string, idempotencyKey?: str...
method release (line 318) | async release(leaseId: string) {
FILE: packages/plugins/queue-restate/src/service.ts
type RestateServicePair (line 11) | interface RestateServicePair<T, R> {
function buildRestateServices (line 16) | function buildRestateServices<T, R>(
FILE: packages/plugins/queue-restate/src/tests/queue.test.ts
class Baton (line 19) | class Baton {
method constructor (line 24) | constructor() {
method acquire (line 33) | async acquire() {
method waitUntilCountWaiting (line 38) | async waitUntilCountWaiting(count: number) {
method release (line 44) | release() {
type TestAction (line 49) | type TestAction =
function waitUntilQueueEmpty (line 82) | async function waitUntilQueueEmpty() {
FILE: packages/plugins/queue-restate/src/tests/setup/startContainers.ts
function getRandomPort (line 9) | async function getRandomPort(): Promise<number> {
function waitForHealthy (line 21) | async function waitForHealthy(
type ProvidedContext (line 86) | interface ProvidedContext {
FILE: packages/plugins/queue-restate/src/tests/utils.ts
function waitUntil (line 1) | async function waitUntil(
FILE: packages/plugins/queue-restate/src/types.ts
type SerializedError (line 12) | type SerializedError = z.infer<typeof zSerializedError>;
function zRunnerJobData (line 17) | function zRunnerJobData<T extends z.ZodTypeAny>(payloadSchema: T) {
type RunnerJobData (line 28) | interface RunnerJobData<T> {
type RunnerResult (line 55) | type RunnerResult<R> =
function zOnCompletedRequest (line 63) | function zOnCompletedRequest<T extends z.ZodTypeAny>(payloadSchema: T) {
function zOnErrorRequest (line 73) | function zOnErrorRequest<T extends z.ZodTypeAny>(payloadSchema: T) {
FILE: packages/plugins/ratelimit-memory/src/index.ts
type RateLimitEntry (line 8) | interface RateLimitEntry {
class RateLimiter (line 13) | class RateLimiter implements RateLimitClient {
method constructor (line 17) | constructor(cleanupProbability = 0.01) {
method cleanupExpiredEntries (line 22) | private cleanupExpiredEntries() {
method checkRateLimit (line 31) | checkRateLimit(config: RateLimitConfig, key: string): RateLimitResult {
method reset (line 67) | reset(config: RateLimitConfig, key: string) {
method clear (line 72) | clear() {
class RateLimitProvider (line 77) | class RateLimitProvider implements PluginProvider<RateLimitClient> {
method getClient (line 80) | async getClient(): Promise<RateLimitClient | null> {
FILE: packages/plugins/ratelimit-redis/src/index.ts
constant KEY_PREFIX (line 12) | const KEY_PREFIX = "ratelimit:v1";
class RedisRateLimiter (line 16) | class RedisRateLimiter implements RateLimitClient {
method constructor (line 19) | constructor(redis: RedisClientType) {
method checkRateLimit (line 23) | async checkRateLimit(
method reset (line 106) | async reset(config: RateLimitConfig, key: string) {
method clear (line 116) | async clear() {
method disconnect (line 134) | async disconnect() {
type RedisRateLimiterOptions (line 141) | interface RedisRateLimiterOptions {
class RedisRateLimitProvider (line 145) | class RedisRateLimitProvider implements PluginProvider<RateLimitClient> {
method constructor (line 152) | constructor(options: RedisRateLimiterOptions) {
method createRedisClient (line 156) | private createRedisClient(): RedisClientType {
method setupLifecycleHandlers (line 166) | private setupLifecycleHandlers(redis: RedisClientType): void {
method initializeClient (line 182) | private async initializeClient(): Promise<RedisRateLimiter | null> {
method getClient (line 202) | async getClient(): Promise<RateLimitClient | null> {
FILE: packages/plugins/ratelimit-redis/src/tests/setup/startContainers.ts
function getRandomPort (line 9) | async function getRandomPort(): Promise<number> {
function waitForHealthy (line 21) | async function waitForHealthy(port: number, timeout = 30000): Promise<vo...
type ProvidedContext (line 87) | interface ProvidedContext {
FILE: packages/plugins/ratelimit-redis/src/tests/utils.ts
function waitUntil (line 1) | async function waitUntil(
FILE: packages/plugins/search-meilisearch/src/index.ts
function filterToMeiliSearchFilter (line 18) | function filterToMeiliSearchFilter(filter: FilterQuery): string {
type PendingOperation (line 31) | type PendingOperation =
class BatchingDocumentQueue (line 45) | class BatchingDocumentQueue {
method constructor (line 50) | constructor(
method addDocument (line 57) | async addDocument(document: BookmarkSearchDocument): Promise<void> {
method deleteDocument (line 68) | async deleteDocument(id: string): Promise<void> {
method scheduleFlush (line 79) | private scheduleFlush(): void {
method flush (line 87) | private async flush(): Promise<void> {
method flushAddBatch (line 121) | private async flushAddBatch(
method flushDeleteBatch (line 138) | private async flushDeleteBatch(
method ensureTaskSuccess (line 153) | private async ensureTaskSuccess(taskUid: number): Promise<void> {
class MeiliSearchIndexClient (line 164) | class MeiliSearchIndexClient implements SearchIndexClient {
method constructor (line 168) | constructor(
method addDocuments (line 183) | async addDocuments(
method deleteDocuments (line 202) | async deleteDocuments(
method search (line 217) | async search(options: SearchOptions): Promise<SearchResponse> {
method clearIndex (line 237) | async clearIndex(): Promise<void> {
method ensureTaskSuccess (line 242) | private async ensureTaskSuccess(taskUid: number): Promise<void> {
class MeiliSearchProvider (line 253) | class MeiliSearchProvider implements PluginProvider<SearchIndexClient> {
method constructor (line 259) | constructor() {
method isConfigured (line 268) | static isConfigured(): boolean {
method getClient (line 272) | async getClient(): Promise<SearchIndexClient | null> {
method initClient (line 287) | private async initClient(): Promise<SearchIndexClient | null> {
method configureIndex (line 315) | private async configureIndex(
FILE: packages/sdk/src/index.ts
type KarakeepAPISchemas (line 12) | type KarakeepAPISchemas = components["schemas"];
FILE: packages/sdk/src/karakeep-api.d.ts
type paths (line 6) | interface paths {
type webhooks (line 2366) | type webhooks = Record<string, never>;
type components (line 2367) | interface components {
type $defs (line 2548) | type $defs = Record<string, never>;
type operations (line 2549) | type operations = Record<string, never>;
FILE: packages/shared-react/components/BookmarkHtmlHighlighter.tsx
type HighlightFormProps (line 22) | interface HighlightFormProps {
type Highlight (line 130) | interface Highlight {
type HTMLHighlighterProps (line 139) | interface HTMLHighlighterProps {
FILE: packages/shared-react/components/ScrollProgressTracker.tsx
constant IDLE_SAVE_DELAY_MS (line 18) | const IDLE_SAVE_DELAY_MS = 5000;
constant PROGRESS_BAR_HIDE_DELAY_MS (line 21) | const PROGRESS_BAR_HIDE_DELAY_MS = 2000;
type ScrollProgressTrackerProps (line 23) | interface ScrollProgressTrackerProps {
FILE: packages/shared-react/components/highlights.ts
constant HIGHLIGHT_COLOR_MAP (line 2) | const HIGHLIGHT_COLOR_MAP = {
FILE: packages/shared-react/components/ui/button.tsx
type ButtonProps (line 44) | interface ButtonProps
FILE: packages/shared-react/components/ui/textarea.tsx
type TextareaProps (line 4) | type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
FILE: packages/shared-react/hooks/assets.ts
type TRPCApi (line 5) | type TRPCApi = ReturnType<typeof useTRPC>;
function useAttachBookmarkAsset (line 7) | function useAttachBookmarkAsset(
function useReplaceBookmarkAsset (line 30) | function useReplaceBookmarkAsset(
function useDetachBookmarkAsset (line 53) | function useDetachBookmarkAsset(
FILE: packages/shared-react/hooks/bookmark-grid-context.tsx
function BookmarkGridContextProvider (line 11) | function BookmarkGridContextProvider({
function useBookmarkGridContext (line 25) | function useBookmarkGridContext() {
FILE: packages/shared-react/hooks/bookmark-list-context.tsx
function BookmarkListContextProvider (line 11) | function BookmarkListContextProvider({
function useBookmarkListContext (line 25) | function useBookmarkListContext() {
FILE: packages/shared-react/hooks/bookmarks.ts
type TRPCApi (line 9) | type TRPCApi = ReturnType<typeof useTRPC>;
function useAutoRefreshingBookmarkQuery (line 11) | function useAutoRefreshingBookmarkQuery(
function useCreateBookmark (line 28) | function useCreateBookmark(
function useCreateBookmarkWithPostHook (line 50) | function useCreateBookmarkWithPostHook(
function useDeleteBookmark (line 73) | function useDeleteBookmark(
function useUpdateBookmark (line 98) | function useUpdateBookmark(
function useSummarizeBookmark (line 123) | function useSummarizeBookmark(
function useRecrawlBookmark (line 147) | function useRecrawlBookmark(
function useUpdateBookmarkTags (line 167) | function useUpdateBookmarkTags(
function useBookmarkPostCreationHook (line 199) | function useBookmarkPostCreationHook() {
FILE: packages/shared-react/hooks/highlights.ts
type TRPCApi (line 5) | type TRPCApi = ReturnType<typeof useTRPC>;
function useCreateHighlight (line 7) | function useCreateHighlight(
function useUpdateHighlight (line 28) | function useUpdateHighlight(
function useDeleteHighlight (line 49) | function useDeleteHighlight(
FILE: packages/shared-react/hooks/lists.ts
type TRPCApi (line 11) | type TRPCApi = ReturnType<typeof useTRPC>;
function useCreateBookmarkList (line 13) | function useCreateBookmarkList(
function useEditBookmarkList (line 29) | function useEditBookmarkList(
function useMergeLists (line 53) | function useMergeLists(
function useAddBookmarkToList (line 73) | function useAddBookmarkToList(
function useRemoveBookmarkFromList (line 97) | function useRemoveBookmarkFromList(
function useDeleteBookmarkList (line 121) | function useDeleteBookmarkList(
function useBookmarkLists (line 140) | function useBookmarkLists(
function augmentBookmarkListsWithInitialData (line 155) | function augmentBookmarkListsWithInitialData(
FILE: packages/shared-react/hooks/reader-settings.tsx
type UseReaderSettingsOptions (line 22) | interface UseReaderSettingsOptions {
function useReaderSettings (line 42) | function useReaderSettings(options: UseReaderSettingsOptions) {
type ReaderSettingsContextValue (line 251) | type ReaderSettingsContextValue = ReturnType<typeof useReaderSettings>;
type ReaderSettingsProviderProps (line 257) | interface ReaderSettingsProviderProps extends UseReaderSettingsOptions {
function ReaderSettingsProvider (line 265) | function ReaderSettingsProvider({
function useReaderSettingsContext (line 282) | function useReaderSettingsContext() {
FILE: packages/shared-react/hooks/reading-progress.ts
type UseReadingProgressOptions (line 8) | interface UseReadingProgressOptions {
function useReadingProgress (line 24) | function useReadingProgress({ bookmarkId }: UseReadingProgressOptions) {
FILE: packages/shared-react/hooks/rules.ts
type TRPCApi (line 5) | type TRPCApi = ReturnType<typeof useTRPC>;
function useCreateRule (line 7) | function useCreateRule(
function useUpdateRule (line 23) | function useUpdateRule(
function useDeleteRule (line 39) | function useDeleteRule(
FILE: packages/shared-react/hooks/search-history.ts
constant BOOKMARK_SEARCH_HISTORY_KEY (line 6) | const BOOKMARK_SEARCH_HISTORY_KEY = "karakeep_search_history";
constant MAX_STORED_ITEMS (line 7) | const MAX_STORED_ITEMS = 50;
class SearchHistoryUtil (line 9) | class SearchHistoryUtil {
method constructor (line 10) | constructor(
method getSearchHistory (line 18) | async getSearchHistory(): Promise<string[]> {
method addSearchTermToHistory (line 37) | async addSearchTermToHistory(term: string): Promise<void> {
method clearSearchHistory (line 57) | async clearSearchHistory(): Promise<void> {
function useSearchHistory (line 66) | function useSearchHistory(adapter: {
FILE: packages/shared-react/hooks/tags.ts
type TRPCApi (line 13) | type TRPCApi = ReturnType<typeof useTRPC>;
function usePaginatedSearchTags (line 15) | function usePaginatedSearchTags(
function useTagAutocomplete (line 31) | function useTagAutocomplete<T = ZTagListResponse>(opts: {
function useCreateTag (line 54) | function useCreateTag(
function useUpdateTag (line 71) | function useUpdateTag(
function useMergeTag (line 97) | function useMergeTag(
function useDeleteTag (line 122) | function useDeleteTag(
function useDeleteUnusedTags (line 140) | function useDeleteUnusedTags(
FILE: packages/shared-react/hooks/use-debounce.ts
function useDebounce (line 3) | function useDebounce<T>(value: T, delayMs: number): T {
FILE: packages/shared-react/hooks/users.ts
type TRPCApi (line 5) | type TRPCApi = ReturnType<typeof useTRPC>;
function useUpdateUserSettings (line 7) | function useUpdateUserSettings(
function useUpdateUserAvatar (line 23) | function useUpdateUserAvatar(
function useDeleteAccount (line 39) | function useDeleteAccount(
function useWhoAmI (line 46) | function useWhoAmI() {
FILE: packages/shared-react/lib/utils.ts
function cn (line 5) | function cn(...inputs: ClassValue[]) {
FILE: packages/shared-react/providers/trpc-provider.tsx
type Settings (line 10) | interface Settings {
function makeQueryClient (line 18) | function makeQueryClient() {
function getQueryClient (line 28) | function getQueryClient() {
function getTRPCClient (line 42) | function getTRPCClient(settings: Settings) {
function TRPCSettingsProvider (line 96) | function TRPCSettingsProvider({
FILE: packages/shared-server/src/plugins.ts
function loadAllPlugins (line 4) | async function loadAllPlugins() {
FILE: packages/shared-server/src/queues.ts
type QueuePriority (line 14) | enum QueuePriority {
function getClient (line 23) | function getClient(): Promise<QueueClient> {
function createDeferredQueue (line 37) | function createDeferredQueue<T>(name: string, options: QueueOptions): Qu...
function prepareQueue (line 70) | async function prepareQueue() {
function startQueue (line 75) | async function startQueue() {
type ZCrawlLinkRequest (line 87) | type ZCrawlLinkRequest = z.input<typeof zCrawlLinkRequestSchema>;
type ZOpenAIRequest (line 116) | type ZOpenAIRequest = z.infer<typeof zOpenAIRequestSchema>;
type ZSearchIndexingRequest (line 130) | type ZSearchIndexingRequest = z.infer<
type ZTidyAssetsRequest (line 148) | type ZTidyAssetsRequest = z.infer<typeof zTidyAssetsRequestSchema>;
type ZAdminMaintenanceTask (line 160) | type ZAdminMaintenanceTask = z.infer<typeof zAdminMaintenanceTaskSchema>;
type ZAdminMaintenanceTaskType (line 161) | type ZAdminMaintenanceTaskType = ZAdminMaintenanceTask["type"];
type ZAdminMaintenanceTidyAssetsTask (line 162) | type ZAdminMaintenanceTidyAssetsTask = Extract<
type ZAdminMaintenanceMigrateLargeLinkHtmlTask (line 166) | type ZAdminMaintenanceMigrateLargeLinkHtmlTask = Extract<
function triggerSearchReindex (line 181) | async function triggerSearchReindex(
type ZVideoRequest (line 201) | type ZVideoRequest = z.infer<typeof zvideoRequestSchema>;
type ZFeedRequestSchema (line 217) | type ZFeedRequestSchema = z.infer<typeof zFeedRequestSchema>;
type AssetPreprocessingRequest (line 232) | type AssetPreprocessingRequest = z.infer<
type ZWebhookRequest (line 249) | type ZWebhookRequest = z.infer<typeof zWebhookRequestSchema>;
function triggerWebhook (line 260) | async function triggerWebhook(
type ZRuleEngineRequest (line 281) | type ZRuleEngineRequest = z.infer<typeof zRuleEngineRequestSchema>;
function triggerRuleEngineOnEvent (line 292) | async function triggerRuleEngineOnEvent(
type ZBackupRequest (line 311) | type ZBackupRequest = z.infer<typeof zBackupRequestSchema>;
FILE: packages/shared-server/src/services/quotaService.ts
class StorageQuotaError (line 7) | class StorageQuotaError extends Error {
method constructor (line 8) | constructor(
class QuotaService (line 22) | class QuotaService {
method canCreateBookmark (line 25) | static async canCreateBookmark(
method checkStorageQuota (line 54) | static async checkStorageQuota(
method getCurrentStorageUsage (line 85) | static async getCurrentStorageUsage(
FILE: packages/shared-server/src/tracing.ts
function initTracing (line 38) | function initTracing(serviceSuffix?: string): void {
function shutdownTracing (line 98) | async function shutdownTracing(): Promise<void> {
function getTracer (line 109) | function getTracer(name: string): Tracer {
function getActiveSpan (line 116) | function getActiveSpan(): Span | undefined {
function getActiveContext (line 123) | function getActiveContext(): Context {
function withSpan (line 131) | async function withSpan<T>(
function withSpanSync (line 170) | function withSpanSync<T>(
function addSpanEvent (line 207) | function addSpanEvent(
function setSpanAttributes (line 220) | function setSpanAttributes(attributes: TracingAttributes): void {
function recordSpanError (line 230) | function recordSpanError(error: Error): void {
function extractTraceContext (line 244) | function extractTraceContext(
function injectTraceContext (line 259) | function injectTraceContext(
function runWithContext (line 269) | function runWithContext<T>(ctx: Context, fn: () => T): T {
FILE: packages/shared-server/src/tracingTypes.ts
type TracingAttributeKey (line 1) | type TracingAttributeKey =
type TracingAttributes (line 50) | type TracingAttributes = Partial<
FILE: packages/shared/assetdb.ts
constant ROOT_PATH (line 21) | const ROOT_PATH = serverConfig.assetsDir;
type ASSET_TYPES (line 23) | const enum ASSET_TYPES {
constant VIDEO_ASSET_TYPES (line 37) | const VIDEO_ASSET_TYPES: Set<string> = new Set<string>([
constant IMAGE_ASSET_TYPES (line 43) | const IMAGE_ASSET_TYPES: Set<string> = new Set<string>([
constant SUPPORTED_UPLOAD_ASSET_TYPES (line 51) | const SUPPORTED_UPLOAD_ASSET_TYPES: Set<string> = new Set<string>([
constant SUPPORTED_BOOKMARK_ASSET_TYPES (line 59) | const SUPPORTED_BOOKMARK_ASSET_TYPES: Set<string> = new Set<string>([
constant SUPPORTED_ASSET_TYPES (line 65) | const SUPPORTED_ASSET_TYPES: Set<string> = new Set<string>([
type AssetMetadata (line 77) | type AssetMetadata = z.infer<typeof zAssetMetadataSchema>;
type AssetInfo (line 79) | interface AssetInfo {
type AssetStore (line 87) | interface AssetStore {
function newAssetId (line 128) | function newAssetId() {
class LocalFileSystemAssetStore (line 132) | class LocalFileSystemAssetStore implements AssetStore {
method constructor (line 135) | constructor(rootPath: string) {
method getAssetDir (line 139) | private getAssetDir(userId: string, assetId: string) {
method isPathExists (line 143) | private async isPathExists(filePath: string) {
method saveAsset (line 150) | async saveAsset({
method saveAssetFromFile (line 179) | async saveAssetFromFile({
method readAsset (line 206) | async readAsset({ userId, assetId }: { userId: string; assetId: string...
method createAssetReadStream (line 220) | async createAssetReadStream({
method readAssetMetadata (line 243) | async readAssetMetadata({
method getAssetSize (line 262) | async getAssetSize({ userId, assetId }: { userId: string; assetId: str...
method deleteAsset (line 268) | async deleteAsset({ userId, assetId }: { userId: string; assetId: stri...
method deleteUserAssets (line 276) | async deleteUserAssets({ userId }: { userId: string }) {
method getAllAssets (line 285) | async *getAllAssets() {
class S3AssetStore (line 308) | class S3AssetStore implements AssetStore {
method constructor (line 312) | constructor(s3Client: S3Client, bucketName: string) {
method getAssetKey (line 317) | private getAssetKey(userId: string, assetId: string) {
method metadataToS3Metadata (line 321) | private metadataToS3Metadata(
method s3MetadataToMetadata (line 332) | private s3MetadataToMetadata(
method saveAsset (line 345) | async saveAsset({
method saveAssetFromFile (line 371) | async saveAssetFromFile({
method readAsset (line 399) | async readAsset({ userId, assetId }: { userId: string; assetId: string...
method createAssetReadStream (line 417) | async createAssetReadStream({
method readAssetMetadata (line 446) | async readAssetMetadata({
method getAssetSize (line 463) | async getAssetSize({ userId, assetId }: { userId: string; assetId: str...
method deleteAsset (line 474) | async deleteAsset({ userId, assetId }: { userId: string; assetId: stri...
method deleteUserAssets (line 483) | async deleteUserAssets({ userId }: { userId: string }) {
method getAllAssets (line 512) | async *getAllAssets() {
method streamToBuffer (line 560) | private async streamToBuffer(stream: Readable): Promise<Buffer> {
function createDefaultAssetStore (line 569) | function createDefaultAssetStore(): AssetStore {
function saveAsset (line 629) | async function saveAsset({
function saveAssetFromFile (line 653) | async function saveAssetFromFile({
function readAsset (line 682) | async function readAsset({
function createAssetReadStream (line 692) | async function createAssetReadStream({
function readAssetMetadata (line 711) | async function readAssetMetadata({
function getAssetSize (line 721) | async function getAssetSize({
function silentDeleteAsset (line 736) | async function silentDeleteAsset(
function deleteAsset (line 745) | async function deleteAsset({
function deleteUserAssets (line 755) | async function deleteUserAssets({ userId }: { userId: string }) {
FILE: packages/shared/concurrency.ts
class AsyncSemaphore (line 1) | class AsyncSemaphore {
method constructor (line 5) | constructor(permits: number) {
method acquire (line 9) | acquire(): Promise<void> {
method release (line 20) | release(): void {
method available (line 31) | get available(): number {
function limitConcurrency (line 36) | function limitConcurrency<T>(
FILE: packages/shared/config.ts
type ClientConfig (line 505) | type ClientConfig = typeof clientConfig;
FILE: packages/shared/customFetch.ts
type FetchFunction (line 4) | type FetchFunction = (
function createCustomFetch (line 10) | function createCustomFetch(fetchImpl: FetchFunction = globalThis.fetch) {
FILE: packages/shared/debug.ts
function tap (line 1) | function tap<T>(t: T, cb: (t: T) => void): T {
function debugPrint (line 6) | function debugPrint<T>(t: T): T {
FILE: packages/shared/import-export/exporters.ts
function toExportFormat (line 42) | function toExportFormat(
function toExportListFormat (line 79) | function toExportListFormat(
function toNetscapeFormat (line 93) | function toNetscapeFormat(bookmarks: ZBookmark[]): string {
function escapeHtml (line 129) | function escapeHtml(input: string): string {
FILE: packages/shared/import-export/importer.ts
type ImportCounts (line 4) | interface ImportCounts {
type StagedBookmark (line 11) | interface StagedBookmark {
type ImportDeps (line 22) | interface ImportDeps {
type ImportOptions (line 42) | interface ImportOptions {
type ImportResult (line 49) | interface ImportResult {
function importBookmarksFromFile (line 55) | async function importBookmarksFromFile(
FILE: packages/shared/import-export/parsers.ts
type ImportSource (line 11) | type ImportSource =
type ParsedBookmark (line 22) | interface ParsedBookmark {
type ParsedImportList (line 36) | interface ParsedImportList {
type ParsedImportFile (line 46) | interface ParsedImportFile {
function parseNetscapeBookmarkFile (line 51) | function parseNetscapeBookmarkFile(textContent: string): ParsedBookmark[] {
function parsePocketBookmarkFile (line 111) | function parsePocketBookmarkFile(textContent: string): ParsedBookmark[] {
function parseMatterBookmarkFile (line 135) | function parseMatterBookmarkFile(textContent: string): ParsedBookmark[] {
function parseKarakeepBookmarkFile (line 181) | function parseKarakeepBookmarkFile(textContent: string): ParsedImportFile {
function parseOmnivoreBookmarkFile (line 238) | function parseOmnivoreBookmarkFile(textContent: string): ParsedBookmark[] {
function parseLinkwardenBookmarkFile (line 268) | function parseLinkwardenBookmarkFile(textContent: string): ParsedBookmar...
function parseTabSessionManagerStateFile (line 324) | function parseTabSessionManagerStateFile(
function parseMymindBookmarkFile (line 363) | function parseMymindBookmarkFile(textContent: string): ParsedBookmark[] {
function parseInstapaperBookmarkFile (line 424) | function parseInstapaperBookmarkFile(textContent: string): ParsedBookmar...
function deduplicateBookmarks (line 482) | function deduplicateBookmarks(bookmarks: ParsedBookmark[]): ParsedBookma...
function parseImportFile (line 531) | function parseImportFile(
FILE: packages/shared/inference.ts
type InferenceResponse (line 12) | interface InferenceResponse {
type EmbeddingResponse (line 17) | interface EmbeddingResponse {
type InferenceOptions (line 21) | interface InferenceOptions {
type InferenceClient (line 31) | interface InferenceClient {
type OpenAIInferenceConfig (line 55) | interface OpenAIInferenceConfig {
class InferenceClientFactory (line 68) | class InferenceClientFactory {
method build (line 69) | static build(): InferenceClient | null {
class OpenAIInferenceClient (line 81) | class OpenAIInferenceClient implements InferenceClient {
method constructor (line 85) | constructor(config: OpenAIInferenceConfig) {
method fromConfig (line 105) | static fromConfig(): OpenAIInferenceClient {
method inferFromText (line 120) | async inferFromText(
method inferFromImage (line 161) | async inferFromImage(
method generateEmbeddingFromText (line 218) | async generateEmbeddingFromText(
type OllamaInferenceConfig (line 233) | interface OllamaInferenceConfig {
class OllamaInferenceClient (line 243) | class OllamaInferenceClient implements InferenceClient {
method constructor (line 247) | constructor(config: OllamaInferenceConfig) {
method fromConfig (line 255) | static fromConfig(): OllamaInferenceClient {
method runModel (line 267) | async runModel(
method inferFromText (line 339) | async inferFromText(
method inferFromImage (line 355) | async inferFromImage(
method generateEmbeddingFromText (line 373) | async generateEmbeddingFromText(
FILE: packages/shared/logger.ts
function throttledLogger (line 17) | function throttledLogger(periodMs: number) {
FILE: packages/shared/plugins.ts
type PluginType (line 8) | enum PluginType {
type PluginTypeMap (line 14) | interface PluginTypeMap {
type TPlugin (line 20) | interface TPlugin<T extends PluginType> {
type PluginProvider (line 26) | interface PluginProvider<T> {
type ProviderMap (line 31) | type ProviderMap = { [K in PluginType]: TPlugin<K>[] };
class PluginManager (line 33) | class PluginManager {
method register (line 40) | static register<T extends PluginType>(plugin: TPlugin<T>): void {
method getClient (line 44) | static async getClient<T extends PluginType>(
method isRegistered (line 54) | static isRegistered<T extends PluginType>(type: T): boolean {
method getPluginName (line 58) | static getPluginName<T extends PluginType>(type: T): string | null {
method logAllPlugins (line 66) | static logAllPlugins() {
FILE: packages/shared/prompts.server.ts
function getEncodingInstance (line 12) | async function getEncodingInstance(): Promise<Tiktoken> {
function calculateNumTokens (line 21) | async function calculateNumTokens(text: string): Promise<number> {
function truncateContent (line 26) | async function truncateContent(
function preprocessContent (line 42) | function preprocessContent(content: string) {
function buildTextPrompt (line 46) | async function buildTextPrompt(
function buildSummaryPrompt (line 75) | async function buildSummaryPrompt(
FILE: packages/shared/prompts.ts
function preprocessContent (line 7) | function preprocessContent(content: string) {
function buildImagePrompt (line 11) | function buildImagePrompt(
function constructTextTaggingPrompt (line 37) | function constructTextTaggingPrompt(
function constructSummaryPrompt (line 71) | function constructSummaryPrompt(
function buildTextPromptUntruncated (line 87) | function buildTextPromptUntruncated(
function buildSummaryPromptUntruncated (line 106) | function buildSummaryPromptUntruncated(
function buildOCRPrompt (line 121) | function buildOCRPrompt(): string {
FILE: packages/shared/queueing.ts
class QueueRetryAfterError (line 10) | class QueueRetryAfterError extends Error {
method constructor (line 11) | constructor(
type EnqueueOptions (line 20) | interface EnqueueOptions {
type QueueOptions (line 27) | interface QueueOptions {
type DequeuedJob (line 34) | interface DequeuedJob<T> {
type DequeuedJobError (line 42) | interface DequeuedJobError<T> {
type RunnerFuncs (line 51) | interface RunnerFuncs<T, R = void> {
type RunnerOptions (line 57) | interface RunnerOptions<T> {
type Queue (line 64) | interface Queue<T> {
type Runner (line 78) | interface Runner<_T> {
type QueueClient (line 84) | interface QueueClient {
function getQueueClient (line 96) | async function getQueueClient(): Promise<QueueClient> {
FILE: packages/shared/ratelimiting.ts
type RateLimitConfig (line 3) | interface RateLimitConfig {
type RateLimitResult (line 9) | type RateLimitResult =
type RateLimitClient (line 13) | interface RateLimitClient {
function getRateLimitClient (line 38) | async function getRateLimitClient(): Promise<RateLimitClient | null> {
FILE: packages/shared/search.ts
type BookmarkSearchDocument (line 25) | type BookmarkSearchDocument = z.infer<typeof zBookmarkSearchDocument>;
type SortOrder (line 27) | type SortOrder = "asc" | "desc";
type SortableAttributes (line 28) | type SortableAttributes = "createdAt";
type FilterableAttributes (line 30) | type FilterableAttributes = "userId" | "id";
type FilterQuery (line 31) | type FilterQuery =
type SearchResult (line 43) | interface SearchResult {
type SearchOptions (line 48) | interface SearchOptions {
type SearchResponse (line 57) | interface SearchResponse {
type IndexingOptions (line 63) | interface IndexingOptions {
type SearchIndexClient (line 71) | interface SearchIndexClient {
function getSearchClient (line 81) | async function getSearchClient(): Promise<SearchIndexClient | null> {
FILE: packages/shared/searchQueryParser.ts
type TokenType (line 23) | enum TokenType {
class LexerToken (line 62) | class LexerToken implements Token<TokenType> {
method constructor (line 63) | private constructor(
method from (line 70) | public static from(input: string): Token<TokenType> | undefined {
method next (line 86) | public get next(): Token<TokenType> | undefined {
type TextAndMatcher (line 113) | interface TextAndMatcher {
constant MATCHER (line 118) | const MATCHER = rule<TokenType, TextAndMatcher>();
constant EXP (line 119) | const EXP = rule<TokenType, TextAndMatcher>();
function flattenAndsAndOrs (line 369) | function flattenAndsAndOrs(matcher: Matcher): Matcher {
function _parseAndPrintTokens (line 394) | function _parseAndPrintTokens(query: string) {
function consumeTokenStream (line 404) | function consumeTokenStream(token: Token<TokenType>) {
function parseSearchQuery (line 414) | function parseSearchQuery(
FILE: packages/shared/signedTokens.test.ts
constant SECRET (line 11) | const SECRET = "secret";
FILE: packages/shared/signedTokens.ts
function getAlignedExpiry (line 24) | function getAlignedExpiry(
type SignedTokenPayload (line 48) | type SignedTokenPayload = z.infer<typeof zSignedTokenPayload>;
function createSignedToken (line 50) | function createSignedToken(
function verifySignedToken (line 76) | function verifySignedToken<T>(
FILE: packages/shared/storageQuota.ts
class QuotaApproved (line 6) | class QuotaApproved {
method constructor (line 7) | private constructor(
method _create (line 16) | static _create(userId: string, approvedSize: number): QuotaApproved {
FILE: packages/shared/trpc.ts
constant TRPC_MAX_URL_LENGTH_INTERNAL (line 24) | const TRPC_MAX_URL_LENGTH_INTERNAL = 14000;
constant TRPC_MAX_URL_LENGTH_EXTERNAL (line 25) | const TRPC_MAX_URL_LENGTH_EXTERNAL = 4000;
FILE: packages/shared/tryCatch.ts
type Success (line 2) | interface Success<T> {
type Failure (line 7) | interface Failure<E> {
type Result (line 12) | type Result<T, E = Error> = Success<T> | Failure<E>;
function tryCatch (line 15) | async function tryCatch<T, E = Error>(
FILE: packages/shared/types/backups.ts
type ZBackup (line 14) | type ZBackup = z.infer<typeof zBackupSchema>;
FILE: packages/shared/types/bookmarks.ts
constant MAX_BOOKMARK_TITLE_LENGTH (line 6) | const MAX_BOOKMARK_TITLE_LENGTH = 1000;
type BookmarkTypes (line 8) | const enum BookmarkTypes {
type ZSortOrder (line 16) | type ZSortOrder = z.infer<typeof zSortOrder>;
type ZAssetType (line 32) | type ZAssetType = z.infer<typeof zAssetTypesSchema>;
type ZBookmarkedLink (line 62) | type ZBookmarkedLink = z.infer<typeof zBookmarkedLinkSchema>;
type ZBookmarkedText (line 69) | type ZBookmarkedText = z.infer<typeof zBookmarkedTextSchema>;
type ZBookmarkedAsset (line 80) | type ZBookmarkedAsset = z.infer<typeof zBookmarkedAssetSchema>;
type ZBookmarkContent (line 88) | type ZBookmarkContent = z.infer<typeof zBookmarkContentSchema>;
type ZBookmarkSource (line 100) | type ZBookmarkSource = z.infer<typeof zBookmarkSourceSchema>;
type ZBareBookmark (line 117) | type ZBareBookmark = z.infer<typeof zBareBookmarkSchema>;
type ZBookmark (line 126) | type ZBookmark = z.infer<typeof zBookmarkSchema>;
type ZBookmarkTypeLink (line 135) | type ZBookmarkTypeLink = z.infer<typeof zBookmarkTypeLinkSchema>;
type ZBookmarkTypeText (line 144) | type ZBookmarkTypeText = z.infer<typeof zBookmarkTypeTextSchema>;
type ZBookmarkTypeAsset (line 153) | type ZBookmarkTypeAsset = z.infer<typeof zBookmarkTypeAssetSchema>;
type ZNewBookmarkRequest (line 192) | type ZNewBookmarkRequest = z.infer<typeof zNewBookmarkRequestSchema>;
constant DEFAULT_NUM_BOOKMARKS_PER_PAGE (line 196) | const DEFAULT_NUM_BOOKMARKS_PER_PAGE = 20;
constant MAX_NUM_BOOKMARKS_PER_PAGE (line 197) | const MAX_NUM_BOOKMARKS_PER_PAGE = 100;
type ZGetBookmarksRequest (line 215) | type ZGetBookmarksRequest = z.infer<typeof zGetBookmarksRequestSchema>;
type ZGetBookmarksResponse (line 221) | type ZGetBookmarksResponse = z.infer<typeof zGetBookmarksResponseSchema>;
type ZUpdateBookmarksRequest (line 246) | type ZUpdateBookmarksRequest = z.infer<
type ZPublicBookmark (line 306) | type ZPublicBookmark = z.infer<typeof zPublicBookmarkSchema>;
FILE: packages/shared/types/feeds.ts
constant MAX_FEED_URL_LENGTH (line 3) | const MAX_FEED_URL_LENGTH = 2000;
constant MAX_FEED_NAME_LENGTH (line 4) | const MAX_FEED_NAME_LENGTH = 100;
type ZFeed (line 18) | type ZFeed = z.infer<typeof zFeedSchema>;
FILE: packages/shared/types/highlights.ts
constant DEFAULT_NUM_HIGHLIGHTS_PER_PAGE (line 5) | const DEFAULT_NUM_HIGHLIGHTS_PER_PAGE = 20;
type ZHighlightColor (line 8) | type ZHighlightColor = z.infer<typeof zHighlightColorSchema>;
constant SUPPORTED_HIGHLIGHT_COLORS (line 9) | const SUPPORTED_HIGHLIGHT_COLORS = zHighlightColorSchema.options;
type ZHighlight (line 28) | type ZHighlight = z.infer<typeof zHighlightSchema>;
type ZGetAllHighlightsResponse (line 42) | type ZGetAllHighlightsResponse = z.infer<
FILE: packages/shared/types/importSessions.ts
type ZImportSessionStatus (line 11) | type ZImportSessionStatus = z.infer<typeof zImportSessionStatusSchema>;
type ZImportSessionBookmarkStatus (line 19) | type ZImportSessionBookmarkStatus = z.infer<
type ZImportSession (line 33) | type ZImportSession = z.infer<typeof zImportSessionSchema>;
type ZImportSessionWithStats (line 42) | type ZImportSessionWithStats = z.infer<
type ZCreateImportSessionRequest (line 50) | type ZCreateImportSessionRequest = z.infer<
type ZGetImportSessionStatsRequest (line 57) | type ZGetImportSessionStatsRequest = z.infer<
type ZListImportSessionsRequest (line 62) | type ZListImportSessionsRequest = z.infer<
type ZListImportSessionsResponse (line 69) | type ZListImportSessionsResponse = z.infer<
type ZDeleteImportSessionRequest (line 76) | type ZDeleteImportSessionRequest = z.infer<
FILE: packages/shared/types/lists.ts
constant MAX_LIST_NAME_LENGTH (line 5) | const MAX_LIST_NAME_LENGTH = 100;
constant MAX_LIST_DESCRIPTION_LENGTH (line 6) | const MAX_LIST_DESCRIPTION_LENGTH = 500;
type ZBookmarkList (line 64) | type ZBookmarkList = z.infer<typeof zBookmarkListSchema>;
type ZMergeList (line 119) | type ZMergeList = z.infer<typeof zMergeListSchema>;
FILE: packages/shared/types/pagination.ts
type ZCursor (line 8) | type ZCursor = z.infer<typeof zCursorV2>;
FILE: packages/shared/types/prompts.ts
constant MAX_PROMPT_TEXT_LENGTH (line 3) | const MAX_PROMPT_TEXT_LENGTH = 500;
type ZPrompt (line 19) | type ZPrompt = z.infer<typeof zPromptSchema>;
FILE: packages/shared/types/readers.ts
constant READER_DEFAULTS (line 5) | const READER_DEFAULTS = {
constant READER_FONT_FAMILIES (line 11) | const READER_FONT_FAMILIES: Record<ZReaderFontFamily, string> = {
constant READER_SETTING_CONSTRAINTS (line 18) | const READER_SETTING_CONSTRAINTS = {
function formatFontSize (line 24) | function formatFontSize(value: number): string {
function formatLineHeight (line 28) | function formatLineHeight(value: number): string {
function formatFontFamily (line 32) | function formatFontFamily(
type ReaderSettings (line 56) | type ReaderSettings = z.infer<typeof zReaderSettings>;
type ReaderSettingsPartial (line 59) | type ReaderSettingsPartial = z.infer<typeof zReaderSettingsPartial>;
FILE: packages/shared/types/rules.ts
type RuleEngineEvent (line 47) | type RuleEngineEvent = z.infer<typeof zRuleEngineEventSchema>;
type NonRecursiveCondition (line 116) | type NonRecursiveCondition = z.infer<typeof nonRecursiveCondition>;
type RuleEngineCondition (line 117) | type RuleEngineCondition =
type RuleEngineAction (line 189) | type RuleEngineAction = z.infer<typeof zRuleEngineActionSchema>;
type RuleEngineRule (line 200) | type RuleEngineRule = z.infer<typeof zRuleEngineRuleSchema>;
FILE: packages/shared/types/search.ts
type NonRecursiveMatcher (line 115) | type NonRecursiveMatcher = z.infer<typeof zNonRecursiveMatcher>;
type Matcher (line 116) | type Matcher =
FILE: packages/shared/types/tags.ts
constant MAX_NUM_TAGS_PER_PAGE (line 5) | const MAX_NUM_TAGS_PER_PAGE = 1000;
type ZAttachedByEnum (line 17) | type ZAttachedByEnum = z.infer<typeof zAttachedByEnumSchema>;
type ZBookmarkTags (line 23) | type ZBookmarkTags = z.infer<typeof zBookmarkTagSchema>;
type ZGetTagResponse (line 31) | type ZGetTagResponse = z.infer<typeof zGetTagResponseSchema>;
type ZTagBasic (line 42) | type ZTagBasic = z.infer<typeof zTagBasicSchema>;
type ZTagListResponse (line 70) | type ZTagListResponse = z.infer<typeof zTagListResponseSchema>;
FILE: packages/shared/types/uploads.ts
type ZUploadError (line 7) | type ZUploadError = z.infer<typeof zUploadErrorSchema>;
type ZUploadResponse (line 16) | type ZUploadResponse = z.infer<typeof zUploadResponseSchema>;
FILE: packages/shared/types/users.ts
constant PASSWORD_MIN_LENGTH (line 5) | const PASSWORD_MIN_LENGTH = 8;
constant PASSWORD_MAX_LENGTH (line 6) | const PASSWORD_MAX_LENGTH = 100;
type ZTagStyle (line 17) | type ZTagStyle = z.infer<typeof zTagStyleSchema>;
type ZReaderFontFamily (line 185) | type ZReaderFontFamily = z.infer<typeof zReaderFontFamilySchema>;
type ZUserSettings (line 209) | type ZUserSettings = z.infer<typeof zUserSettingsSchema>;
FILE: packages/shared/types/webhooks.ts
constant MAX_WEBHOOK_URL_LENGTH (line 3) | const MAX_WEBHOOK_URL_LENGTH = 500;
constant MAX_WEBHOOK_TOKEN_LENGTH (line 4) | const MAX_WEBHOOK_TOKEN_LENGTH = 100;
type ZWebhookEvent (line 13) | type ZWebhookEvent = z.infer<typeof zWebhookEventSchema>;
type ZWebhook (line 23) | type ZWebhook = z.infer<typeof zWebhookSchema>;
FILE: packages/shared/utils/assetUtils.ts
function getAssetUrl (line 1) | function getAssetUrl(assetId: string) {
FILE: packages/shared/utils/bookmarkUtils.ts
function getBookmarkLinkAssetIdOrUrl (line 4) | function getBookmarkLinkAssetIdOrUrl(bookmark: ZBookmarkedLink) {
function getBookmarkLinkImageUrl (line 16) | function getBookmarkLinkImageUrl(bookmark: ZBookmarkedLink) {
function isBookmarkStillCrawling (line 30) | function isBookmarkStillCrawling(bookmark: ZBookmark) {
function isBookmarkStillTagging (line 40) | function isBookmarkStillTagging(bookmark: ZBookmark) {
function isBookmarkStillSummarizing (line 44) | function isBookmarkStillSummarizing(bookmark: ZBookmark) {
function isBookmarkStillLoading (line 48) | function isBookmarkStillLoading(bookmark: ZBookmark) {
function getBookmarkRefreshInterval (line 56) | function getBookmarkRefreshInterval(
function getSourceUrl (line 85) | function getSourceUrl(bookmark: ZBookmark) {
function getBookmarkTitle (line 98) | function getBookmarkTitle(bookmark: ZBookmark) {
FILE: packages/shared/utils/htmlUtils.ts
function htmlToPlainText (line 10) | function htmlToPlainText(htmlContent: string): string {
FILE: packages/shared/utils/listUtils.ts
type ZBookmarkListTreeNode (line 3) | interface ZBookmarkListTreeNode {
type ZBookmarkListRoot (line 8) | type ZBookmarkListRoot = Record<string, ZBookmarkListTreeNode>;
function listsToTree (line 10) | function listsToTree(lists: ZBookmarkList[]) {
FILE: packages/shared/utils/reading-progress-dom.ts
type ReadingPosition (line 12) | interface ReadingPosition {
constant PARAGRAPH_SELECTORS (line 18) | const PARAGRAPH_SELECTORS = [
constant PARAGRAPH_SELECTOR_STRING (line 30) | const PARAGRAPH_SELECTOR_STRING = PARAGRAPH_SELECTORS.join(", ");
constant ANCHOR_TEXT_MAX_LENGTH (line 36) | const ANCHOR_TEXT_MAX_LENGTH = 50;
constant SCROLL_BOTTOM_THRESHOLD (line 39) | const SCROLL_BOTTOM_THRESHOLD = 5;
constant SCROLL_THROTTLE_MS (line 42) | const SCROLL_THROTTLE_MS = 150;
type ScrollInfo (line 47) | interface ScrollInfo {
function normalizeText (line 57) | function normalizeText(text: string): string {
function normalizeTextLength (line 67) | function normalizeTextLength(text: string): number {
function isElementVisible (line 77) | function isElementVisible(element: HTMLElement | null): boolean {
function findScrollableParent (line 88) | function findScrollableParent(element: HTMLElement): HTMLElement {
function getReadingPosition (line 121) | function getReadingPosition(
function getReadingPositionWithViewport (line 151) | function getReadingPositionWithViewport(
function scrollToReadingPosition (line 241) | function scrollToReadingPosition(
FILE: packages/shared/utils/redirectUrl.ts
function validateRedirectUrl (line 9) | function validateRedirectUrl(
function isMobileAppRedirect (line 33) | function isMobileAppRedirect(url: string): boolean {
FILE: packages/shared/utils/relativeDateUtils.ts
type RelativeDate (line 1) | interface RelativeDate {
FILE: packages/shared/utils/switch.ts
function switchCase (line 1) | function switchCase<T extends string | number, R>(
FILE: packages/shared/utils/tag.ts
function normalizeTagName (line 6) | function normalizeTagName(raw: string): string {
type TagStyle (line 10) | type TagStyle = ZTagStyle;
function getTagStylePrompt (line 12) | function getTagStylePrompt(style: TagStyle): string {
function getCuratedTagsPrompt (line 32) | function getCuratedTagsPrompt(curatedTags?: string[]): string {
FILE: packages/trpc/auth.ts
constant BCRYPT_SALT_ROUNDS (line 10) | const BCRYPT_SALT_ROUNDS = 10;
constant API_KEY_PREFIX_V1 (line 11) | const API_KEY_PREFIX_V1 = "ak1";
constant API_KEY_PREFIX_V2 (line 12) | const API_KEY_PREFIX_V2 = "ak2";
function generateApiKeySecret (line 14) | function generateApiKeySecret() {
function generatePasswordSalt (line 23) | function generatePasswordSalt() {
function regenerateApiKey (line 27) | async function regenerateApiKey(
function generateApiKey (line 50) | async function generateApiKey(
function parseApiKey (line 79) | function parseApiKey(plain: string) {
function authenticateApiKey (line 96) | async function authenticateApiKey(key: string, database: Context["db"]) {
function hashPassword (line 144) | async function hashPassword(password: string, salt: string | null) {
function validatePassword (line 148) | async function validatePassword(
FILE: packages/trpc/email.ts
function buildTransporter (line 8) | function buildTransporter() {
type Transporter (line 26) | type Transporter = ReturnType<typeof buildTransporter>;
type Fn (line 28) | type Fn<Args extends unknown[] = unknown[]> = (
type TracingOptions (line 33) | interface TracingOptions {
function withTracing (line 37) | function withTracing<Args extends unknown[]>(
FILE: packages/trpc/index.ts
type User (line 16) | interface User {
type Context (line 23) | interface Context {
type AuthedContext (line 31) | interface AuthedContext {
method errorFormatter (line 45) | errorFormatter(opts) {
FILE: packages/trpc/lib/attachments.ts
function mapDBAssetTypeToUserType (line 9) | function mapDBAssetTypeToUserType(assetType: AssetTypes): ZAssetType {
function mapSchemaAssetTypeToDB (line 28) | function mapSchemaAssetTypeToDB(
function humanFriendlyNameForAssertType (line 48) | function humanFriendlyNameForAssertType(type: ZAssetType) {
function isAllowedToAttachAsset (line 66) | function isAllowedToAttachAsset(type: ZAssetType) {
function isAllowedToDetachAsset (line 84) | function isAllowedToDetachAsset(type: ZAssetType) {
FILE: packages/trpc/lib/impersonate.ts
function buildImpersonatingAuthedContext (line 8) | async function buildImpersonatingAuthedContext(
FILE: packages/trpc/lib/rateLimit.ts
function createRateLimitMiddleware (line 12) | function createRateLimitMiddleware<T>(config: RateLimitConfig) {
FILE: packages/trpc/lib/ruleEngine.ts
function fetchBookmark (line 18) | async function fetchBookmark(db: AuthedContext["db"], bookmarkId: string) {
type ReturnedBookmark (line 50) | type ReturnedBookmark = NonNullable<Awaited<ReturnType<typeof fetchBookm...
type RuleEngineEvaluationResult (line 52) | interface RuleEngineEvaluationResult {
class RuleEngine (line 58) | class RuleEngine {
method constructor (line 59) | private constructor(
method bookmarkTitle (line 65) | private get bookmarkTitle(): string {
method forBookmark (line 75) | static async forBookmark(
method doesBookmarkMatchConditions (line 93) | doesBookmarkMatchConditions(condition: RuleEngineCondition): boolean {
method evaluateRule (line 152) | async evaluateRule(
method executeAction (line 185) | async executeAction(action: RuleEngineAction): Promise<string> {
method onEvent (line 259) | async onEvent(event: RuleEngineEvent): Promise<RuleEngineEvaluationRes...
FILE: packages/trpc/lib/search.ts
type BookmarkQueryReturnType (line 36) | interface BookmarkQueryReturnType {
function intersect (line 40) | function intersect(
function union (line 71) | function union(vals: BookmarkQueryReturnType[][]): BookmarkQueryReturnTy...
function getIds (line 93) | async function getIds(
function getBookmarkIdsFromMatcher (line 441) | async function getBookmarkIdsFromMatcher(
FILE: packages/trpc/lib/tracing.ts
function createTracingMiddleware (line 18) | function createTracingMiddleware() {
function addTracingAttributes (line 57) | function addTracingAttributes(
FILE: packages/trpc/lib/turnstile.ts
function verifyTurnstileToken (line 13) | async function verifyTurnstileToken(
FILE: packages/trpc/models/assets.ts
class Asset (line 22) | class Asset {
method constructor (line 23) | constructor(
method fromId (line 28) | static async fromId(ctx: AuthedContext, id: string): Promise<Asset> {
method list (line 52) | static async list(
method attachAsset (line 84) | static async attachAsset(
method replaceAsset (line 123) | static async replaceAsset(
method detachAsset (line 167) | static async detachAsset(
method ensureBookmarkOwnership (line 204) | private static async ensureBookmarkOwnership(
method ensureOwnership (line 212) | ensureOwnership() {
method ensureOwnership (line 221) | static async ensureOwnership(ctx: AuthedContext, assetId: string) {
method canUserView (line 225) | async canUserView(): Promise<boolean> {
method ensureCanView (line 253) | async ensureCanView() {
method getUrl (line 262) | getUrl() {
method getPublicSignedAssetUrl (line 266) | static getPublicSignedAssetUrl(
FILE: packages/trpc/models/backups.ts
class Backup (line 12) | class Backup {
method constructor (line 13) | private constructor(
method fromId (line 18) | static async fromId(ctx: AuthedContext, backupId: string): Promise<Bac...
method fromData (line 36) | private static fromData(
method getAll (line 43) | static async getAll(ctx: AuthedContext): Promise<Backup[]> {
method create (line 52) | static async create(ctx: AuthedContext): Promise<Backup> {
method triggerBackgroundJob (line 65) | async triggerBackgroundJob({
method update (line 84) | async update(
method delete (line 107) | async delete(): Promise<void> {
method findOldBackups (line 144) | static async findOldBackups(
method asPublic (line 161) | asPublic(): z.infer<typeof zBackupSchema> {
method id (line 165) | get id() {
method assetId (line 169) | get assetId() {
FILE: packages/trpc/models/bookmarks.ts
function dummyDrizzleReturnType (line 56) | async function dummyDrizzleReturnType() {
type BookmarkQueryReturnType (line 76) | type BookmarkQueryReturnType = Awaited<
class BareBookmark (line 80) | class BareBookmark {
method constructor (line 81) | protected constructor(
method id (line 86) | get id() {
method createdAt (line 90) | get createdAt() {
method bareFromId (line 94) | static async bareFromId(ctx: AuthedContext, bookmarkId: string) {
method isAllowedToAccessBookmark (line 116) | protected static async isAllowedToAccessBookmark(
method ensureOwnership (line 127) | ensureOwnership() {
class Bookmark (line 137) | class Bookmark extends BareBookmark {
method constructor (line 138) | protected constructor(
method toZodSchema (line 145) | private static async toZodSchema(
method fromId (line 227) | static async fromId(
method fromData (line 266) | static fromData(ctx: AuthedContext, data: ZBookmark) {
method buildDebugInfo (line 270) | static async buildDebugInfo(ctx: AuthedContext, bookmarkId: string) {
method loadMulti (line 394) | static async loadMulti(
method asZBookmark (line 747) | asZBookmark(): ZBookmark {
method asPublicBookmark (line 762) | asPublicBookmark(): ZPublicBookmark {
method getBookmarkHtmlContent (line 856) | static async getBookmarkHtmlContent(
method getBookmarkPlainTextContent (line 879) | static async getBookmarkPlainTextContent(
method cleanupAssets (line 902) | private async cleanupAssets() {
method delete (line 917) | async delete() {
FILE: packages/trpc/models/feeds.ts
class Feed (line 15) | class Feed {
method constructor (line 16) | constructor(
method fromId (line 21) | static async fromId(ctx: AuthedContext, id: string): Promise<Feed> {
method create (line 44) | static async create(
method getAll (line 76) | static async getAll(ctx: AuthedContext): Promise<Feed[]> {
method delete (line 84) | async delete(): Promise<void> {
method update (line 99) | async update(input: z.infer<typeof zUpdateFeedSchema>): Promise<void> {
method asPublicFeed (line 123) | asPublicFeed(): z.infer<typeof zFeedSchema> {
FILE: packages/trpc/models/highlights.ts
class Highlight (line 16) | class Highlight {
method constructor (line 17) | constructor(
method fromId (line 22) | static async fromId(ctx: AuthedContext, id: string): Promise<Highlight> {
method create (line 45) | static async create(
method getForBookmark (line 65) | static async getForBookmark(
method getAll (line 77) | static async getAll(
method search (line 117) | static async search(
method delete (line 163) | async delete(): Promise<z.infer<typeof zHighlightSchema>> {
method update (line 181) | async update(input: z.infer<typeof zUpdateHighlightSchema>): Promise<v...
method asPublicHighlight (line 203) | asPublicHighlight(): z.infer<typeof zHighlightSchema> {
FILE: packages/trpc/models/importSessions.ts
class ImportSession (line 14) | class ImportSession {
method constructor (line 15) | protected constructor(
method fromId (line 20) | static async fromId(
method create (line 41) | static async create(
method getAll (line 57) | static async getAll(ctx: AuthedContext): Promise<ImportSession[]> {
method getAllWithStats (line 67) | static async getAllWithStats(
method getWithStats (line 79) | async getWithStats(): Promise<ZImportSessionWithStats> {
method delete (line 124) | async delete(): Promise<void> {
method stageBookmarks (line 143) | async stageBookmarks(
method finalize (line 189) | async finalize(): Promise<void> {
method pause (line 203) | async pause(): Promise<void> {
method resume (line 217) | async resume(): Promise<void> {
FILE: packages/trpc/models/listInvitations.ts
type Role (line 8) | type Role = "viewer" | "editor";
type InvitationStatus (line 9) | type InvitationStatus = "pending" | "declined";
type InvitationData (line 11) | interface InvitationData {
class ListInvitation (line 23) | class ListInvitation {
method constructor (line 24) | protected constructor(
method id (line 29) | get id() {
method fromId (line 39) | static async fromId(
method ensureIsInvitedUser (line 88) | ensureIsInvitedUser() {
method ensureIsListOwner (line 100) | ensureIsListOwner() {
method accept (line 112) | async accept(): Promise<void> {
method decline (line 142) | async decline(): Promise<void> {
method revoke (line 163) | async revoke(): Promise<void> {
method inviteByEmail (line 174) | static async inviteByEmail(
method pendingForUser (line 295) | static async pendingForUser(ctx: AuthedContext) {
method invitationsForList (line 344) | static async invitationsForList(
method sendInvitationEmail (line 380) | static async sendInvitationEmail(params: {
FILE: packages/trpc/models/lists.ts
type ListCollaboratorEntry (line 31) | interface ListCollaboratorEntry {
method constructor (line 36) | protected constructor(
method id (line 41) | get id() {
method asZBookmarkList (line 45) | asZBookmarkList() {
method fromData (line 70) | private static fromData(
method fromId (line 82) | static async fromId(
method getPublicList (line 158) | private static async getPublicList(
method getPublicListMetadata (line 188) | static async getPublicListMetadata(
method getPublicListContents (line 203) | static async getPublicListContents(
method create (line 252) | static async create(
method getAll (line 279) | static async getAll(ctx: AuthedContext) {
method getAllOwned (line 287) | static async getAllOwned(
method forBookmark (line 317) | static async forBookmark(ctx: AuthedContext, bookmarkId: string) {
method canUserView (line 394) | canUserView(): boolean {
method canUserEdit (line 406) | canUserEdit(): boolean {
method canUserManage (line 419) | canUserManage(): boolean {
method ensureCanView (line 431) | ensureCanView(): void {
method ensureCanEdit (line 443) | ensureCanEdit(): void {
method ensureCanManage (line 455) | ensureCanManage(): void {
method delete (line 464) | async delete() {
method getChildren (line 479) | async getChildren(): Promise<(ManualList | SmartList)[]> {
method update (line 515) | async update(
method setRssToken (line 556) | private async setRssToken(token: string | null) {
method getRssToken (line 573) | async getRssToken(): Promise<string | null> {
method regenRssToken (line 588) | async regenRssToken() {
method clearRssToken (line 593) | async clearRssToken() {
method addCollaboratorByEmail (line 603) | async addCollaboratorByEmail(
method removeCollaborator (line 626) | async removeCollaborator(userId: string): Promise<void> {
method leaveList (line 651) | async leaveList(): Promise<void> {
method updateCollaboratorRole (line 680) | async updateCollaboratorRole(
method getCollaborators (line 708) | async getCollaborators() {
method getSharedWithUser (line 782) | static async getSharedWithUser(
class SmartList (line 822) | class SmartList extends List {
method constructor (line 827) | constructor(ctx: AuthedContext, list: ZBookmarkList & { userId: string...
method type (line 831) | get type(): "smart" {
method query (line 836) | get query() {
method getParsedQuery (line 841) | getParsedQuery() {
method getBookmarkIds (line 852) | async getBookmarkIds(visitedListIds = new Set<string>()): Promise<stri...
method getSize (line 875) | async getSize(): Promise<number> {
method addBookmark (line 879) | addBookmark(_bookmarkId: string): Promise<void> {
method removeBookmark (line 886) | removeBookmark(_bookmarkId: string): Promise<void> {
method mergeInto (line 893) | mergeInto(
class ManualList (line 904) | class ManualList extends List {
method constructor (line 905) | constructor(
method type (line 913) | get type(): "manual" {
method getBookmarkIds (line 918) | async getBookmarkIds(_visitedListIds?: Set<string>): Promise<string[]> {
method getSize (line 926) | async getSize(): Promise<number> {
method addBookmark (line 934) | async addBookmark(bookmarkId: string): Promise<void> {
method removeBookmark (line 963) | async removeBookmark(bookmarkId: string): Promise<void> {
method update (line 989) | async update(input: z.infer<typeof zEditBookmarkListSchemaWithValidati...
method mergeInto (line 999) | async mergeInto(
FILE: packages/trpc/models/rules.ts
function dummy_fetchRule (line 21) | function dummy_fetchRule(ctx: AuthedContext, id: string) {
type FetchedRuleType (line 33) | type FetchedRuleType = NonNullable<Awaited<ReturnType<typeof dummy_fetch...
class RuleEngineRuleModel (line 35) | class RuleEngineRuleModel {
method constructor (line 36) | protected constructor(
method fromData (line 41) | private static fromData(
method fromId (line 61) | static async fromId(
method create (line 85) | static async create(
method update (line 136) | async update(
method delete (line 200) | async delete(): Promise<void> {
method getAll (line 215) | static async getAll(ctx: AuthedContext): Promise<RuleEngineRuleModel[]> {
FILE: packages/trpc/models/tags.ts
class Tag (line 30) | class Tag {
method constructor (line 31) | constructor(
method fromId (line 36) | static async fromId(ctx: AuthedContext, id: string): Promise<Tag> {
method create (line 59) | static async create(
method getAll (line 84) | static async getAll(
method deleteUnused (line 184) | static async deleteUnused(ctx: AuthedContext): Promise<number> {
method merge (line 201) | static async merge(
method delete (line 303) | async delete(): Promise<void> {
method update (line 333) | async update(input: z.infer<typeof zUpdateTagRequestSchema>): Promise<...
method _aggregateStats (line 386) | static _aggregateStats(
method getStats (line 407) | async getStats(): Promise<z.infer<typeof zGetTagResponseSchema>> {
method asBasicTag (line 436) | asBasicTag(): z.infer<typeof zTagBasicSchema> {
FILE: packages/trpc/models/users.ts
class User (line 37) | class User {
method constructor (line 38) | constructor(
method fromId_DANGEROUS (line 43) | static async fromId_DANGEROUS(ctx: AuthedContext, id: string): Promise...
method fromCtx (line 58) | static async fromCtx(ctx: AuthedContext): Promise<User> {
method create (line 62) | static async create(
method createRaw (line 93) | static async createRaw(
method getAll (line 146) | static async getAll(ctx: AuthedContext): Promise<User[]> {
method genEmailVerificationToken (line 152) | static async genEmailVerificationToken(
method verifyEmailToken (line 168) | static async verifyEmailToken(
method verifyEmail (line 206) | static async verifyEmail(
method resendVerificationEmail (line 232) | static async resendVerificationEmail(
method forgotPassword (line 274) | static async forgotPassword(ctx: Context, email: string): Promise<void> {
method resetPassword (line 310) | static async resetPassword(
method deleteInternal (line 365) | private static async deleteInternal(db: Context["db"], userId: string) {
method deleteAsAdmin (line 375) | static async deleteAsAdmin(
method deleteAccount (line 383) | async deleteAccount(password?: string): Promise<void> {
method changePassword (line 407) | async changePassword(
method getSettings (line 434) | async getSettings(): Promise<z.infer<typeof zUserSettingsSchema>> {
method updateSettings (line 480) | async updateSettings(
method updateAvatar (line 511) | async updateAvatar(assetId: string | null): Promise<void> {
method getStats (line 609) | async getStats(): Promise<z.infer<typeof zUserStatsResponseSchema>> {
method hasWrapped (line 883) | async hasWrapped(): Promise<boolean> {
method getWrappedStats (line 904) | async getWrappedStats(
method asWhoAmI (line 1195) | asWhoAmI(): z.infer<typeof zWhoAmIResponseSchema> {
method asPublicUser (line 1205) | asPublicUser() {
FILE: packages/trpc/models/webhooks.ts
class Webhook (line 15) | class Webhook {
method constructor (line 16) | constructor(
method fromId (line 21) | static async fromId(ctx: AuthedContext, id: string): Promise<Webhook> {
method create (line 44) | static async create(
method getAll (line 75) | static async getAll(ctx: AuthedContext): Promise<Webhook[]> {
method delete (line 83) | async delete(): Promise<void> {
method update (line 98) | async update(input: z.infer<typeof zUpdateWebhookSchema>): Promise<voi...
method asPublicWebhook (line 121) | asPublicWebhook(): z.infer<typeof zWebhookSchema> {
FILE: packages/trpc/routers/_app.ts
type AppRouter (line 42) | type AppRouter = typeof appRouter;
FILE: packages/trpc/routers/bookmarks.test.ts
function createTestTag (line 39) | async function createTestTag(api: APICallerType, tagName: string) {
function createTestFeed (line 44) | async function createTestFeed(
FILE: packages/trpc/routers/bookmarks.ts
function attemptToDedupLink (line 96) | async function attemptToDedupLink(ctx: AuthedContext, url: string) {
function shouldUseLowPriorityQueues (line 119) | async function shouldUseLowPriorityQueues(
function normalizeUrl (line 800) | function normalizeUrl(url: string): string {
FILE: packages/trpc/routers/importSessions.test.ts
function createTestList (line 24) | async function createTestList(api: APICallerType) {
FILE: packages/trpc/routers/lists.test.ts
function createTestBookmark (line 13) | async function createTestBookmark(api: APICallerType) {
FILE: packages/trpc/routers/sharedLists.test.ts
function addAndAcceptCollaborator (line 13) | async function addAndAcceptCollaborator(
FILE: packages/trpc/routers/subscriptions.ts
function requireStripeConfig (line 20) | function requireStripeConfig() {
function syncStripeDataToDatabase (line 53) | async function syncStripeDataToDatabase(customerId: string, db: Context[...
function processEvent (line 166) | async function processEvent(event: Stripe.Event, db: Context["db"]) {
FILE: packages/trpc/stats.ts
method collect (line 25) | async collect() {
method collect (line 67) | async collect() {
method collect (line 82) | async collect() {
method collect (line 99) | async collect() {
FILE: packages/trpc/testUtils.ts
function getTestDB (line 9) | function getTestDB() {
type TestDB (line 13) | type TestDB = ReturnType<typeof getTestDB>;
function seedUsers (line 15) | async function seedUsers(db: TestDB) {
function getApiCaller (line 35) | function getApiCaller(
type APICallerType (line 57) | type APICallerType = ReturnType<typeof getApiCaller>;
type CustomTestContext (line 59) | interface CustomTestContext {
function buildTestContext (line 65) | async function buildTestContext(
function defaultBeforeEach (line 82) | function defaultBeforeEach(seedDB = true) {
FILE: tools/compare-models/src/apiClient.ts
class KarakeepAPIClient (line 6) | class KarakeepAPIClient {
method constructor (line 9) | constructor() {
method fetchBookmarks (line 19) | async fetchBookmarks(limit: number): Promise<Bookmark[]> {
FILE: tools/compare-models/src/bookmarkProcessor.ts
function extractBookmarkContent (line 7) | async function extractBookmarkContent(
function runTaggingForModel (line 39) | async function runTaggingForModel(
FILE: tools/compare-models/src/index.ts
type VoteCounters (line 18) | interface VoteCounters {
type ShuffleResult (line 26) | interface ShuffleResult {
function main (line 32) | async function main() {
FILE: tools/compare-models/src/inferenceClient.ts
function createInferenceClient (line 10) | function createInferenceClient(modelName: string): InferenceClient {
function inferTags (line 26) | async function inferTags(
FILE: tools/compare-models/src/interactive.ts
function askQuestion (line 11) | async function askQuestion(question: string): Promise<string> {
function displayComparison (line 19) | function displayComparison(
function displayError (line 69) | function displayError(message: string): void {
function displayProgress (line 73) | function displayProgress(message: string): void {
function clearProgress (line 77) | function clearProgress(): void {
function close (line 81) | function close(): void {
function displayFinalResults (line 85) | function displayFinalResults(results: {
FILE: tools/compare-models/src/types.ts
type Bookmark (line 1) | interface Bookmark {
type ModelConfig (line 15) | interface ModelConfig {
type ComparisonResult (line 21) | interface ComparisonResult {
type FinalResults (line 30) | interface FinalResults {
Copy disabled (too large)
Download .json
Condensed preview — 1606 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (11,345K chars).
[
{
"path": ".claude/settings.json",
"chars": 337,
"preview": "{\n \"permissions\": {\n \"allow\": [\n \"Bash(pnpm typecheck:*)\",\n \"Bash(pnpm --filter * typecheck:*)\",\n \"Ba"
},
{
"path": ".dockerignore",
"chars": 338,
"preview": "Dockerfile\n.dockerignore\n**/node_modules\nnpm-debug.log\nREADME.md\n**/.next\n**/*.db\n**/.env*\n.turbo\n.git\n./data\n\n# Files t"
},
{
"path": ".github/FUNDING.yml",
"chars": 94,
"preview": "# These are supported funding model platforms\n\nbuy_me_a_coffee: mbassem\ngithub: MohamedBassem\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yml",
"chars": 3236,
"preview": "name: Bug Report\ndescription: Create a report to help us fix bugs & issues in existing supported functionality\nlabels: ["
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yml",
"chars": 2047,
"preview": "name: Feature Request\ndescription: Request a new feature or idea to be added to Karakeep\nlabels: [\"feature request\", \"st"
},
{
"path": ".github/ISSUE_TEMPLATE/question.yml",
"chars": 407,
"preview": "name: Question / Support Request\ndescription: Get help with anything related to Karakeep\nlabels: [\"question\"]\nbody:\n - "
},
{
"path": ".github/workflows/android.yml",
"chars": 1146,
"preview": "name: Android App Release Build\n\non:\n push:\n tags:\n - 'android/v[0-9]+.[0-9]+.[0-9]+-[0-9]+'\n\njobs:\n build:\n "
},
{
"path": ".github/workflows/ci.yml",
"chars": 2460,
"preview": "name: CI\n\non:\n pull_request:\n branches: [\"*\"]\n push:\n branches: [\"main\"]\n merge_group:\n\nconcurrency:\n group: $"
},
{
"path": ".github/workflows/claude.yml",
"chars": 2106,
"preview": "name: Claude Code\n\non:\n issue_comment:\n types: [created]\n pull_request_review_comment:\n types: [created]\n issue"
},
{
"path": ".github/workflows/cli.yml",
"chars": 632,
"preview": "name: Publish CLI Package to npm\non:\n push:\n tags:\n # This is a glob pattern not a regex\n - \"cli/v[0-9]+.["
},
{
"path": ".github/workflows/docker.yml",
"chars": 8902,
"preview": "name: Build and Push Docker\non:\n release:\n types:\n - created\n push:\n branches:\n - main\n\njobs:\n build:"
},
{
"path": ".github/workflows/extension.yml",
"chars": 1003,
"preview": "name: Extension Release Build\n\non:\n push:\n tags:\n - 'extension/v[0-9]+.[0-9]+.[0-9]+'\n\njobs:\n build:\n runs-"
},
{
"path": ".github/workflows/ios.yml",
"chars": 917,
"preview": "name: iOS App Release Build\n\non:\n push:\n tags:\n - 'ios/v[0-9]+.[0-9]+.[0-9]+-[0-9]+'\n\njobs:\n build:\n runs-o"
},
{
"path": ".github/workflows/mcp.yml",
"chars": 632,
"preview": "name: Publish MCP Package to npm\non:\n push:\n tags:\n # This is a glob pattern not a regex\n - \"mcp/v[0-9]+.["
},
{
"path": ".github/workflows/sdk.yml",
"chars": 640,
"preview": "name: Publish CLI Package to npm\non:\n push:\n tags:\n # This is a glob pattern not a regex\n - \"sdk/v[0-9]+.["
},
{
"path": ".gitignore",
"chars": 782,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\nnode_modules\n.pnp\n"
},
{
"path": ".husky/pre-commit",
"chars": 75,
"preview": "pnpm preflight\npnpm exec sherif\npnpm run --filter @karakeep/open-api check\n"
},
{
"path": ".npmrc",
"chars": 20,
"preview": "node-linker=hoisted\n"
},
{
"path": ".oxfmtrc.json",
"chars": 1084,
"preview": "{\n \"$schema\": \"./node_modules/oxfmt/configuration_schema.json\",\n \"sortTailwindcss\": {\n \"config\": \"tooling/tailwind/"
},
{
"path": ".oxlintrc.json",
"chars": 232,
"preview": "{\n \"$schema\": \"node_modules/oxlint/configuration_schema.json\",\n \"ignorePatterns\": [\n \"**/*.config.js\",\n \"**/*.co"
},
{
"path": "AGENTS.md",
"chars": 2802,
"preview": "# Karakeep Project Overview\n\nThis document provides context about the Karakeep project for the different agents.\n\n## Pro"
},
{
"path": "CONTRIBUTING.md",
"chars": 2055,
"preview": "# Contributing to Karakeep\n\nFirst off, thank you for considering contributing to our project! This document outlines our"
},
{
"path": "LICENSE",
"chars": 34523,
"preview": " GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007\n\n Copyright (C)"
},
{
"path": "README.md",
"chars": 8029,
"preview": "<div align=\"center\">\n <a href=\"https://github.com/karakeep-app/karakeep/actions/workflows/ci.yml\">\n <img alt=\""
},
{
"path": "SECURITY.md",
"chars": 106,
"preview": "# Security Policy\n\n## Reporting a Vulnerability\n\nPlease report security issues to `security@karakeep.app`\n"
},
{
"path": "apps/browser-extension/.gitignore",
"chars": 253,
"preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndis"
},
{
"path": "apps/browser-extension/.oxlintrc.json",
"chars": 562,
"preview": "{\n \"$schema\": \"../../node_modules/oxlint/configuration_schema.json\",\n \"extends\": [\n \"../../tooling/oxlint/oxlint-ba"
},
{
"path": "apps/browser-extension/components.json",
"chars": 345,
"preview": "{\n \"$schema\": \"https://ui.shadcn.com/schema.json\",\n \"style\": \"default\",\n \"rsc\": false,\n \"tsx\": true,\n \"tailwind\": {"
},
{
"path": "apps/browser-extension/index.html",
"chars": 357,
"preview": "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <link rel=\"icon\" type=\"image/svg+xml\" href=\"/"
},
{
"path": "apps/browser-extension/manifest.json",
"chars": 1287,
"preview": "{\n \"manifest_version\": 3,\n \"name\": \"Karakeep\",\n \"description\": \"An extension to bookmark links to karakeep.app\",\n \"v"
},
{
"path": "apps/browser-extension/package.json",
"chars": 1736,
"preview": "{\n \"name\": \"@karakeep/browser-extension\",\n \"private\": true,\n \"version\": \"0.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n "
},
{
"path": "apps/browser-extension/postcss.config.js",
"chars": 81,
"preview": "export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n"
},
{
"path": "apps/browser-extension/src/BookmarkDeletedPage.tsx",
"chars": 105,
"preview": "export default function BookmarkDeletedPage() {\n return <p className=\"text-xl\">Bookmark Deleted!</p>;\n}\n"
},
{
"path": "apps/browser-extension/src/BookmarkSavedPage.tsx",
"chars": 3061,
"preview": "import { useState } from \"react\";\nimport { ArrowUpRightFromSquare, Trash } from \"lucide-react\";\nimport { Link, useNaviga"
},
{
"path": "apps/browser-extension/src/CustomHeadersPage.tsx",
"chars": 4639,
"preview": "import { useEffect, useState } from \"react\";\nimport { Plus, Trash2 } from \"lucide-react\";\nimport { useNavigate } from \"r"
},
{
"path": "apps/browser-extension/src/Layout.tsx",
"chars": 1577,
"preview": "import { Home, RefreshCw, Settings, X } from \"lucide-react\";\nimport { Outlet, useNavigate } from \"react-router-dom\";\n\nim"
},
{
"path": "apps/browser-extension/src/Logo.tsx",
"chars": 420,
"preview": "import logoImgWhite from \"../public/logo-full-white.png\";\nimport logoImg from \"../public/logo-full.png\";\n\nexport default"
},
{
"path": "apps/browser-extension/src/NotConfiguredPage.tsx",
"chars": 2131,
"preview": "import { useEffect, useState } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\n\nimport { Button } from \"./"
},
{
"path": "apps/browser-extension/src/OptionsPage.tsx",
"chars": 4569,
"preview": "import React, { useEffect } from \"react\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";"
},
{
"path": "apps/browser-extension/src/SavePage.tsx",
"chars": 3204,
"preview": "import { useEffect, useState } from \"react\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport { Navigate } fr"
},
{
"path": "apps/browser-extension/src/SignInPage.tsx",
"chars": 5202,
"preview": "import { useState } from \"react\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport { useNavigate } from \"reac"
},
{
"path": "apps/browser-extension/src/Spinner.tsx",
"chars": 385,
"preview": "export default function Spinner() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n "
},
{
"path": "apps/browser-extension/src/background/background.ts",
"chars": 10321,
"preview": "import {\n BookmarkTypes,\n ZNewBookmarkRequest,\n} from \"@karakeep/shared/types/bookmarks\";\n\nimport { clearBadgeStatus, "
},
{
"path": "apps/browser-extension/src/background/protocol.ts",
"chars": 70,
"preview": "export const NEW_BOOKMARK_REQUEST_KEY_NAME = \"karakeep-new-bookmark\";\n"
},
{
"path": "apps/browser-extension/src/components/BookmarkLists.tsx",
"chars": 1319,
"preview": "import { useQuery } from \"@tanstack/react-query\";\nimport { X } from \"lucide-react\";\n\nimport {\n useBookmarkLists,\n useR"
},
{
"path": "apps/browser-extension/src/components/ListsSelector.tsx",
"chars": 3524,
"preview": "import * as React from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useSet } from \"@uidotdev/useh"
},
{
"path": "apps/browser-extension/src/components/NoteEditor.tsx",
"chars": 3223,
"preview": "import { useEffect, useState } from \"react\";\nimport { Check, Save } from \"lucide-react\";\n\nimport {\n useAutoRefreshingBo"
},
{
"path": "apps/browser-extension/src/components/TagList.tsx",
"chars": 970,
"preview": "import { useAutoRefreshingBookmarkQuery } from \"@karakeep/shared-react/hooks/bookmarks\";\nimport { isBookmarkStillTagging"
},
{
"path": "apps/browser-extension/src/components/TagsSelector.tsx",
"chars": 3787,
"preview": "import * as React from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useSet } from \"@uidotdev/useh"
},
{
"path": "apps/browser-extension/src/components/ui/badge.tsx",
"chars": 1186,
"preview": "import type { VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cva } from \"class"
},
{
"path": "apps/browser-extension/src/components/ui/button.tsx",
"chars": 1899,
"preview": "import type { VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { Slot } from \"@rad"
},
{
"path": "apps/browser-extension/src/components/ui/command.tsx",
"chars": 4980,
"preview": "import type { DialogProps } from \"@radix-ui/react-dialog\";\nimport * as React from \"react\";\nimport { Command as CommandPr"
},
{
"path": "apps/browser-extension/src/components/ui/dialog.tsx",
"chars": 3864,
"preview": "import * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-rea"
},
{
"path": "apps/browser-extension/src/components/ui/dynamic-popover.tsx",
"chars": 5858,
"preview": "import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"../../"
},
{
"path": "apps/browser-extension/src/components/ui/input.tsx",
"chars": 821,
"preview": "import * as React from \"react\";\n\nimport { cn } from \"../../utils/css\";\n\nexport type InputProps = React.InputHTMLAttribut"
},
{
"path": "apps/browser-extension/src/components/ui/popover.tsx",
"chars": 1243,
"preview": "import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"../../"
},
{
"path": "apps/browser-extension/src/components/ui/select.tsx",
"chars": 5639,
"preview": "import * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, "
},
{
"path": "apps/browser-extension/src/components/ui/switch.tsx",
"chars": 1151,
"preview": "import * as React from \"react\";\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\n\nimport { cn } from \"../../u"
},
{
"path": "apps/browser-extension/src/components/ui/textarea.tsx",
"chars": 769,
"preview": "import * as React from \"react\";\n\nimport { cn } from \"../../utils/css\";\n\nexport type TextareaProps = React.TextareaHTMLAt"
},
{
"path": "apps/browser-extension/src/index.css",
"chars": 49,
"preview": "@import \"@karakeep/tailwind-config/globals.css\";\n"
},
{
"path": "apps/browser-extension/src/main.tsx",
"chars": 1497,
"preview": "import ReactDOM from \"react-dom/client\";\n\nimport \"./index.css\";\n\nimport { HashRouter, Route, Routes } from \"react-router"
},
{
"path": "apps/browser-extension/src/utils/ThemeProvider.tsx",
"chars": 1981,
"preview": "import { createContext, useContext, useEffect } from \"react\";\n\nimport usePluginSettings from \"./settings\";\n\ntype Theme ="
},
{
"path": "apps/browser-extension/src/utils/badgeCache.ts",
"chars": 2199,
"preview": "// Badge count cache helpers\nimport { getPluginSettings } from \"./settings\";\nimport { getApiClient, getQueryClient } fro"
},
{
"path": "apps/browser-extension/src/utils/css.ts",
"chars": 192,
"preview": "import type { ClassValue } from \"clsx\";\nimport { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport f"
},
{
"path": "apps/browser-extension/src/utils/providers.tsx",
"chars": 441,
"preview": "import { TRPCSettingsProvider } from \"@karakeep/shared-react/providers/trpc-provider\";\n\nimport usePluginSettings from \"."
},
{
"path": "apps/browser-extension/src/utils/settings.ts",
"chars": 2764,
"preview": "import React from \"react\";\nimport { z } from \"zod\";\n\nexport const DEFAULT_BADGE_CACHE_EXPIRE_MS = 60 * 60 * 1000; // 1 h"
},
{
"path": "apps/browser-extension/src/utils/storagePersister.ts",
"chars": 1665,
"preview": "import {\n PersistedClient,\n Persister,\n} from \"@tanstack/react-query-persist-client\";\n\nexport const TANSTACK_QUERY_CAC"
},
{
"path": "apps/browser-extension/src/utils/trpc.ts",
"chars": 3829,
"preview": "import { QueryClient } from \"@tanstack/react-query\";\nimport { persistQueryClient } from \"@tanstack/react-query-persist-c"
},
{
"path": "apps/browser-extension/src/utils/type.ts",
"chars": 64,
"preview": "export const enum MessageType {\n BOOKMARK_REFRESH_BADGE = 1,\n}\n"
},
{
"path": "apps/browser-extension/src/utils/url.ts",
"chars": 1267,
"preview": "/**\n * Check if a URL is an HTTP or HTTPS URL.\n * @param url The URL to check.\n * @returns True if the URL starts with \""
},
{
"path": "apps/browser-extension/src/vite-env.d.ts",
"chars": 38,
"preview": "/// <reference types=\"vite/client\" />\n"
},
{
"path": "apps/browser-extension/tailwind.config.js",
"chars": 160,
"preview": "import web from \"@karakeep/tailwind-config/web\";\n\nconst config = {\n darkMode: \"selector\",\n content: web.content,\n pre"
},
{
"path": "apps/browser-extension/tsconfig.json",
"chars": 649,
"preview": "{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"useDefineForClassFields\": true,\n \"lib\": [\"ES2020\", \"DOM\", \"DOM."
},
{
"path": "apps/browser-extension/vite.config.ts",
"chars": 443,
"preview": "import { crx } from \"@crxjs/vite-plugin\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport { defineConfig } from \"vi"
},
{
"path": "apps/cli/.gitignore",
"chars": 5,
"preview": "dist\n"
},
{
"path": "apps/cli/.npmignore",
"chars": 47,
"preview": ".turbo/**\nsrc/**\nvite.config.mts\ntsconfig.json\n"
},
{
"path": "apps/cli/.oxlintrc.json",
"chars": 360,
"preview": "{\n \"$schema\": \"../../node_modules/oxlint/configuration_schema.json\",\n \"extends\": [\n \"../../tooling/oxlint/oxlint-ba"
},
{
"path": "apps/cli/package.json",
"chars": 1270,
"preview": "{\n \"$schema\": \"https://json.schemastore.org/package.json\",\n \"name\": \"@karakeep/cli\",\n \"version\": \"0.31.0\",\n \"descrip"
},
{
"path": "apps/cli/src/commands/admin.ts",
"chars": 14365,
"preview": "import { getGlobalOptions } from \"@/lib/globals\";\nimport {\n printErrorMessageWithReason,\n printObject,\n printStatusMe"
},
{
"path": "apps/cli/src/commands/bookmarks.ts",
"chars": 9906,
"preview": "import * as fs from \"node:fs\";\nimport { addToList } from \"@/commands/lists\";\nimport {\n printError,\n printObject,\n pri"
},
{
"path": "apps/cli/src/commands/dump.ts",
"chars": 13366,
"preview": "import { spawn } from \"node:child_process\";\nimport fsp from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path fr"
},
{
"path": "apps/cli/src/commands/lists.ts",
"chars": 4112,
"preview": "import { getGlobalOptions } from \"@/lib/globals\";\nimport {\n printError,\n printErrorMessageWithReason,\n printObject,\n "
},
{
"path": "apps/cli/src/commands/migrate.ts",
"chars": 26208,
"preview": "import { stdin as input, stdout as output } from \"node:process\";\nimport readline from \"node:readline/promises\";\nimport {"
},
{
"path": "apps/cli/src/commands/tags.ts",
"chars": 1566,
"preview": "import { getGlobalOptions } from \"@/lib/globals\";\nimport {\n printError,\n printErrorMessageWithReason,\n printObject,\n "
},
{
"path": "apps/cli/src/commands/whoami.ts",
"chars": 510,
"preview": "import { printError, printObject } from \"@/lib/output\";\nimport { getAPIClient } from \"@/lib/trpc\";\nimport { Command } fr"
},
{
"path": "apps/cli/src/commands/wipe.ts",
"chars": 12023,
"preview": "import { stdin as input, stdout as output } from \"node:process\";\nimport readline from \"node:readline/promises\";\nimport {"
},
{
"path": "apps/cli/src/index.ts",
"chars": 1434,
"preview": "import { adminCmd } from \"@/commands/admin\";\nimport { bookmarkCmd } from \"@/commands/bookmarks\";\nimport { dumpCmd } from"
},
{
"path": "apps/cli/src/lib/globals.ts",
"chars": 381,
"preview": "export interface GlobalOptions {\n apiKey: string;\n serverAddr: string;\n json?: true;\n}\n\nexport let globalOpts: Global"
},
{
"path": "apps/cli/src/lib/output.ts",
"chars": 1862,
"preview": "import { InspectOptions } from \"util\";\nimport chalk from \"chalk\";\n\nimport { getGlobalOptions } from \"./globals\";\n\n/**\n *"
},
{
"path": "apps/cli/src/lib/trpc.ts",
"chars": 1125,
"preview": "import { getGlobalOptions } from \"@/lib/globals\";\nimport { createTRPCClient, httpBatchLink } from \"@trpc/client\";\nimport"
},
{
"path": "apps/cli/src/vite-env.d.ts",
"chars": 156,
"preview": "/// <reference types=\"vite/client\" />\n\ninterface ImportMetaEnv {\n readonly CLI_VERSION: string;\n}\n\ninterface ImportMeta"
},
{
"path": "apps/cli/tsconfig.json",
"chars": 399,
"preview": "{\n \"$schema\": \"https://json.schemastore.org/tsconfig\",\n \"extends\": \"@karakeep/tsconfig/node.json\",\n \"include\": [\"src\""
},
{
"path": "apps/cli/vite.config.mts",
"chars": 893,
"preview": "// This file is shamelessly copied from immich's CLI vite config\n// https://github.com/immich-app/immich/blob/main/cli/v"
},
{
"path": "apps/landing/.oxlintrc.json",
"chars": 562,
"preview": "{\n \"$schema\": \"../../node_modules/oxlint/configuration_schema.json\",\n \"extends\": [\n \"../../tooling/oxlint/oxlint-ba"
},
{
"path": "apps/landing/README.md",
"chars": 1383,
"preview": "This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js"
},
{
"path": "apps/landing/components/ui/button.tsx",
"chars": 1894,
"preview": "import type { VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"@/lib/"
},
{
"path": "apps/landing/components.json",
"chars": 341,
"preview": "{\n \"$schema\": \"https://ui.shadcn.com/schema.json\",\n \"style\": \"default\",\n \"rsc\": true,\n \"tsx\": true,\n \"tailwind\": {\n"
},
{
"path": "apps/landing/index.html",
"chars": 3879,
"preview": "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <title>\n Karakeep - The Bookmark Everyth"
},
{
"path": "apps/landing/lib/utils.ts",
"chars": 192,
"preview": "import type { ClassValue } from \"clsx\";\nimport { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport f"
},
{
"path": "apps/landing/package.json",
"chars": 1192,
"preview": "{\n \"$schema\": \"https://json.schemastore.org/package.json\",\n \"name\": \"@karakeep/landing\",\n \"version\": \"0.1.0\",\n \"priv"
},
{
"path": "apps/landing/postcss.config.cjs",
"chars": 83,
"preview": "module.exports = {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n"
},
{
"path": "apps/landing/public/robots.txt",
"chars": 66,
"preview": "User-agent: *\nAllow: /\n\nSitemap: https://karakeep.app/sitemap.xml\n"
},
{
"path": "apps/landing/public/sitemap.xml",
"chars": 730,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n <url>\n <loc>htt"
},
{
"path": "apps/landing/src/App.tsx",
"chars": 777,
"preview": "import Apps from \"@/src/Apps\";\nimport Homepage from \"@/src/Homepage\";\nimport Pricing from \"@/src/Pricing\";\nimport Privac"
},
{
"path": "apps/landing/src/Apps.tsx",
"chars": 4313,
"preview": "import SEO from \"./SEO\";\nimport appleIcon from \"/apple-icon.svg?url\";\nimport chromeIcon from \"/chrome-icon.svg?url\";\nimp"
},
{
"path": "apps/landing/src/Homepage.tsx",
"chars": 5001,
"preview": "import {\n ArrowDownNarrowWide,\n BookOpen,\n Bookmark,\n BrainCircuit,\n CheckCheck,\n FileText,\n Highlighter,\n Link2"
},
{
"path": "apps/landing/src/Navbar.tsx",
"chars": 4091,
"preview": "import { useState } from \"react\";\nimport { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/uti"
},
{
"path": "apps/landing/src/Pricing.tsx",
"chars": 6221,
"preview": "import { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\nimport { Check, ExternalLink "
},
{
"path": "apps/landing/src/Privacy.tsx",
"chars": 13285,
"preview": "import SEO from \"./SEO\";\n\nexport default function PrivacyPolicy() {\n return (\n <div className=\"mx-auto max-w-3xl p-4"
},
{
"path": "apps/landing/src/SEO.tsx",
"chars": 1014,
"preview": "const BASE_URL = \"https://karakeep.app\";\nconst DEFAULT_DESCRIPTION =\n \"Karakeep is the open-source bookmark manager for"
},
{
"path": "apps/landing/src/Terms.tsx",
"chars": 14518,
"preview": "import SEO from \"./SEO\";\n\nexport default function Terms() {\n return (\n <div className=\"mx-auto max-w-3xl p-4\">\n "
},
{
"path": "apps/landing/src/components/Banner.tsx",
"chars": 1319,
"preview": "import { Rocket } from \"lucide-react\";\n\nimport { CLOUD_SIGNUP_LINK } from \"../constants\";\n\nexport default function Banne"
},
{
"path": "apps/landing/src/components/CallToAction.tsx",
"chars": 1552,
"preview": "import { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\nimport { CLOUD_SIGNUP_LINK, "
},
{
"path": "apps/landing/src/components/FeatureShowcase.tsx",
"chars": 2395,
"preview": "import type { LucideIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface FeatureBullet {\n icon: Lu"
},
{
"path": "apps/landing/src/components/FeaturesGrid.tsx",
"chars": 1362,
"preview": "import type { LucideIcon } from \"lucide-react\";\n\ninterface Feature {\n icon: LucideIcon;\n title: string;\n description:"
},
{
"path": "apps/landing/src/components/Footer.tsx",
"chars": 3039,
"preview": "import { Link } from \"react-router\";\n\nimport { DOCS_LINK, GITHUB_LINK } from \"../constants\";\nimport Logo from \"/icons/ka"
},
{
"path": "apps/landing/src/components/Hero.tsx",
"chars": 2762,
"preview": "import { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\nimport { Github, Star } from "
},
{
"path": "apps/landing/src/components/Layout.tsx",
"chars": 373,
"preview": "import { Outlet } from \"react-router\";\n\nimport Banner from \"./Banner\";\nimport Footer from \"./Footer\";\nimport NavBar from"
},
{
"path": "apps/landing/src/components/OpenSource.tsx",
"chars": 2152,
"preview": "import { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\nimport { Github } from \"lucid"
},
{
"path": "apps/landing/src/components/Platforms.tsx",
"chars": 2698,
"preview": "import { Code2, Globe, Terminal, Webhook } from \"lucide-react\";\n\nimport appStoreBadge from \"/app-store-badge.png?url\";\ni"
},
{
"path": "apps/landing/src/constants.ts",
"chars": 248,
"preview": "export const GITHUB_LINK = \"https://github.com/karakeep-app/karakeep\";\nexport const DOCS_LINK = \"https://docs.karakeep.a"
},
{
"path": "apps/landing/src/main.tsx",
"chars": 213,
"preview": "import { StrictMode } from \"react\";\nimport App from \"@/src/App\";\nimport { createRoot } from \"react-dom/client\";\n\ncreateR"
},
{
"path": "apps/landing/tailwind.config.ts",
"chars": 842,
"preview": "import type { Config } from \"tailwindcss\";\n\nimport web from \"@karakeep/tailwind-config/web\";\n\nconst config = {\n content"
},
{
"path": "apps/landing/tsconfig.json",
"chars": 382,
"preview": "{\n \"$schema\": \"https://json.schemastore.org/tsconfig\",\n \"extends\": \"@karakeep/tsconfig/base.json\",\n \"compilerOptions\""
},
{
"path": "apps/landing/vite-env.d.ts",
"chars": 88,
"preview": "/// <reference types=\"vite-plugin-svgr/client\" />\n/// <reference types=\"vite/client\" />\n"
},
{
"path": "apps/landing/vite.config.ts",
"chars": 353,
"preview": "import { fileURLToPath, URL } from \"node:url\";\nimport react from \"@vitejs/plugin-react\";\nimport { defineConfig } from \"v"
},
{
"path": "apps/mcp/.gitignore",
"chars": 5,
"preview": "dist\n"
},
{
"path": "apps/mcp/.npmignore",
"chars": 47,
"preview": ".turbo/**\nsrc/**\nvite.config.mts\ntsconfig.json\n"
},
{
"path": "apps/mcp/.oxlintrc.json",
"chars": 360,
"preview": "{\n \"$schema\": \"../../node_modules/oxlint/configuration_schema.json\",\n \"extends\": [\n \"../../tooling/oxlint/oxlint-ba"
},
{
"path": "apps/mcp/README.md",
"chars": 1236,
"preview": "# Karakeep MCP Server\n\nThis is the Karakeep MCP server, which is a server that can be used to interact\nwith Karakeep fro"
},
{
"path": "apps/mcp/package.json",
"chars": 1098,
"preview": "{\n \"$schema\": \"https://json.schemastore.org/package.json\",\n \"name\": \"@karakeep/mcp\",\n \"version\": \"0.31.0\",\n \"descrip"
},
{
"path": "apps/mcp/src/bookmarks.ts",
"chars": 5105,
"preview": "import { CallToolResult } from \"@modelcontextprotocol/sdk/types\";\nimport { z } from \"zod\";\n\nimport { karakeepClient, mcp"
},
{
"path": "apps/mcp/src/index.ts",
"chars": 398,
"preview": "#!/usr/bin/env node\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\n\nimport { mcpServe"
},
{
"path": "apps/mcp/src/lists.ts",
"chars": 2974,
"preview": "import { CallToolResult } from \"@modelcontextprotocol/sdk/types\";\nimport { z } from \"zod\";\n\nimport { karakeepClient, mcp"
},
{
"path": "apps/mcp/src/shared.ts",
"chars": 867,
"preview": "import { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport TurndownService from \"turndown\";\n\nimport { c"
},
{
"path": "apps/mcp/src/tags.ts",
"chars": 1814,
"preview": "import { CallToolResult } from \"@modelcontextprotocol/sdk/types\";\nimport { z } from \"zod\";\n\nimport { karakeepClient, mcp"
},
{
"path": "apps/mcp/src/utils.ts",
"chars": 1528,
"preview": "import { CallToolResult } from \"@modelcontextprotocol/sdk/types\";\n\nimport { KarakeepAPISchemas } from \"@karakeep/sdk\";\n\n"
},
{
"path": "apps/mcp/tsconfig.json",
"chars": 399,
"preview": "{\n \"$schema\": \"https://json.schemastore.org/tsconfig\",\n \"extends\": \"@karakeep/tsconfig/node.json\",\n \"include\": [\"src\""
},
{
"path": "apps/mcp/vite.config.mts",
"chars": 584,
"preview": "// This file is shamelessly copied from immich's CLI vite config\n// https://github.com/immich-app/immich/blob/main/cli/v"
},
{
"path": "apps/mobile/.gitignore",
"chars": 415,
"preview": "# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files\n\n# dependencies\nnode_modules"
},
{
"path": "apps/mobile/.npmrc",
"chars": 20,
"preview": "node-linker=hoisted\n"
},
{
"path": "apps/mobile/.oxlintrc.json",
"chars": 661,
"preview": "{\n \"$schema\": \"../../node_modules/oxlint/configuration_schema.json\",\n \"extends\": [\n \"../../tooling/oxlint/oxlint-ba"
},
{
"path": "apps/mobile/app/+not-found.tsx",
"chars": 187,
"preview": "import { View } from \"react-native\";\n\n// This is kinda important given that the sharing modal always resolve to an unkno"
},
{
"path": "apps/mobile/app/_layout.tsx",
"chars": 4895,
"preview": "import \"@/globals.css\";\nimport \"expo-dev-client\";\n\nimport { useEffect } from \"react\";\nimport { Platform } from \"react-na"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/(highlights)/_layout.tsx",
"chars": 905,
"preview": "import { Platform } from \"react-native\";\nimport { Stack } from \"expo-router/stack\";\n\nexport default function Layout() {\n"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/(highlights)/index.tsx",
"chars": 1281,
"preview": "import FullPageError from \"@/components/FullPageError\";\nimport HighlightList from \"@/components/highlights/HighlightList"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/(home)/_layout.tsx",
"chars": 899,
"preview": "import { Platform } from \"react-native\";\nimport { Stack } from \"expo-router/stack\";\n\nexport default function Layout() {\n"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/(home)/index.tsx",
"chars": 4449,
"preview": "import { useRef } from \"react\";\nimport { Platform, Pressable, View } from \"react-native\";\nimport * as Haptics from \"expo"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/(lists)/_layout.tsx",
"chars": 900,
"preview": "import { Platform } from \"react-native\";\nimport { Stack } from \"expo-router/stack\";\n\nexport default function Layout() {\n"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/(lists)/index.tsx",
"chars": 8130,
"preview": "import { useEffect, useMemo, useState } from \"react\";\nimport { FlatList, Pressable, View } from \"react-native\";\nimport *"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/(settings)/_layout.tsx",
"chars": 903,
"preview": "import { Platform } from \"react-native\";\nimport { Stack } from \"expo-router/stack\";\n\nexport default function Layout() {\n"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/(settings)/index.tsx",
"chars": 12063,
"preview": "import { useEffect, useState } from \"react\";\nimport {\n ActivityIndicator,\n Alert,\n Modal,\n Pressable,\n ScrollView,\n"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/(tags)/_layout.tsx",
"chars": 899,
"preview": "import { Platform } from \"react-native\";\nimport { Stack } from \"expo-router/stack\";\n\nexport default function Layout() {\n"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/(tags)/index.tsx",
"chars": 3998,
"preview": "import { useEffect, useState } from \"react\";\nimport { FlatList, Pressable, View } from \"react-native\";\nimport { Link } f"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/_layout.tsx",
"chars": 1723,
"preview": "import React from \"react\";\nimport {\n Icon,\n Label,\n NativeTabs,\n VectorIcon,\n} from \"expo-router/unstable-native-tab"
},
{
"path": "apps/mobile/app/dashboard/(tabs)/index.tsx",
"chars": 128,
"preview": "import { Redirect } from \"expo-router\";\n\nexport default function TabIndex() {\n return <Redirect href=\"/dashboard/(home)"
},
{
"path": "apps/mobile/app/dashboard/_layout.tsx",
"chars": 5348,
"preview": "import type { AppStateStatus } from \"react-native\";\nimport { useEffect } from \"react\";\nimport { AppState, Platform } fro"
},
{
"path": "apps/mobile/app/dashboard/archive.tsx",
"chars": 181,
"preview": "import UpdatingBookmarkList from \"@/components/bookmarks/UpdatingBookmarkList\";\n\nexport default function Archive() {\n r"
},
{
"path": "apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx",
"chars": 3883,
"preview": "import { useState } from \"react\";\nimport { KeyboardAvoidingView, Pressable, View } from \"react-native\";\nimport { useSafe"
},
{
"path": "apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx",
"chars": 13174,
"preview": "import React from \"react\";\nimport {\n ActivityIndicator,\n Alert,\n Pressable,\n TextInput,\n View,\n} from \"react-native"
},
{
"path": "apps/mobile/app/dashboard/bookmarks/[slug]/manage_lists.tsx",
"chars": 4639,
"preview": "import React from \"react\";\nimport { ActivityIndicator, Pressable, ScrollView, View } from \"react-native\";\nimport { Stack"
},
{
"path": "apps/mobile/app/dashboard/bookmarks/[slug]/manage_tags.tsx",
"chars": 7480,
"preview": "import React, { useMemo } from \"react\";\nimport { Pressable, ScrollView, View } from \"react-native\";\nimport { Stack, useL"
},
{
"path": "apps/mobile/app/dashboard/bookmarks/new.tsx",
"chars": 2186,
"preview": "import React, { useState } from \"react\";\nimport { View } from \"react-native\";\nimport { router } from \"expo-router\";\nimpo"
},
{
"path": "apps/mobile/app/dashboard/favourites.tsx",
"chars": 221,
"preview": "import UpdatingBookmarkList from \"@/components/bookmarks/UpdatingBookmarkList\";\n\nexport default function Favourites() {\n"
},
{
"path": "apps/mobile/app/dashboard/lists/[slug]/edit.tsx",
"chars": 4533,
"preview": "import { useEffect, useState } from \"react\";\nimport { View } from \"react-native\";\nimport { router, useLocalSearchParams "
},
{
"path": "apps/mobile/app/dashboard/lists/[slug]/index.tsx",
"chars": 4651,
"preview": "import { Alert, Platform, View } from \"react-native\";\nimport * as Haptics from \"expo-haptics\";\nimport { router, Stack, u"
},
{
"path": "apps/mobile/app/dashboard/lists/new.tsx",
"chars": 3477,
"preview": "import React, { useState } from \"react\";\nimport { View } from \"react-native\";\nimport { router } from \"expo-router\";\nimpo"
},
{
"path": "apps/mobile/app/dashboard/search.tsx",
"chars": 4826,
"preview": "import { useMemo, useRef, useState } from \"react\";\nimport { FlatList, Keyboard, Pressable, TextInput, View } from \"react"
},
{
"path": "apps/mobile/app/dashboard/settings/bookmark-default-view.tsx",
"chars": 2136,
"preview": "import { Pressable, ScrollView, View } from \"react-native\";\nimport { useRouter } from \"expo-router\";\nimport { Divider } "
},
{
"path": "apps/mobile/app/dashboard/settings/reader-settings.tsx",
"chars": 9028,
"preview": "import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { Pressable, ScrollView, View } from \"react-nat"
},
{
"path": "apps/mobile/app/dashboard/settings/theme.tsx",
"chars": 1402,
"preview": "import { Pressable, ScrollView, View } from \"react-native\";\nimport { Divider } from \"@/components/ui/Divider\";\nimport { "
},
{
"path": "apps/mobile/app/dashboard/tags/[slug].tsx",
"chars": 1254,
"preview": "import { Stack, useLocalSearchParams } from \"expo-router\";\nimport UpdatingBookmarkList from \"@/components/bookmarks/Upda"
},
{
"path": "apps/mobile/app/error.tsx",
"chars": 262,
"preview": "import { View } from \"react-native\";\nimport { Text } from \"@/components/ui/Text\";\n\nexport default function ErrorPage() {"
},
{
"path": "apps/mobile/app/index.tsx",
"chars": 443,
"preview": "import { Redirect } from \"expo-router\";\nimport FullPageSpinner from \"@/components/ui/FullPageSpinner\";\nimport { useIsLog"
},
{
"path": "apps/mobile/app/server-address.tsx",
"chars": 7155,
"preview": "import { useState } from \"react\";\nimport { Pressable, View } from \"react-native\";\nimport { KeyboardAwareScrollView } fro"
},
{
"path": "apps/mobile/app/sharing.tsx",
"chars": 6825,
"preview": "import { useEffect, useRef, useState } from \"react\";\nimport { Pressable, View } from \"react-native\";\nimport Animated, { "
},
{
"path": "apps/mobile/app/signin.tsx",
"chars": 8033,
"preview": "import { useRef, useState } from \"react\";\nimport {\n Keyboard,\n KeyboardAvoidingView,\n Pressable,\n TouchableWithoutFe"
},
{
"path": "apps/mobile/app/test-connection.tsx",
"chars": 4148,
"preview": "import React from \"react\";\nimport { Platform, ScrollView, View } from \"react-native\";\nimport * as Clipboard from \"expo-c"
},
{
"path": "apps/mobile/app.config.js",
"chars": 3673,
"preview": "const IS_DEV = process.env.APP_VARIANT === \"development\";\n\nexport default {\n expo: {\n ...(IS_DEV\n ? {\n "
},
{
"path": "apps/mobile/babel.config.js",
"chars": 269,
"preview": "module.exports = function (api) {\n api.cache(true);\n const plugins = [];\n plugins.push(\"react-native-reanimated/plugi"
},
{
"path": "apps/mobile/components/CustomHeadersModal.tsx",
"chars": 6616,
"preview": "import { useState } from \"react\";\nimport { Modal, Pressable, ScrollView, View } from \"react-native\";\nimport { KeyboardAw"
},
{
"path": "apps/mobile/components/FullPageError.tsx",
"chars": 724,
"preview": "import { View } from \"react-native\";\nimport { Text } from \"@/components/ui/Text\";\n\nimport { Button } from \"./ui/Button\";"
},
{
"path": "apps/mobile/components/Logo.tsx",
"chars": 8486,
"preview": "import type { SvgProps } from \"react-native-svg\";\nimport * as React from \"react\";\nimport Svg, { G, Path } from \"react-na"
},
{
"path": "apps/mobile/components/SplashScreenController.tsx",
"chars": 289,
"preview": "import { SplashScreen } from \"expo-router\";\nimport useAppSettings from \"@/lib/settings\";\n\nSplashScreen.preventAutoHideAs"
},
{
"path": "apps/mobile/components/TailwindResolver.tsx",
"chars": 365,
"preview": "import { TextStyle, ViewStyle } from \"react-native\";\nimport { cssInterop } from \"nativewind\";\n\nfunction TailwindResolver"
},
{
"path": "apps/mobile/components/bookmarks/BookmarkAssetImage.tsx",
"chars": 550,
"preview": "import { View } from \"react-native\";\nimport { Image, ImageContentFit } from \"expo-image\";\nimport { useAssetUrl } from \"@"
},
{
"path": "apps/mobile/components/bookmarks/BookmarkAssetView.tsx",
"chars": 1538,
"preview": "import { useState } from \"react\";\nimport { Pressable, View } from \"react-native\";\nimport ImageView from \"react-native-im"
},
{
"path": "apps/mobile/components/bookmarks/BookmarkCard.tsx",
"chars": 17042,
"preview": "import {\n ActivityIndicator,\n Alert,\n Linking,\n Platform,\n Pressable,\n ScrollView,\n Share,\n View,\n} from \"react-"
},
{
"path": "apps/mobile/components/bookmarks/BookmarkHtmlHighlighterDom.tsx",
"chars": 2052,
"preview": "\"use dom\";\n\nimport \"@/globals.css\";\n\nimport type { Highlight } from \"@karakeep/shared-react/components/BookmarkHtmlHighl"
},
{
"path": "apps/mobile/components/bookmarks/BookmarkLinkPreview.tsx",
"chars": 7437,
"preview": "import { useState } from \"react\";\nimport { Pressable, TouchableOpacity, View } from \"react-native\";\nimport ImageView fro"
},
{
"path": "apps/mobile/components/bookmarks/BookmarkLinkTypeSelector.tsx",
"chars": 3294,
"preview": "import { Platform } from \"react-native\";\nimport * as Haptics from \"expo-haptics\";\nimport { useMenuIconColors } from \"@/l"
},
{
"path": "apps/mobile/components/bookmarks/BookmarkLinkView.tsx",
"chars": 1131,
"preview": "import {\n BookmarkLinkArchivePreview,\n BookmarkLinkBrowserPreview,\n BookmarkLinkPdfPreview,\n BookmarkLinkReaderPrevi"
},
{
"path": "apps/mobile/components/bookmarks/BookmarkList.tsx",
"chars": 1773,
"preview": "import { useRef } from \"react\";\nimport { ActivityIndicator, Keyboard, View } from \"react-native\";\nimport Animated, { Lin"
},
{
"path": "apps/mobile/components/bookmarks/BookmarkTextMarkdown.tsx",
"chars": 492,
"preview": "import Markdown from \"react-native-markdown-display\";\nimport { TailwindResolver } from \"@/components/TailwindResolver\";\n"
},
{
"path": "apps/mobile/components/bookmarks/BookmarkTextView.tsx",
"chars": 3301,
"preview": "import { useState } from \"react\";\nimport { Keyboard, Pressable, ScrollView, TextInput, View } from \"react-native\";\nimpor"
},
{
"path": "apps/mobile/components/bookmarks/BottomActions.tsx",
"chars": 4144,
"preview": "import { Alert, Linking, Pressable, View } from \"react-native\";\nimport { useRouter } from \"expo-router\";\nimport { Tailwi"
},
{
"path": "apps/mobile/components/bookmarks/NotePreview.tsx",
"chars": 2793,
"preview": "import { useState } from \"react\";\nimport { Modal, Pressable, ScrollView, View } from \"react-native\";\nimport { router } f"
},
{
"path": "apps/mobile/components/bookmarks/PDFViewer.tsx",
"chars": 3880,
"preview": "import React, { useEffect, useMemo, useState } from \"react\";\nimport { ActivityIndicator, StyleSheet, View } from \"react-"
},
{
"path": "apps/mobile/components/bookmarks/TagPill.tsx",
"chars": 721,
"preview": "import { Text, View } from \"react-native\";\nimport { Link } from \"expo-router\";\n\nimport { ZBookmarkTags } from \"@karakeep"
},
{
"path": "apps/mobile/components/bookmarks/UpdatingBookmarkList.tsx",
"chars": 1793,
"preview": "import { useInfiniteQuery, useQueryClient } from \"@tanstack/react-query\";\n\nimport type { ZGetBookmarksRequest } from \"@k"
}
]
// ... and 1406 more files (download for full content)
About this extraction
This page contains the full source code of the karakeep-app/karakeep GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1606 files (9.9 MB), approximately 2.7M tokens, and a symbol index with 2128 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.