Skip to content

Nabyendu48/codeSandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CodeSandbox

A real‑time collaborative coding environment inspired by Project Idx, enabling multiple users to edit and execute code together seamlessly.


🧩 Features

  • Real‑Time Collaboration: Join or create rooms for live coding sessions with multiple users.
  • Integrated File System: Manage project files and directories within a tree structure.
  • WebSocket‑Powered Rooms: Low-latency updates and synchronization across participants.
  • Containerized Code Execution: Isolated, secure execution of user code using Docker containers.

📦 Tech Stack

  • Backend: Node.js, Express.js, WebSockets
  • Frontend: React, Monaco Editor, React Query (Queries & Mutations)
  • Database: MongoDB
  • Containerization: Docker
  • CLI Tools: Exterm for terminal emulation

🚀 Getting Started

Prerequisites

Installation

  1. Install dependencies

    npm install
  2. Environment Variables

    Create a .env file in the root directory and set the following:

    MONGODB_URI=<your-mongo-connection-string>
    PORT=4000
  3. Start MongoDB

    # If running locally
    mongod --dbpath /path/to/your/db
  4. Start Docker daemon Ensure Docker is running before launching the app.

Running the App

  • Development mode

    npm run dev

    Runs both backend and frontend with hot-reloading.

  • Production mode

    npm start

The backend will be available at http://localhost:4000 and the frontend at http://localhost:3000 by default.


📂 Project Structure

├── client/           # React frontend
│   ├── src/
│   └── public/
├── server/           # Express backend
│   ├── controllers/
│   ├── models/
│   ├── routes/
│   └── index.js
├── docker/           # Docker configuration and scripts
├── .env.example
└── README.md

🤝 Contributing

Contributions, issues, and feature requests are welcome! Please check issues and follow these steps:

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

📄 License

MIT


🔗 Links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages