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
- 📝 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
Add screenshots or a GIF of the app here once deployed, e.g.
docs/screenshot.png.
| 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.
git clone https://github.com/NEKOZAM-I/snippetvault.git
cd snippetvault- Go to supabase.com and create a free project.
- Open the SQL Editor and run the contents of
supabase/schema.sqlto create thesnippetstable and its security policies. - Go to Project Settings → API and copy your Project URL and anon public key.
Open js/supabaseClient.js and replace the placeholders:
const SUPABASE_URL = "YOUR_SUPABASE_PROJECT_URL";
const SUPABASE_ANON_KEY = "YOUR_SUPABASE_ANON_KEY";Since this is a static site, any local server works. For example:
npx serve .
# or
python3 -m http.server 8000Then open http://localhost:8000 (or the port shown) in your browser.
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
- Edit existing snippets
- User authentication (private snippet vaults per user)
- Export snippets as
.json/.md - Keyboard shortcuts (e.g.
nfor new snippet,/to focus search) - Dark/light theme toggle
Contributions are welcome! Please read CONTRIBUTING.md for guidelines and check the Code of Conduct.
Distributed under the MIT License. See LICENSE for details.
- Supabase for the instant Postgres backend
- highlight.js for syntax highlighting