A modern, full-stack code snippet management application built with React, TypeScript, and Appwrite. Users can create, manage, and share code snippets with public/private visibility and collaborative sharing features.
- 🔐 Authentication: User registration and login with Appwrite
- 📝 Snippet Management: Create, edit, delete, and organize code snippets
- 🌐 Public/Private Snippets: Choose visibility for your snippets
- 🔍 Search: Find snippets by title, description, code, or tags
- 👥 Sharing: Invite others to collaborate on your snippets
- 🏷️ Tagging: Organize snippets with custom tags
- 📱 Responsive: Works on desktop and mobile devices
- Frontend: React 19, TypeScript, Tailwind CSS
- Backend: Appwrite (Backend-as-a-Service)
- Database: Appwrite Database
- Authentication: Appwrite Auth
- Storage: Appwrite Storage
- Routing: React Router DOM
- Node.js (v18 or higher)
- npm or yarn
- Appwrite account and project
-
Clone the repository
git clone <repository-url> cd snippetly
-
Install dependencies
npm install
-
Set up Appwrite
- Follow the detailed guide in
APPWRITE_SETUP.md - Create your Appwrite project and configure the database
- Set up the required collections and permissions
- Follow the detailed guide in
-
Configure environment variables Create a
.env.localfile in the project root:VITE_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1 VITE_APPWRITE_PROJECT_ID=your_project_id_here VITE_APPWRITE_DATABASE_ID=codecache_db VITE_APPWRITE_SNIPPETS_COLLECTION_ID=snippets VITE_APPWRITE_USERS_COLLECTION_ID=users VITE_APPWRITE_INVITATIONS_COLLECTION_ID=invitations VITE_APPWRITE_STORAGE_BUCKET_ID=snippet_files
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
src/
├── components/ # Reusable UI components
│ ├── ui/ # Basic UI components (Button, Input, etc.)
│ ├── AuthModal.tsx # Authentication modal
│ ├── SnippetCard.tsx # Snippet display component
│ ├── CreateSnippetModal.tsx
│ └── ShareSnippetModal.tsx
├── contexts/ # React contexts
│ └── AuthContext.tsx # Authentication context
├── lib/ # Utility libraries
│ ├── appwrite.ts # Appwrite API functions
│ └── utils.ts # General utilities
├── pages/ # Page components
│ ├── HomePage.tsx # Public snippets page
│ └── DashboardPage.tsx # User dashboard
├── types/ # TypeScript type definitions
│ └── index.ts
├── config/ # Configuration files
│ └── env.ts # Environment configuration
└── App.tsx # Main app component
- Browse public snippets on the home page
- Search through public snippets
- View snippet details (read-only)
- Create new snippets (public or private)
- Manage your personal snippets in the dashboard
- Share snippets with others via email invitations
- Edit and delete your own snippets
- Search through your personal snippets
- Send email invitations to collaborate on snippets
- Set different permission levels (read, write, admin)
- Manage invitation status and permissions
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
The project uses:
- TypeScript for type safety
- ESLint for code linting
- Prettier for code formatting
- Tailwind CSS for styling
-
Build the application
npm run build
-
Deploy to your preferred platform
- Vercel
- Netlify
- AWS S3 + CloudFront
- Any static hosting service
-
Update CORS settings
- Add your domain to Appwrite CORS settings
- Update environment variables for production
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support and questions:
- Check the
APPWRITE_SETUP.mdguide - Review the Appwrite documentation
- Open an issue in the repository
- Snippet versioning and history
- Real-time collaboration
- File attachments for snippets
- Advanced search filters
- Snippet collections/folders
- Export/import functionality
- API for third-party integrations