Skip to content

Himanshu0518/CodeCraft

Repository files navigation

CodeCraft

A modern, full-featured web development platform inspired by CodePen, enabling developers to create, share, and collaborate on web projects in real-time.

Live Demo GitHub

🌟 Project Overview

CodeCraft is a comprehensive web development platform that empowers developers to create, experiment, and share their code seamlessly. Built with modern technologies and best practices, it offers a CodePen-like experience with enhanced features for project management and social collaboration.

🎯 Key Highlights

  • Real-time Code Execution: Instant preview and compilation of HTML, CSS, and JavaScript
  • Social Platform: Follow creators, bookmark projects, and build a developer community
  • Authentication System: Secure user management with Firebase Authentication
  • Project Management: Create, save, and organize development projects
  • Responsive Design: Optimized for all devices and screen sizes
  • Performance Optimized: Built with Vite for lightning-fast development and production builds

Live Demo

Experience CodeCraft in action: codecraft-2f10d.web.app

πŸ“‹ Table of Contents

✨ Features

πŸ”§ Core Functionality

  • Live Code Editor: Multi-pane editor with syntax highlighting for HTML, CSS, and JavaScript
  • Real-time Preview: Instant rendering of code changes with hot reload
  • Project Persistence: Save and manage multiple projects with cloud storage

πŸ‘₯ Social Features

  • User Profiles: Customizable developer profiles with project showcases
  • Follow System: Connect with other developers and stay updated with their work
  • Bookmarking: Save interesting projects for later reference

πŸ” Authentication & Security

  • Firebase Authentication: Secure login with multiple providers (Google, GitHub, Email)
  • Protected Routes: Role-based access control for user-specific features

πŸ“± User Experience

  • Responsive Design: Seamless experience across desktop, tablet, and mobile devices
  • Dark Theme: Customizable interface themes for better user comfort

πŸ› οΈ Tech Stack

Frontend

  • React - Component-based UI library with hooks and context
  • Vite - Next-generation frontend tooling for faster builds
  • JavaScript - Modern JavaScript with async/await and modules
  • TailwindCSS - Utility-first CSS framework for rapid styling
  • Shadcn/ui - Reusable component library built on Radix UI
  • Framer Motion - Production-ready motion library for React

Backend & Services

  • Firebase Hosting - Global CDN with automatic SSL and custom domains
  • Firebase Authentication - Secure user authentication and management
  • Firebase Firestore - NoSQL document database for real-time data

Development Tools

  • ESLint - Code linting for consistent code quality
  • Prettier - Code formatting for maintainable codebase
  • Git - Version control with feature branch workflow

πŸš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • pnpm (recommended) or npm
  • Git for version control

Installation

  1. Clone the repository

    git clone https://github.com/Himanshu0518/CodeCraft.git
    cd CodeCraft
  2. Install dependencies

    pnpm install
  3. Environment Configuration

     VITE_FIREBASE_API_KEY=your_api_key
     VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
     VITE_FIREBASE_PROJECT_ID=your_project_id
     VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
     VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
     VITE_FIREBASE_APP_ID=your_app_id 
  4. Start development server

    pnpm run dev
  5. Open your browser Navigate to http://localhost:5173 to see the application running.

Available Scripts

Command Description
pnpm run dev Start development server with hot reload
pnpm run build Build production-ready application
pnpm run preview Preview production build locally
pnpm run lint Run ESLint for code quality checks
pnpm run format Format code with Prettier

πŸ“ Project Structure

CodeCraft/
β”œβ”€β”€ public/                    # Static assets and PWA configuration
β”‚   └── vite.svg              # Application favicon and branding
β”œβ”€β”€ node_modules/              # Dependencies
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€  animations/
β”‚   β”œβ”€β”€  assets/            # Static assets (images, icons, fonts)
β”‚   β”œβ”€β”€  components/         # Reusable React components
β”‚   β”‚   └── ui/               # Shadcn/ui design system components
β”‚   β”‚       β”œβ”€β”€ Alert.jsx     # Alert notifications
β”‚   β”‚       β”œβ”€β”€ AppSideBar.jsx # Application sidebar navigation
β”‚   β”‚       β”œβ”€β”€ AuthWatcher.jsx # Authentication state monitor
β”‚   β”‚       β”œβ”€β”€ Footer.jsx    # Application footer
β”‚   β”‚       β”œβ”€β”€ Header.jsx    # Main header component
β”‚   β”‚       β”œβ”€β”€ ProjectCard.jsx # Project display cards
β”‚   β”‚       └── Protected.jsx # Route protection wrapper
β”‚   β”œβ”€β”€  config/            # Configuration files
β”‚   β”œβ”€β”€  features/          # Feature-based component organization
β”‚   β”‚   β”œβ”€β”€ authSlice.js       # Redux slice for authentication
β”‚   β”‚   β”œβ”€β”€ projectSlice.js   # Redux slice for project management
β”‚   β”‚   └── searchSlice.js    # Redux slice for search functionality
β”‚   β”œβ”€β”€  hooks/             # Custom React hooks
β”‚   β”œβ”€β”€  layouts/           # Layout components
β”‚   β”‚   β”œβ”€β”€ AuthLayout.jsx    # Authentication page layouts
β”‚   β”‚   └── RootLayout.jsx    # Main application layout
β”‚   β”œβ”€β”€  lib/               # Utility libraries and helpers
β”‚   β”œβ”€β”€  pages/             # Route components (page-level)
β”‚   β”‚   β”œβ”€β”€ Bookmarks.jsx     # User bookmarks page
β”‚   β”‚   β”œβ”€β”€ Following.jsx     # Following users page
β”‚   β”‚   β”œβ”€β”€ Home.jsx          # Landing/home page
β”‚   β”‚   β”œβ”€β”€ LoginPage.jsx     # User authentication page
β”‚   β”‚   β”œβ”€β”€ NewProject.jsx    # Project creation page
β”‚   β”‚   β”œβ”€β”€ Profile.jsx       # User profile page
β”‚   β”‚   β”œβ”€β”€ Project.jsx       # Individual project view
β”‚   β”‚   β”œβ”€β”€ SignupPage.jsx    # User registration page
β”‚   β”‚   └── YourWork.jsx      # User's projects dashboard
β”‚   β”œβ”€β”€ services/          # External service integrations
β”‚   β”‚   β”œβ”€β”€ auth.js           # Firebase authentication service
β”‚   β”‚   β”œβ”€β”€ bookmarks.js      # Bookmark management service
β”‚   β”‚   └── subscriptions.js  # User follow/following service
β”‚   β”œβ”€β”€  stores/           # State management (Redux store)
β”‚   β”‚   β”œβ”€β”€ store.js          # Main Redux store configuration
β”‚   β”‚   └── index.css         # Global styles and CSS variables
β”‚   β”œβ”€β”€ main.jsx              # Application entry point
β”‚   └── routes.jsx            # React Router configuration
β”œβ”€β”€ .env                      # Environment variables
β”œβ”€β”€ .gitignore               # Git ignore rules
β”œβ”€β”€ components.json          # Shadcn/ui component registry
β”œβ”€β”€ eslint.config.js         # ESLint configuration
β”œβ”€β”€ firebase.json            # Firebase project configuration
β”œβ”€β”€ index.html               # Main HTML template
β”œβ”€β”€ package.json             # Dependencies and scripts
└── vite.config.js           # Vite build configuration

🀝 Contributing

We welcome contributions from the developer community! Here's how you can help:

Contribution Guidelines

  1. Fork the repository and create your feature branch

    git checkout -b feature/amazing-feature
  2. Make your changes following our coding standards

    • Write clean, documented code
    • Follow existing code patterns
  3. Commit your changes with conventional commit messages

    git commit -m "feat: add amazing new feature"
  4. Push to your branch and create a Pull Request

    git push origin feature/amazing-feature

Development Workflow

  • Issues: Report bugs or request features through GitHub Issues
  • Pull Requests: Submit PRs with clear descriptions and test coverage
  • Code Review: All PRs require review before merging

πŸ‘¨β€πŸ’» Author

Himanshu Singh
Full Stack AI/ML Developer | IIIT Una


Built with ❀️ using React and Firebase


If you found this project helpful, please consider giving it a ⭐ on GitHub!

About

Full-Stack-project: CodeCraft inspired by codepen with all social features

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors