Skip to content

This web-based code editor empowers users to write, run, and view output for code in multiple programming languages. It is built with React and Chakra UI, and utilizes a remote API for code execution.

Notifications You must be signed in to change notification settings

Bushra-naeem/code-editor

Repository files navigation

CodeSphere - Online Code Editor

CodeSphere is a web-based code editor supporting multiple programming languages. It offers a seamless coding experience with syntax highlighting, code execution, and real-time output visualization. Built with React, Chakra UI, and powered by the Piston API, it provides a clean and efficient coding environment.


Key Features

🔹 Multi-Language Support: JavaScript, Python, Java, TypeScript, C#, and PHP.
🔹 Live Execution: Write and execute code with instant output.
🔹 Syntax Highlighting: Enjoy an intuitive and visually pleasing editor interface.
🔹 Customizable Theme: Built with Chakra UI for a responsive and accessible design.


Technologies Used

  • Frontend: React.js
  • UI Library: Chakra UI
  • Build Tool: Vite.js
  • HTTP Requests: Axios
  • Code Editor: Monaco Editor

Installation

  1. Clone the Repository:

    git clone <repository_url>
  2. Navigate to the Project Directory:

    cd code-editor
  3. Install Dependencies:

    npm install
  4. Run the Application:

    npm run dev

How to Use

  1. Choose a Language: Select a programming language from the dropdown.
  2. Write Code: Use the built-in editor with pre-defined code snippets.
  3. Execute: Click the "Run Code" button to see the output in real time.

Configuration

  • API Base URL: Defined in src/api.js (modify if needed).
  • Code Snippets & Languages: Managed in src/constants.js.

Project Structure

CODE-EDITOR/
├── src/
│   ├── components/        # React components  
│   ├── api.js             # API request functions  
│   ├── constants.js       # Supported languages and code snippets  
│   ├── App.jsx            # Main application file  
│   └── theme.js           # Chakra UI custom theme  
├── public/                # Static assets  
└── vite.config.js         # Vite configuration file  

Contributions

Contributions are welcome! If you have suggestions or improvements, feel free to open an issue or submit a pull request.


Acknowledgments

  • Piston API: For enabling code execution.
  • Monaco Editor: For providing a rich code editing experience.

Let me know if you want further personalization! 🚀

About

This web-based code editor empowers users to write, run, and view output for code in multiple programming languages. It is built with React and Chakra UI, and utilizes a remote API for code execution.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published