codebox.tech is a modern, high-performance web-based IDE designed for developers to write, run, and share code seamlessly. It features a VSCode-like interface with resizable panels, multi-language support, and an integrated AI assistant powered by Google's Gemini.
- Dynamic Playground: Create and organize code snippets in folders.
- Multi-Language Support: Run C++, Java, Python, and JavaScript.
- AI Assistant: Context-aware AI to help with debugging and code generation.
- Resizable Interface: Fully customizable workspace layout using
react-resizable-panels. - Online Execution: Powered by the Piston API for secure and fast code execution.
- Node.js (v16.x or higher)
- npm or yarn
- Gemini API Key
git clone https://github.com/your-username/codebox.git
cd codebox# Install dependencies
npm install
# Start the development server
npm startcd backend
# Install dependencies
npm install
# Create a .env file
touch .envAdd the following to your backend/.env file:
PORT=5000
GEMINI_API_KEY=your_gemini_api_key_here
PISTON_API_URL=https://emkc.org/api/v2/pistonSelect your preferred language from the dropdown, write your code, and click Save and Run.
// Example: JavaScript
console.log("Hello from codebox.tech!");Ask the AI to generate code or explain logic.
User: "Generate a Fibonacci sequence in C++" AI: "Here is the Fibonacci code in C++ using an iterative approach..."
Endpoint: POST /api/piston/execute
Description: Executes code using the Piston API.
Request Body:
{
"language": "python",
"version": "3.10.0",
"source_code": "print('Hello')",
"stdin": ""
}Endpoint: POST /api/ai/chat
Description: Generates AI responses using Gemini.
Request Body:
{
"prompt": "Explain recursion",
"history": []
}To run the frontend test suite:
npm testThe project uses Jest and React Testing Library for component and logic verification.
Build the production-ready assets:
npm run buildThe /build folder can be hosted on platforms like Vercel, Netlify, or AWS S3.
Deploy the Node.js server to Heroku, Render, or a VPS. Ensure environment variables are configured in the production environment.
- Added horizontally resizable panels (Code Editor, Consoles, AI Chat).
- Integrated Gemini AI assistant.
- Fixed output console clipping and layout issues.
- Initial release with Piston API integration.
- Folder and Playground management.
- Fork the Project.
- 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.
Distributed under the MIT License. See LICENSE for more information.
- Author: Vipeen Kumar
- Email: vipeenk023@gmail.com
Created with ❤️ by the Vipeen Kumar.