Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CodeCandy is a modern app for developers to organize, manage, and share code snippets effortlessly.

License

Notifications You must be signed in to change notification settings

suraniharsh/CodeCandy

Repository files navigation

CodeCandy 🍬

A modern web application for managing and sharing code snippets with syntax highlighting and organization features.

🌟 Features

  • Create and manage code snippets with syntax highlighting
  • Organize snippets into collections
  • Share snippets with others
  • Modern and responsive UI
  • Dark mode support
  • SEO optimized
  • Firebase integration for data storage

πŸ› οΈ Tech Stack

  • Frontend Framework: React 18 with TypeScript
  • Styling: TailwindCSS
  • Routing: React Router v7
  • State Management: React Context
  • Backend/Database: Firebase
  • Build Tool: Vite
  • Code Highlighting: React Syntax Highlighter & Prism.js
  • UI Components: Custom components with Framer Motion animations
  • Fonts: Inter & JetBrains Mono
  • Icons: React Icons
  • Toast Notifications: React Hot Toast
  • SEO: React Helmet Async
  • Type Checking: TypeScript

πŸ“ Project Structure

src/
β”œβ”€β”€ assets/ # Static assets and images
β”œβ”€β”€ components/ # Reusable UI components
β”œβ”€β”€ config/ # Configuration files
β”œβ”€β”€ contexts/ # React context providers
β”œβ”€β”€ data/ # Static data and constants
β”œβ”€β”€ hooks/ # Custom React hooks
β”œβ”€β”€ lib/ # Third-party library configurations
β”œβ”€β”€ pages/ # Page components
β”œβ”€β”€ services/ # API and service integrations
β”œβ”€β”€ types/ # TypeScript type definitions
└── utils/ # Utility functions

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Firebase account

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/codecandy.git
cd codecandy
  1. Install dependencies:
yarn install
# or
npm install
  1. Create a .env file in the root directory and add your Firebase configuration:
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_messaging_sender_id
VITE_FIREBASE_APP_ID=your_app_id
  1. Start the development server:
yarn dev
# or
npm run dev

πŸ“ Available Scripts

  • yarn dev - Start development server
  • yarn build - Build for production
  • yarn lint - Run ESLint
  • yarn preview - Preview production build locally

πŸ“š Key Components

  • CodeBlock: Handles code syntax highlighting
  • CreateSnippetForm: Form for creating new code snippets
  • Sidebar: Navigation and collection management
  • SEO: Handles meta tags and SEO optimization
  • SnippetView: Displays individual snippets

πŸ”§ Configuration Files

  • vite.config.ts - Vite configuration
  • tailwind.config.js - TailwindCSS configuration
  • tsconfig.json - TypeScript configuration
  • eslint.config.js - ESLint configuration
  • postcss.config.js - PostCSS configuration
  • firestore.rules - Firebase security rules

πŸ” Security

  • Firebase Authentication for user management
  • Secure Firestore rules
  • Environment variables for sensitive data

🌐 Deployment

The project is configured for deployment on Vercel with the following configuration:

{
 "rewrites": [
 {
 "source": "/(.*)",
 "destination": "/index.html"
 }
 ]
}

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🀝 Contributing

We love contributions! Please see our Contributing Guide for details on:

  • Development setup
  • Code style guidelines
  • Pull request process
  • Bug reporting
  • Code of conduct

πŸ“§ Support

For support, please open an issue in the GitHub repository or contact the maintainers.

About

CodeCandy is a modern app for developers to organize, manage, and share code snippets effortlessly.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 4

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /