A modern, minimal, and distraction-free paste sharing service built with Next.js 15, Tailwind CSS, and shadcn/ui.
- π¨ Clean Monochrome Design - Lots of whitespace, Inter font, subtle gray borders
- β‘ Instant Link Generation - Get your shareable link in milliseconds
- π One-Click Copy - Copy code or share link with smooth feedback animation
- π Auto Language Detection - Automatically detects JavaScript, Python, TypeScript, and more
- π― Syntax Highlighting - Beautiful code highlighting with Prism.js
- β° Expiration Options - Set pastes to expire after 1 hour, 1 day, 7 days, or 30 days
- π Raw View - View raw content for easy
curlor script usage - β¨οΈ Keyboard Shortcuts - Press
Ctrl/Cmd + Sto instantly share
- Framework: Next.js 15 with App Router
- Styling: Tailwind CSS v4 + shadcn/ui
- Database: In-memory store (ready for Supabase integration)
- Syntax Highlighting: react-syntax-highlighter
- ID Generation: nanoid
- Node.js 18.17 or later
- npm, yarn, or pnpm
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env.local
-
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
zenpaste/
βββ src/
β βββ app/
β β βββ api/paste/ # API route for creating pastes
β β βββ p/[id]/ # Dynamic route for viewing pastes
β β β βββ page.tsx # Paste view page
β β β βββ raw/page.tsx # Raw view page
β β β βββ not-found.tsx # 404 for missing pastes
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page (editor)
β βββ components/
β β βββ ui/ # shadcn/ui components
β β βββ CodeEditor.tsx # Main editor component
β β βββ CodeViewer.tsx # Syntax highlighted viewer
β β βββ CopyButton.tsx # Copy button with animation
β βββ lib/
β βββ db.ts # Database operations
β βββ utils.ts # Utility functions
βββ .env.example # Example environment variables
βββ package.json
The app comes with an in-memory store for development. For production, use Supabase:
Go to supabase.com and create a new project.
Run this SQL in the Supabase SQL Editor:
CREATE TABLE pastes (
id TEXT PRIMARY KEY,
content TEXT NOT NULL,
language TEXT DEFAULT 'plaintext',
expires_at TIMESTAMPTZ,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE INDEX idx_pastes_expires_at ON pastes(expires_at);Update your .env.local:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_keyUncomment the Supabase code in src/lib/db.ts.
npm run build
npm run start- Push your code to GitHub
- Import your repository on vercel.com
- Add your environment variables
- Deploy!
MIT License