Skip to content

🐳 Self-hosted via Docker πŸ’» Manage your code snippets with syntax highlighting, tagging, and more ⚑ Effortlessly organize your code snippets with a lightweight, easy-to-use toolkit

Notifications You must be signed in to change notification settings

Paulkit/local-gist-manager

Repository files navigation

Local Gist Manager

A modern, minimal Next.js app for managing your GitHub Gists locally with a beautiful UI, built for Cloudflare Pages deployment.

token page

gist page

codebase tutorial page

⚠️ Suggestion: This project is for local use and experimentation. I advise you not to deploy it on the public Internetβ€”just play with it on your local machine. :)

πŸ† Best Practices for Using Local Gist Manager

This project is designed for local experimentation. To use it securely and effectively, please follow these best practices:

  1. Create a New Personal Access Token (Classic) with Least Privilege
    Generate your GitHub token at https://github.com/settings/tokens/new by selecting Personal Access Tokens (classic).

    • Give it a descriptive name.
    • Set an expiration date to enhance security.
    • Select only the gist checkbox with "Create gists" permission to follow the principle of least privilege.
    • Copy the token; you won’t be able to see it again after leaving the page.
  2. Do Not Store Credentials or Sensitive Data in Your Gists
    Avoid placing any personal credentials, tokens, or sensitive information inside your gists to prevent accidental exposure.

  3. Use the App Locally and Avoid Public Deployment
    Since the app manages your GitHub token, it is safer to run it locally or on trusted private environments like Cloudflare Pages with proper environment variable configurations.

  4. Manage Your Token Securely
    Use the app’s token management feature to set or clear your token as needed. Never commit your token to version control or share it publicly.

By adhering to these practices, you minimize security risks and ensure a smooth, secure experience managing your GitHub Gists locally.


πŸ“š One-day Complete Project Series

✨ Features

Feature Description
πŸ—‚οΈ Gist List View all your GitHub Gists in a clean, sortable list
πŸ“„ Multi-file Support See all files in a gist by default, with syntax highlighting
πŸ“ Create/Edit/Delete Full CRUD for your Gists (with GitHub token)
πŸ”‘ Token Management Easily set or clear your GitHub token from the header
πŸ’‘ Codebase Tutorial Quick access to a codebase walkthrough with a single click
🎨 Modern UI Responsive, accessible, and visually appealing design
☁️ Cloudflare Ready (Optional) Optimized for Cloudflare Pages, no Node.js built-in dependencies required

πŸš€ Quick Start

# Install dependencies
npm i

# Run locally
npm run dev

# Build for Cloudflare Pages
npm run build && npx @cloudflare/next-on-pages

Reminder:

  • In Cloudflare Pages, set the environment variable NODE_VERSION to at least 18.18.0.
  • Set Compatibility flags: nodejs_compat.

🐳 Quick Start with Docker

To run this app using Docker, use the following command:

docker run -d -p 3000:3000 paulkit41/local-gist-manager
  • The app will be available at http://localhost:3000.
  • Optionally, you can add your GitHub token as an environment variable:
docker run -d -p 3000:3000 -e NEXT_PUBLIC_GITHUB_TOKEN=your_github_token paulkit41/local-gist-manager

πŸ› οΈ Tech Stack


πŸ”’ Authentication

  • Uses a GitHub personal access token (PAT) for gist management.
  • Token can be set/cleared from the header at any time.

🌐 Deployment on Cloudflare Pages (Optional)

  1. Fork this repo / Download files manually.
  2. Connect the repo to Cloudflare Pages / Use direct upload.
  3. Set build command:
    npm run build && npx @cloudflare/next-on-pages
  4. Set output directory:
    .vercel/output/static

πŸ“¦ License

MIT

About

🐳 Self-hosted via Docker πŸ’» Manage your code snippets with syntax highlighting, tagging, and more ⚑ Effortlessly organize your code snippets with a lightweight, easy-to-use toolkit

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published