Personal project for storing and sharing code snippets.
- Create/Edit/Delete snippets with Monaco Editor (27+ languages)
- Public/Private toggle - Public snippets can be embedded
- Embed functionality - JavaScript embed code for external websites
- Authentication - Email/password + GitHub OAuth via Supabase
- Next.js 16.1.1 (App Router) + React 19.2.3 + TypeScript
- Tailwind CSS 4
- Supabase (Auth + PostgreSQL with RLS)
- Monaco Editor
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keyCREATE TABLE snippets (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE,
title TEXT NOT NULL,
code TEXT NOT NULL,
language VARCHAR(50) NOT NULL,
description TEXT,
is_public BOOLEAN DEFAULT false,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);With RLS policies:
- Users can only view/modify their own snippets
- Public snippets are viewable by everyone
/- Landing page/login- Sign in/up/auth/callback- OAuth callback/dashboard- My snippets/snippets/new- Create new/snippets/[id]- View snippet/snippets/[id]/edit- Edit snippet/embed/[id]- Embed endpoint
npm run dev # Start dev server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint