Note
Kofee is just getting started.
We're running on free-tier infrastructure as we get things up and running.
If you try it and enjoy it, consider supporting the project, it directly helps us scale beyond the free tier and keep building.
Feedback, bug reports, and stars on the repo mean just as much. β
Kofee is an open source snippet manager built for developers who care about their tools.
Save, tag, search, and publish your code snippets with GitHub Gist integration baked in. Warm aesthetic and fast.
- Snippet editor with full syntax highlighting (JS, TS, Python, Rust, Java, C, C++, C#, CSS, SQL, HTML, Bash, JSON)
- Tag system: organize and filter your snippets by tag
- GitHub Gist integration: push any snippet to a private Gist in one click
- Import from Gist: paste a Gist URL and import it instantly
- Brew mode: distraction-free fullscreen editor
- Download snippets: export a single snippet or all of them as a
.zip - Auto-save: your work is saved automatically as you type
- Keyboard shortcuts: go fast brrr
- Login with GitHub: no passwords, no forms
- Guest mode: for people that don't want to login
- Snippet sharing: share snippets with others
- Warm, minimal UI: dark coffee-toned theme built
| Layer | Technology |
|---|---|
| Framework | Next.js 16.2 (App Router) |
| Language | TypeScript |
| Auth | Supabase Auth (GitHub OAuth) |
| Database | Supabase (PostgreSQL) |
| Code editor | CodeMirror 6 via @uiw/react-codemirror |
| Styling | CSS Modules |
| Deployment | Vercel |
| Rate limiting | Upstash (Redis) |
- Node.js
- A Supabase account (free)
- An Upstash account (free)
- A GitHub OAuth App
git clone https://github.com/hxpe-dev/kofee.git
cd kofee
npm installCreate a new Supabase project, then run the schema file in the SQL Editor:
# The full schema is at:
supabase/schema.sqlEnable GitHub as an auth provider in Supabase:
- Go to Authentication -> Providers -> GitHub
- Enter your GitHub OAuth App credentials
- Set the callback URL to:
https://<your-project-ref>.supabase.co/auth/v1/callback
Go to github.com/settings/developers -> New OAuth App:
- Homepage URL:
http://localhost:3000 - Callback URL:
https://<your-project-ref>.supabase.co/auth/v1/callback
Create a .env.local file at the root:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_publishable_key
TOKEN_ENCRYPTION_KEY=your_32_character_secret_key_hereGenerate a secure encryption key:
openssl rand -base64 32Create a free Upstash Redis database, then add to .env.local:
UPSTASH_REDIS_REST_URL=your_upstash_redis_url
UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_tokenAlso add these to your Vercel environment variables when deploying.
npm run devOpen http://localhost:3000 and sign in with GitHub.
- Push your repo to GitHub
- Import it on vercel.com
- Add your environment variables in the Vercel dashboard
- Update your GitHub OAuth App callback URL to your production domain
- Deploy
The full reproducible schema lives at supabase/schema.sql.
It includes:
snippetstable with RLS policies (enforcing a 100-snippet limit per user)shared_snippetstable for public snippets that auto-expire after 7 dayssnippet_reportstable to handle community moderationuser_tokenstable for encrypted GitHub tokens (with RLS)- Automated cleanup via
pg_cronfor expired shares - Optimized indexes on
user_idandupdated_at
- GitHub OAuth tokens are encrypted at rest using AES-GCM before being stored in the database
- The encryption key lives in your environment variables and never touches the database
- Row Level Security (RLS) is enabled on all tables, users can only access their own data
- The Supabase publishable key is safe to expose publicly by design
- API routes are rate limited using Upstash Redis, 10 requests per minute per user on Gist endpoints
- Snippet content is stored unencrypted, avoid storing sensitive credentials directly in snippets
- Each user is limited to 100 snippets, enforced at the database level via a PostgreSQL trigger
| Shortcut | Action |
|---|---|
Ctrl/Cmd + N |
New snippet (when not typing) |
Ctrl/Cmd + S |
Force save current snippet |
B |
Toggle Brew mode (when not typing) |
Enter (in title) |
Jump to code editor |
Esc |
Deselect snippet / exit Brew mode |
Contributions are very welcome, whether it's a bug fix, a new feature, or just improving the docs.
- Fork the repo
- Create a branch:
git checkout -b feat/your-feature - Make your changes
- Open a pull request with a clear description of what you changed and why
Please keep PRs focused, one feature or fix per PR makes review much easier!
If you're not sure whether something fits the project vision, open an issue first to discuss it.
Contributions are welcomed!
- Implement snippet favoriting and quick filter
- Enable filtering by multiple tags at the same time
- Public snippet profiles
- Snippet aging indicator (cold snippets you haven't used)
- VS Code extension
- Lazy loading optimization (don't fetch all user snippets at once)
Kofee is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-or-later).
This means:
- You are free to use, modify, and self-host this software
- If you modify Kofee and distribute it, or run it as a public service, you must make your source code available under the same license
- Private modifications that are not distributed or deployed as a service do not need to be shared
This ensures that improvements to Kofee used by others remain accessible to the community.
Kofee is licensed under AGPL-3.0-or-later to ensure that improvements made to the platform, especially when deployed as a hosted service, remain open and benefit the community.
Kofee is free and open source. If you find it useful and want to support its development, donations are appreciated and go directly toward keeping the project alive!
π Buy me a coffee
Built with β by hxpe
If you enjoy Kofee, consider starring the GitHub repository!
Β© 2026 hxpe - Licensed under AGPL-3.0-or-later
