Skip to content

Snippet Box is a simple self-hosted app for organizing your code snippets. It allows you to easily create, edit, browse and manage your snippets in various languages.

License

Notifications You must be signed in to change notification settings

pawelmalak/snippet-box

Repository files navigation

Snippet Box

Snippet library screenshot

Description

Snippet Box is a simple self-hosted app for organizing your code snippets. It allows you to easily create, edit, browse and manage your snippets in various languages. With built-in Markdown support, Snippet Box makes it very easy to add notes or simple documentation to your code.

Installation

With Docker

Docker Hub

Docker Hub link

docker pull pawelmalak/snippet-box

Deployment

# Create container
docker run -p 5000:5000 -v /path/to/host/data:/app/data pawelmalak/snippet-box

Building image

# Building single image
docker build -t snippet-box .

# Building multiarch image
docker buildx build \
  --platform linux/arm/v7,linux/arm64,linux/amd64 \
  -t snippet-box .

Docker Compose

version: '3'
services:
  snippet-box:
    image: pawelmalak/snippet-box:latest
    container_name: snippet-box
    volumes:
      - /path/to/host/data:/app/data
    ports:
      - 5000:5000
    restart: unless-stopped

Without Docker

Follow instructions from wiki - Installation without Docker

Development

Technology

  • Backend
    • Node.js
    • Typescript
    • Express.js
    • Sequelize ORM + SQLite
  • Frontend
    • React
    • TypeScript
    • Bootstrap
  • Deployment
    • Docker

Creating dev environment

# clone repository
git clone https://github.com/pawelmalak/snippet-box
cd snippet-box

# install dependencies (run only once)
npm run init

# start backend and frontend development servers
npm run dev

Functionality

  • Search
    • Search your snippets with built-in tags and language filters
  • Pinned snippets
    • Pin your favorite / important snippets to home screen for easy and quick access

Homescreen screenshot

  • Snippet library
    • Manage your snippets through snippet library
    • Easily filter and access your code using tags

Snippet library screenshot

  • Snippet
    • View your code, snippet details and documentation
    • Built-in syntax highlighting
    • Easily perform snippet actions like edit, pin or delete from a single place

Snippet screenshot

  • Editor
    • Create and edit your snippets from simple and easy to use editor

Editor screenshot

Usage

Search functionality

Visit wiki for search functionality and available filters reference: Search functionality

About

Snippet Box is a simple self-hosted app for organizing your code snippets. It allows you to easily create, edit, browse and manage your snippets in various languages.

Topics

Resources

License

Stars

Watchers

Forks

Languages