Core Technologies Used in Karakeep: Complete Stack Breakdown
Karakeep is built on a modular stack featuring Next.js and React 19 for the frontend, tRPC and Hono for type-safe APIs, Drizzle ORM with SQLite for data persistence, and Meilisearch with OpenAI for intelligent bookmark management.
Karakeep (formerly Hoarder) is a self-hostable bookmark manager that combines modern web technologies to deliver fast, AI-enhanced content curation. Understanding the core technologies used in Karakeep reveals how the application achieves its type-safe architecture, responsive interface, and automated background processing. The project is organized as a monorepo with distinct packages for the web interface, API layer, database schema, and background workers, as documented in docs/docs/08-development/04-architecture.md.
Frontend Stack: Next.js, React 19, and Tailwind CSS
The user interface leverages Next.js with the App Router for server-side rendering and static optimization, as defined in apps/web/package.json. The frontend runs on React 19 for component rendering and styling is handled by Tailwind CSS, a utility-first CSS framework that enables rapid UI development. Radix UI provides the accessible headless primitives—such as dialogs, menus, and toast notifications—that form the foundation of the interface components.
Type-Safe API Layer with tRPC and Hono
Instead of traditional REST or GraphQL endpoints, Karakeep implements tRPC to provide end-to-end type safety between the client and server without manual contract definitions. The backend utilizes Hono, a lightweight web framework, alongside NextAuth for authentication and session management.
The tRPC router implementation in packages/trpc/routers/bookmarks.ts handles bookmark CRUD operations, rate limiting, and job queueing. This approach ensures that TypeScript types are shared across the stack, eliminating API contract mismatches.
Example of creating a bookmark via the tRPC client:
import { createTRPCClient } from '@trpc/client';
import type { AppRouter } from '@karakeep/trpc';
const client = createTRPCClient<AppRouter>({
url: '/api/trpc',
});
await client.bookmarks.createBookmark.mutation({
title: 'Example',
type: 'LINK',
url: 'https://example.com',
});
Database and ORM: Drizzle with SQLite and PostgreSQL
Data persistence relies on Drizzle ORM, a type-safe SQL builder and migration tool that supports both SQLite (default) and PostgreSQL. For self-hosted deployments, SQLite provides an embedded relational database requiring no external server configuration, while PostgreSQL remains available for production-scale instances. The schema definitions in packages/db/schema.ts establish the relational structure for users, bookmarks, tags, and background job queues.
Full-Text Search with Meilisearch
For instant, typo-tolerant search capabilities, Karakeep integrates Meilisearch as a dedicated search engine. Operating as a separate service from the primary database, Meilisearch indexes bookmark content extracted by Puppeteer workers, enabling fast queries across titles, descriptions, and full-text content.
Example Meilisearch query implementation:
import { getSearchClient } from '@karakeep/shared/search';
const client = await getSearchClient();
const result = await client.search({
query: 'typescript',
filter: [{ type: 'eq', field: 'userId', value: 'user-1' }],
});
AI Processing and Web Scraping
The automation layer combines OpenAI for LLM-powered tagging and summarization with Puppeteer for headless browser crawling. These technologies enable Karakeep to automatically extract content from saved links, generate summaries, and suggest relevant tags without manual intervention.
Background Worker Architecture
Karakeep employs custom worker containers that handle resource-intensive tasks independently from the web server. These workers consume jobs from a SQLite-based queue (packages/db/schema.ts) to perform LinkCrawlerQueue operations for Puppeteer-based scraping, OpenAI inference jobs, and Meilisearch indexing.
Example of enqueuing a background crawl job:
import { LinkCrawlerQueue } from '@karakeep/shared-server';
await LinkCrawlerQueue.enqueue(
{ bookmarkId: 'abc123' },
{ priority: QueuePriority.Default, groupId: 'user-1' },
);
Monorepo Tooling and Development Workflow
The project structure is orchestrated with TurboRepo for task pipeline management and pnpm for workspace-aware package handling. Development tooling includes Vitest for unit testing, alongside oxlint and oxfmt for high-performance linting and code formatting. The comprehensive stack summary is maintained in the repository's README.md.
Summary
- Next.js and React 19 power the responsive frontend with Tailwind CSS and Radix UI components
- tRPC provides end-to-end type-safe API communication between client and server
- Drizzle ORM manages SQLite (default) and PostgreSQL databases with full TypeScript support
- Meilisearch delivers fast, typo-tolerant full-text search across bookmark collections
- OpenAI and Puppeteer enable automated content extraction and AI tagging via background workers
- TurboRepo and pnpm manage the monorepo structure and package dependencies
Frequently Asked Questions
What database does Karakeep use by default?
Karakeep uses SQLite by default for simple, embedded deployments that require no external database server, though PostgreSQL is fully supported for production environments. The Drizzle ORM layer defined in packages/db/schema.ts handles migrations and queries for both database options.
How does Karakeep achieve type safety across the API?
The application implements tRPC to create a type-safe RPC layer that connects the Next.js frontend directly to backend procedures in packages/trpc/routers/bookmarks.ts. This eliminates the need for manual API documentation or runtime validation, as TypeScript types are shared across the entire stack.
What technologies handle Karakeep's search functionality?
Meilisearch provides the full-text search capabilities, offering typo-tolerant matching and instant results. It operates as a separate containerized service from the main database, indexing content extracted by Puppeteer workers to enable fast queries across bookmark metadata and extracted text.
Is Karakeep designed specifically for self-hosting?
Yes, the architecture is optimized for self-hosting with minimal dependencies. The default SQLite database requires no external configuration, while Docker Compose configurations bundle Meilisearch, web containers, and background workers according to the specifications in docs/docs/08-development/04-architecture.md.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →