A full-stack web application built for developers who are tired of losing their best code snippets forever.
- Live Demo: https://code-stash-six.vercel.app
- GitHub: https://github.com/bytesbydev/codestash
- 🔐 Email/Password and Google Authentication
- 💾 Save snippets by language and tags
- 🔍 Search and filter snippets instantly
- 🎨 Syntax highlighted code preview
- 📋 One click copy to clipboard
- ✏️ Edit and delete snippets
- 📱 Fully responsive on all devices
- ⚡ Real-time sync with Firebase
| Layer | Tech |
|---|---|
| Frontend | React.js |
| Build Tool | Vite |
| Database | Firebase Firestore |
| Authentication | Firebase Auth |
| Styling | CSS |
| Deployment | Vercel |
codestash/
├── src/
│ ├── components/
│ │ ├── Navbar.jsx
│ │ ├── Navbar.css
│ │ ├── Sidebar.jsx
│ │ ├── Sidebar.css
│ │ ├── SearchBar.jsx
│ │ ├── SearchBar.css
│ │ ├── SnippetCard.jsx
│ │ ├── SnippetCard.css
│ │ ├── SnippetModal.jsx
│ │ └── SnippetModal.css
│ ├── pages/
│ │ ├── Login.jsx
│ │ ├── Login.css
│ │ ├── Signup.jsx
│ │ └── Dashboard.jsx
│ │ └── Dashboard.css
│ ├── hooks/
│ │ ├── useAuth.js
│ │ └── useSnippets.js
│ ├── firebase/
│ │ └── config.js
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── .env
├── .gitignore
├── vercel.json
├── index.html
└── package.json
1. Clone the repository
git clone https://github.com/bytesbydev/codestash.git
cd codestash2. Install dependencies
npm install3. Create a .env file in root folder
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
4. Setup Firebase
- Go to firebase.google.com
- Create a new project
- Enable Firestore Database
- Enable Authentication
- Email/Password
- Copy config to
.envfile
5. Run the project
npm run dev6. Open in browser
http://localhost:5173
| Variable | Description |
|---|---|
VITE_FIREBASE_API_KEY |
Firebase API Key |
VITE_FIREBASE_AUTH_DOMAIN |
Firebase Auth Domain |
VITE_FIREBASE_PROJECT_ID |
Firebase Project ID |
VITE_FIREBASE_STORAGE_BUCKET |
Firebase Storage Bucket |
VITE_FIREBASE_MESSAGING_SENDER_ID |
Firebase Sender ID |
VITE_FIREBASE_APP_ID |
Firebase App ID |
Deploy to Vercel:
- Push code to GitHub
- Go to vercel.com
- Import your GitHub repo
- Add all environment variables
- Click Deploy
Contributions are welcome!
- Fork the repository
- Create a new branch
- Make your changes
- Submit a pull request
This project is open source and available under the MIT License.
Devendra Rawat
- GitHub: @bytesbydev
- LinkedIn: Devendra Rawat
⭐ If you found CodeStash useful please give it a star on GitHub!
---