Skip to content

Repository files navigation

🗄️ SnippetVault

Store, organize, and search your code snippets with syntax highlighting — all in a fast, dependency-free vanilla JS app backed by Supabase.

Live Demo · Report Bug · Request Feature

SnippetVault License Made with

✨ Features

  • 📝 Create & delete snippets with title, language, tags, and code
  • 🎨 Syntax highlighting for 15+ languages via highlight.js
  • 🔍 Live search across titles, code, and tags
  • 🏷️ Tag filtering with clickable filter pills
  • 🧰 Language filtering via dropdown
  • 📋 One-click copy to clipboard
  • ☁️ Cloud-persisted with Supabase (Postgres) — no local setup, no server to run
  • 📱 Responsive layout for desktop and mobile

🖼️ Screenshots

Add screenshots or a GIF of the app here once deployed, e.g. docs/screenshot.png.

🛠️ Tech Stack

Layer Choice
Frontend Vanilla JavaScript, HTML5, CSS3
Backend Supabase (Postgres + auto-generated REST API)
Highlighting highlight.js
Hosting Any static host (GitHub Pages, Netlify, Vercel)

No build step, no frameworks, no bundler — clone it and open index.html.

🚀 Getting Started

1. Clone the repo

git clone https://github.com/NEKOZAM-I/snippetvault.git
cd snippetvault

2. Create a Supabase project

  1. Go to supabase.com and create a free project.
  2. Open the SQL Editor and run the contents of supabase/schema.sql to create the snippets table and its security policies.
  3. Go to Project Settings → API and copy your Project URL and anon public key.

3. Configure the app

Open js/supabaseClient.js and replace the placeholders:

const SUPABASE_URL = "YOUR_SUPABASE_PROJECT_URL";
const SUPABASE_ANON_KEY = "YOUR_SUPABASE_ANON_KEY";

4. Run it locally

Since this is a static site, any local server works. For example:

npx serve .
# or
python3 -m http.server 8000

Then open http://localhost:8000 (or the port shown) in your browser.

📁 Project Structure

snippetvault/
├── index.html              # App markup
├── css/
│   └── style.css           # All styling
├── js/
│   ├── supabaseClient.js   # Supabase connection config
│   └── app.js               # App logic (CRUD, search, filters, rendering)
├── supabase/
│   └── schema.sql           # Database schema + RLS policies
├── .github/                 # Issue & PR templates
├── LICENSE
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
└── README.md

🗺️ Roadmap

  • Edit existing snippets
  • User authentication (private snippet vaults per user)
  • Export snippets as .json / .md
  • Keyboard shortcuts (e.g. n for new snippet, / to focus search)
  • Dark/light theme toggle

🤝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines and check the Code of Conduct.

📄 License

Distributed under the MIT License. See LICENSE for details.

🙏 Acknowledgements

About

Store, organize and search code snippets with syntax highlighting.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages