MCPSERV.CLUB
Briefkasten

Briefkasten

Self-Hosted

Self-hosted bookmark manager with auto-fetching

Stale(68)
1.1kstars
1views
Updated May 8, 2025

Overview

Discover what makes Briefkasten powerful

Briefkasten is a self‑hosted bookmarking and link‑sharing platform built to run on any Prisma‑compatible database. At its core, it ingests URLs, automatically extracts titles and descriptions, stores metadata in a relational database, and exposes a full‑featured REST API for programmatic access. The application is written in TypeScript, leveraging the Next.js framework for server‑side rendering and API routes, while Prisma handles ORM abstractions across MySQL, PostgreSQL, SQLite, and other supported backends. This tight coupling to Prisma gives developers the flexibility to swap databases without touching business logic.

Framework & Runtime

Auth

Data Layer

Background Work

Overview

Briefkasten is a self‑hosted bookmarking and link‑sharing platform built to run on any Prisma‑compatible database. At its core, it ingests URLs, automatically extracts titles and descriptions, stores metadata in a relational database, and exposes a full‑featured REST API for programmatic access. The application is written in TypeScript, leveraging the Next.js framework for server‑side rendering and API routes, while Prisma handles ORM abstractions across MySQL, PostgreSQL, SQLite, and other supported backends. This tight coupling to Prisma gives developers the flexibility to swap databases without touching business logic.

Architecture

  • Framework & Runtime: Next.js (React) running on Node.js, exposing both SSR pages and API endpoints.
  • Auth: NextAuth.js powers OAuth integrations (Google, GitHub, etc.) and an email‑magic link flow.
  • Data Layer: Prisma ORM maps the domain model to the chosen database; migrations are managed via prisma migrate.
  • Background Work: Bookmark image fetching is delegated to a separate worker (briefkasten-scrape) that pulls thumbnails and screenshots asynchronously, decoupling heavy I/O from the request cycle.
  • Storage: Images are stored in external services (Supabase Storage, Cloudinary, etc.) to keep the database lean.
  • API: A RESTful interface supports CRUD operations on bookmarks, tags, and categories, with optional JWT authentication for external clients.

Core Capabilities

  • Bookmarking: Save URLs via browser extension, drag‑and‑drop, or REST API.
  • Metadata Extraction: Automatic scraping of title, description, and preview images using server‑side fetch.
  • Organisation: Tagging, categorisation, and nested views for fine‑grained filtering.
  • Search: Full‑text search powered by the underlying database’s native capabilities (PostgreSQL tsvector, MySQL full‑text).
  • Export/Import: Standard HTML bookmark format import/export for migration.
  • Authentication: OAuth + magic link, fully configurable through NextAuth providers.

Deployment & Infrastructure

Briefkasten is designed for containerised environments: a single Docker image exposes the Next.js app, while the scraping worker can run as a separate container. Minimal runtime dependencies (Node 18+, a Prisma‑compatible database, and an external image store) keep the footprint small. The app scales horizontally by running multiple instances behind a load balancer; Prisma’s connection pooling ensures efficient database utilisation. For developers, the official Docker Compose example demonstrates a quick local stack with PostgreSQL and Supabase Storage.

Integration & Extensibility

  • Plugins: While no formal plugin system exists yet, the open‑source codebase allows contributors to add new providers or storage backends by extending NextAuth or Prisma adapters.
  • Webhooks: The API can emit events (e.g., bookmark created) via configurable webhooks, enabling integration with CI/CD pipelines or notification services.
  • Customisation: UI themes and layouts are built with Tailwind CSS; developers can override components or create new pages within the Next.js pages directory.

Developer Experience

The project ships with comprehensive documentation covering setup, migration, and API usage. TypeScript types are generated from Prisma schemas, ensuring type safety across the stack. The community is active on GitHub, with issues and PRs frequently reviewed by the maintainer. The README highlights key prerequisites, while detailed migration guides assist in moving from v1 to the upcoming v2 beta.

Use Cases

  • Personal Knowledge Base: Developers can self‑host Briefkasten as a lightweight personal wiki, tagging and categorising research links.
  • Team Bookmarking Hub: In a small team, the REST API can be consumed by internal tooling (e.g., Slack bots) to share and retrieve bookmarks.
  • Educational Platforms: Instructors can expose the API to course portals, allowing students to save resources directly from lecture slides.
  • Productivity Suites: Integrate with browser extensions or mobile apps to provide a unified link‑saving experience across devices.

Advantages

  • Database Agnosticism: Prisma’s abstraction lets teams pick any relational database without code changes.
  • Self‑Hosting Freedom: No vendor lock‑in; all data remains under the developer’s control.
  • Extensible Auth: NextAuth supports a wide range of providers out‑of‑the‑box, making social login trivial.
  • Scalable Design: Separate API and worker processes allow horizontal scaling with minimal friction.
  • Open Source Licensing: MIT license ensures that the code can be freely modified and redistributed, encouraging community contributions.

In summary, Briefkasten offers a well‑structured, TypeScript‑centric stack that balances ease of deployment with the flexibility required by modern developers. Its clear separation of concerns, robust API surface, and community‑driven documentation make it an attractive choice for anyone looking to host a private bookmarking service.

Open SourceReady to get started?

Join the community and start self-hosting Briefkasten today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
MIT
Stars
1.1k
Technical Specs
Pricing
Open Source
Database
PostgreSQL
Supported OS
LinuxDocker
Author
ndom91
ndom91
Last Updated
May 8, 2025