- Description
- Features
- Technologies
- Installation
- Configuration
- Usage
- Database Schema
- Screenshots
- Contributing
- License
Cloud CodeBase is a modern web application for managing code snippets that allows developers to store, organize, and share code snippets in the cloud. It's the ideal solution for keeping your useful snippets organized, accessible from anywhere, with the ability to share them with your team or the community.
- Developers who want to organize their favorite code snippets
- Development teams that need a shared code library
- Educators who want to share code examples with students
- Freelancers managing multiple projects
You can start using Cloud CodeBase immediately by visiting the live demo. The application is freely available for anyone to use - simply create an account and start organizing your code snippets.
If you prefer to host your own instance with full control over your data, you can follow the installation instructions below to set up your own deployment using your Supabase account and hosting platform of choice.
-
Full-Featured Code Editor with syntax highlighting
- Support for 10+ programming languages: JavaScript, TypeScript, Python, Java, PHP, CSS, HTML, SQL, Rust, Go, JSON with Add New functionality
- 8 theme options: VS Code Dark+, Dracula, Night Owl, Nord, Gruvbox Dark, Material Dark, Synthwave '84, One Dark
- Adjustable font size (12-24px)
- Preview of code with syntax highlighting
-
Create & Edit
- Title, description, and code
- Demo Link - Optional URL field for live demos (CodePen, JSFiddle, deployed apps, etc.)
- Multiple categories per snippet
- Multiple collections per snippet
- Multiple groups per snippet
- Custom tags for easier searching
-
Favorites System
- Mark important snippets as favorites
- Quick access to your favorite snippets
- Filter by favorites only
-
Public Sharing
- Make snippets public with one click
- Unique shareable link for each snippet
- Beautiful public view page without requiring authentication
- Save to Library - Authenticated users can save shared snippets to their own account
- Privacy warning indicators for public snippets
Cloud CodeBase features a powerful 4-tier organizational structure:
-
Categories (Languages)
- Classify snippets by programming language
- Custom color-coded categories
- 4 default categories auto-created: HTML, CSS, JavaScript, PHP
- Multiple categories per snippet
- Visual pills with category colors
- Snippet count per category
-
Collections (Boards)
- Organize snippets by project or theme
- Pink color scheme for visual distinction
- Drag & drop snippets into collections
- Multi-select for bulk operations
- Create collections on-the-fly during snippet creation
- Snippet count per collection
-
Groups (Projects)
- Organize snippets by larger projects or teams
- Amber color scheme for visual distinction
- Support for descriptions
- Drag & drop functionality
- Bulk operations support
- Snippet count per group
-
Tags
- Free-form text tags for flexible organization
- Autocomplete from existing tags
- Multiple tags per snippet
- Tag popularity sorting (most used first)
- Expandable tag list (shows top 12 by default)
- Snippet count per tag
-
Full-Text Search
- Search across title, description, and code content
- Real-time filtering as you type
- Case-insensitive matching
-
Advanced Filters
- Filter by category (language)
- Filter by collection
- Filter by group
- Filter by tag
- Filter favorites only
- Combine multiple filters simultaneously
-
Sorting Options
- Recently Added (default) - Sort by creation date
- Recently Modified - Sort by last update
- Oldest First - Chronological order
- Title (A-Z) - Alphabetical ascending
- Title (Z-A) - Alphabetical descending
- Favorites First - Starred snippets at the top
-
Modern Dark Theme
- Dark interface optimized for extended use
- Gradient accents (cyan β blue β indigo)
- Color-coded categories, collections, and groups
- Reduced eye strain
-
Copy Functionality
- Copy raw code to clipboard
- Copy as Markdown with proper code fences
- One-click copy with visual feedback
-
Drag & Drop
- Drag snippets to collections
- Drag snippets to groups
- Visual feedback during drag operations
- Bulk selection support
-
Editor Preferences
- Font size customization (12-24px)
- Theme selection (8 options)
- Preferences persist in localStorage
- Real-time preview updates
-
Row Level Security (RLS)
- Database-level access control
- Users can only see and modify their own data
- Public snippets have specific SELECT policies
-
Authentication
- Secure email/password authentication via Supabase Auth
- Email verification required
- Secure password reset functionality
- Session management with auto-refresh
-
Data Privacy
- Snippets are private by default
- Granular sharing control per snippet
- Public snippets accessible via unique share token
- No data sharing between users without explicit consent
| Technology | Version | Usage |
|---|---|---|
| React | 19.1.1 | UI Framework |
| React Router | 7.9.5 | Client-side Routing |
| Vite | 7.1.7 | Build Tool & Dev Server |
| Tailwind CSS | 4.1.16 | Styling Framework |
| CodeMirror | 6.x | Code Editor |
| React Syntax Highlighter | 15.x | Syntax Highlighting |
| Technology | Description |
|---|---|
| Supabase | Backend-as-a-Service |
| PostgreSQL | Relational Database |
| Supabase Auth | Authentication System |
| Row Level Security | Data Privacy & Security |
Before you begin, make sure you have installed:
- Node.js (v18 or newer)
- npm (v9 or newer)
- Git
- Supabase account (Free signup)
git clone https://github.com/yourusername/cloud-codebase.git
cd cloud-codebasenpm install- Sign in to Supabase Dashboard
- Click "New Project"
- Select organization and name your project
- Choose a Database Password (keep it safe!)
- Select Region (closest to you is recommended)
- Click "Create new project"
See the Database Schema section below for the complete SQL schema and setup instructions.
- Go to Settings > API in Supabase Dashboard
- Copy:
- Project URL (e.g.,
https://xxxxx.supabase.co) - anon/public key (the public API key)
- Project URL (e.g.,
Create a .env file in the project root:
# .env
VITE_SUPABASE_URL=your_project_url_here
VITE_SUPABASE_ANON_KEY=your_anon_key_hereFor production, create .env.production:
# .env.production
VITE_SUPABASE_URL=your_project_url_here
VITE_SUPABASE_ANON_KEY=your_anon_key_here
β οΈ Warning: Do NOT commit.envfiles to Git!
- Go to Authentication > URL Configuration in Supabase
- Add the following Redirect URLs:
- Development:
http://localhost:5173/auth/callback - Production:
https://your-domain.com/auth/callback(if you have a custom domain)
- Development:
npm run devThe application will run at http://localhost:5173
npm run build
npm run previewThe vite.config.js contains build settings:
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [react(), tailwindcss()],
base: process.env.NODE_ENV === 'production' ? '/codebase/' : '/',
});π‘ Change the
basepath if deploying to a different subdirectory.
The tailwind.config.js defines custom styles:
/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [],
};Users can customize:
- Font Size: 12px - 24px
- Theme: 8 available themes
- Preferences are saved in localStorage
- Visit the application
- Create an account with email/password
- Confirm your email
- Sign in
- Click "+ New Snippet"
- Fill in:
- Title: Descriptive name
- Description: What this snippet does
- Code: Your code
- Demo Link (optional): Link to live demo or example
- Select Categories (can select multiple)
- Add to Collections (optional)
- Add to Groups (optional)
- Add Tags (optional)
- Click "Save"
- Sidebar β "+ Add Category"
- Choose name and color
- Sidebar β "+ Add Collection"
- Give it a name (e.g., "React Project", "Utils")
- Sidebar β "+ Add Group"
- Provide name and optional description
- Drag & drop the snippet to collection or group
- Or edit the snippet and select collections/groups
- Use the search bar for full-text search
- Filter by category, collection, group, or tag
- Sort results by various criteria
- Open the snippet
- Enable "Make Public"
- Copy the share link
- Send the link to anyone
Shared snippets have a beautiful public view where:
- Anyone can view the snippet without signing in
- Authenticated users can save it to their own library
- Demo links are prominently displayed
The complete database schema including all tables, relationships, Row Level Security policies, and triggers is available in a separate file.
View Complete Database Schema β
The database includes:
- Tables: profiles, categories, collections, snippet_groups, tags, snippets, and junction tables
- Row Level Security (RLS) policies for all tables
- Triggers for automatic default category creation
- Foreign key relationships with cascade delete
Contributions are always welcome! If you'd like to help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Respect other contributors
- Write clean, documented code
- Test your changes before submitting PR
If you find a bug:
- Check if there's already an issue
- If not, create a new issue with:
- Problem description
- Steps to reproduce
- Expected vs Actual behavior
- Screenshots (if applicable)
- Browser & OS info
This project is free to use. You can modify and distribute it as you wish.
For questions or support:
- GitHub Issues: Create Issue
- Email: tkarts@bitlogic.cloud
- React - The best UI framework
- Supabase - For the amazing BaaS platform
- Tailwind CSS - For utility-first CSS
- CodeMirror - For the excellent code editor
- Vite - For the blazing-fast build tool
Made with β€οΈ for developers, by developers
If you like this project, give it a βοΈ!
