A clean, anonymous pastebin-like service built with Next.js and Firebase. Share text snippets quickly with readable URLs and QR codes.
- 🔗 Readable URLs: Get memorable links like
/wise-fox-82instead of random strings - 📱 QR Code Sharing: Automatically generated QR codes for easy mobile sharing
- 🔒 Anonymous: No registration required
- ⚡ Fast: Built with Next.js for optimal performance
- 📱 Responsive: Works perfectly on desktop and mobile
- 🎯 Simple: Clean, minimalist interface focused on usability
- Frontend: Next.js 16 (App Router), React 19, Tailwind CSS
- Backend: Next.js API Routes (serverless)
- Database: Firebase Firestore
- Hosting: Vercel (recommended)
- QR Codes: react-qr-code
- Node.js 18+
- npm or yarn
- Firebase account
npm install- Go to Firebase Console
- Create a new project
- Enable Firestore Database
- Go to Project Settings > General > Your apps
- Add a web app and copy the configuration
- Copy the environment template:
cp .env.local.example .env.local- Fill in your Firebase configuration in
.env.local:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key_here
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_idIn your Firebase Console, go to Firestore Database > Rules and set:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /pastes/{document} {
allow read: if true;
allow create: if true;
}
}
}npm run devOpen http://localhost:3000 to see the application.
- Push your code to GitHub
- Connect your repository to Vercel
- Add your environment variables in Vercel dashboard
- Deploy!
The app can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
src/
├── app/
│ ├── [slug]/ # Dynamic route for viewing pastes
│ │ └── page.tsx
│ ├── api/
│ │ ├── create/ # API route for creating pastes
│ │ │ └── route.ts
│ │ └── paste/[slug]/ # API route for fetching pastes
│ │ └── route.ts
│ ├── globals.css
│ ├── layout.tsx
│ └── page.tsx # Main page with text input
└── lib/
├── firebase.ts # Firebase configuration
├── generateId.ts # Readable URL generator
└── utils.ts # Utility functions
Creates a new paste.
Request:
{
"content": "Your text content here"
}Response:
{
"slug": "wise-fox-82"
}Retrieves a paste by its slug.
Response:
{
"content": "The paste content",
"createdAt": "2024-01-01T00:00:00.000Z"
}- Maximum characters: 50,000 (configurable in
src/app/page.tsx)
- Format:
{adjective}-{noun}-{number} - Example:
wise-fox-82,quick-ocean-99 - Collision handling with automatic retry
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details.