A fast, minimal, and privacy-focused code snippet sharing platform built for developers.
DevSnippet allows developers to instantly share code snippets with anyone using a unique public link. Whether you're asking for debugging help, sharing configuration files, sending interview solutions, or collaborating with teammates, DevSnippet provides a clean and efficient experience with optional expiration and one-time viewing support.
π Live Demo: https://devsnippet-space.vercel.app/
- Write code using the Monaco Editor (same editor that powers VS Code).
- Supports syntax highlighting for multiple programming languages.
- Clean and distraction-free editing experience.
- Set a custom Time-To-Live (TTL) while creating a snippet.
- Snippets automatically expire after the specified duration.
- If no expiration is selected, the snippet remains available indefinitely.
- Create account with your email and password.
- Easy login with Google and GitHub OAuth.
- Snippets are associated with your account.
- Only you can view all your snippets and choose which ones to share.
- Every snippet gets a unique public URL.
- Share the link with anyone.
- No authentication required for viewing.
- Enable Burn After Reading while creating a snippet.
- Once the snippet is opened, it is permanently deleted.
- Ideal for sharing sensitive code, API keys (temporary), or confidential snippets.
- Shared snippets are displayed inside a read-only Monaco Editor.
- Maintains syntax highlighting and formatting.
- Prevents accidental modifications.
- Copy the complete snippet to the clipboard with a single click.
- Optimized UI with smooth interactions.
- Responsive design for desktop and mobile devices.
- Next.js
- TypeScript
- Tailwind CSS
- React Hook Form
- Zod
- Monaco Editor
- Next.js API Routes
- NextAuth (Authentication)
- MongoDB
- Mongoose
- Vercel
DevSnippet/
β
βsrc
β βββ client/
β βββ app/
β βββ components/
β βββ lib/
β βββ context/
β βββ lib/
β βββ ...
β
βββ server/
β βββ controllers/
β βββ routes/
β βββ models/
β βββ middleware/
β βββ ...
β
βββ README.md
- npm / yarn / pnpm
- MongoDB
Clone the repository
git clone https://github.com/your-username/devsnippet.gitMove into the project
cd devsnippet/srcnpm install
Create a .env file inside the server directory.
MONGODB_URI=your_mongodb_connection_string
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
GOOGLE_OAUTH_CLIENT_ID=your_google_oauth_client_id
GOOGLE_OAUTH_CLIENT_SECRET=your_google_oauth_client_secret
GITHUB_OAUTH_CLIENT_ID=your_github_oauth_client_id
GITHUB_OAUTH_CLIENT_SECRET=your_github_oauth_client_secretcd src
npm run devOpen
http://localhost:3000
- Write/paste your code.
- Select the language.
- (Optional) Set an expiration time.
- (Optional) Enable Burn After Reading.
- Create the snippet.
- Share the generated link.
Anyone with the generated link can:
- View the snippet
- Copy it to clipboard
- Read it in a VS Code-like editor
If Burn After Reading is enabled:
- The snippet is deleted immediately after the first successful view.
Unlike traditional paste tools, DevSnippet focuses on simplicity and privacy.
β No login required for public viewing of snippets
β Expiring snippets
β One-time viewing
β VS Code-like editing experience
β Fast sharing
β Secure snippets and easy access with Google and GitHub login providers
- Edit existing snippets
- Syntax auto-detection
- Dark/Light theme toggle
- Favorites & Collections
- Markdown support
- Rate limiting & abuse protection
- Next.js
- TypeScript
- MongoDB
- Mongoose
- Monaco Editor
- React Hook Form
- Zod
- Tailwind CSS
- Vercel
Contributions, issues, and feature requests are welcome.
- Fork the repository.
- Create your feature branch.
git checkout -b feature/amazing-feature- Commit your changes.
git commit -m "Add amazing feature"- Push to the branch.
git push origin feature/amazing-feature- Open a Pull Request.
Vaidik Dubey
- GitHub: https://github.com/vaidikdubey
- LinkedIn: https://linkedin.com/in/vaidikdubey
β If you found this project useful, consider giving it a star!




