
Snippets Library
Code snippet manager with syntax highlighting and sharing
66 stars 6 forks last commit first released
Slowing down
No commits since 13 Sept 2025. Check the issue tracker before you rely on it.

Snippets Library is a full-stack code snippet manager for storing, organizing, and sharing code with high-quality syntax highlighting and search. It provides authenticated snippet storage, public share links with view/like tracking, per-user settings, and a RESTful API surface for snippet management.
Key Features
- Create, edit, delete and organize code snippets with metadata (title, description, language, tags).
- Server-side syntax highlighting using Shiki with a cached highlighting service and fallback language detection.
- Public share links implemented via secure random share IDs with view counting, like/unlike and copy-as-new-snippet actions.
- Per-user bookmarks, likes, and persistent user settings stored in a JSONB settings object.
- Authentication via NextAuth (GitHub provider) with a Drizzle adapter; sessions stored in the database.
- Postgres-backed schema using Drizzle ORM; includes snippet views, likes, bookmarks and user tables plus migration scripts.
- Instant search, pagination, language filtering and tag-based queries on the snippets API.
- Utility endpoints for language detection, health checks and user settings.
Use Cases
- Maintain a personal searchable library of commonly used code snippets and templates.
- Share public examples or utilities with teammates using secure share links and track engagement.
- Seed a developer blog or documentation with copyable, highlighted snippets and preserve authorship and metadata.
Limitations and Considerations
- Default authentication is configured for GitHub OAuth; additional providers require custom NextAuth configuration.
- Requires a PostgreSQL database and appropriate environment variables; migrations are managed via drizzle-kit.
- Shiki-based server-side highlighting can increase memory/CPU usage at scale and may require caching/worker tuning.
- The repository snapshot contains no bundled unit tests; testing must be added if required by deployments.
Snippets Library is suited for developers and teams who need a lightweight, self-hosted snippet manager with high-quality highlighting and sharing features. It is configurable for production deployments but requires standard Node/Postgres infrastructure and OAuth credentials to enable authentication.
Categories:
Tags:
Tech Stack:
Similar to Snippets Library
Dashwise
Customizable homelab dashboard for links, widgets and monitoring
Dashwise is a self-hosted homelab dashboard built with Next.js and PocketBase. It offers GUI-managed links, modular widgets, link uptime checks, spotlight search and OIDC SSO.

ByteStash
Self-hosted web app for storing and organizing code snippets
ByteStash is a self-hosted snippet manager for creating, editing, and filtering code snippets with secure storage in SQLite and an optional API with Swagger UI.
Chiyogami
Self-hosted pastebin with client-side encryption and REST API
Modern pastebin offering client-side encryption, configurable expiry, user accounts, public search and a REST API. Built with Go, SQLite and TailwindCSS.

Opengist
Self-hosted Git-backed pastebin and Gist-compatible code snippet manager
Self-hosted pastebin powered by Git. Create, share and manage public, unlisted or private code snippets with syntax highlighting, Git push/pull, OAuth logins and Docker/Helm deployment.

Enclosed
Minimal app for sharing end-to-end encrypted notes and files
Self-hostable, end-to-end encrypted note and file sharing with zero-knowledge storage, optional passwords, expiration (TTL), and delete-after-reading links.

nextExplorer
Self-hosted web file explorer with access control and previews
Modern, Docker-first self-hosted web file explorer with local users/groups, optional OIDC SSO, fast previews, built-in editor, sharing links, and search.




