"A realtime collaborative platform for developers to share and discover code snippets."
https://codeehive.netlify.app/
- About the Project
- 📸 Screenshots
- 🚀 Tech Stack
- 📂 Folder Structure
- 🛠️ Getting Started
- 🏃 Running the Project
- 🌐 Deployment
- 🤝 Contributing
- 📝 License
CodeHive is a real-time collaborative code editor, perfect for developers who need to quickly pair program, debug, or teach.
Powered by socket.io, it allows multiple users to edit the same code snippet simultaneously, seeing every change as it happens. Each session is assigned a unique and private URL using uuid, allowing you to instantly share the link and start collaborating with anyone, anywhere.
- Feature 1: [e.g., Unique Sharable Code, Create & Forget]
- Feature 2: [e.g., Create, Read, Update, and Delete code snippets]
- Feature 3: [e.g., Syntax highlighting for multiple languages]
- Feature 4: [e.g., Real-time collaboration features]
[CodeHive Realtime Code Sharing]

This project is a monorepo built with the following technologies:
| Category | Technology |
|---|---|
| Frontend | |
| Backend | |
| Deployment |
The project uses a monorepo structure to manage the frontend and backend code in the same repository.
CODEHIVE/ ├── codehive-backend/ # Express.js REST API ├── codehive-frontend/ # Vite + React Frontend ├── netlify/ │ └── functions/ │ └── api.js # Serverless function handler for Express ├── .gitignore ├── netlify.toml # Netlify deployment configuration └── README.md
To get a local copy up and running, follow these simple steps.
Make sure you have the following installed on your machine:
-
Clone the repository:
git clone [https://github.com/kmanish527/CodeHive.git](https://github.com/kmanish527/CodeHive.git) cd codehive -
Install backend dependencies:
npm install --prefix codehive-backend
-
Install frontend dependencies:
npm install --prefix codehive-frontend
You will need to create .env files for both the frontend and backend.
-
Backend Environment: Create a
.envfile in thecodehive-backenddirectory.# codehive-backend/.env PORT=5000 CORS_ORIGIN=http://localhost:5173 -
Frontend Environment: Create a
.env.localfile in thecodehive-frontenddirectory. The Vite proxy will handle API requests in development.# codehive-frontend/.env.local VITE_BACKEND_URL=http://localhost:5000
To run both the frontend and backend servers concurrently in development mode, use the following command from the root directory:
cd .\codehive-frontend\
npm run dev
The frontend development server will start on http://localhost:5173.
cd .\codehive-backend\
npm start
The backend server will start on http://localhost:5000 (or your specified PORT).
🌐 Deployment
This application is deployed on Netlify.
The frontend is served as a static site from the codehive-frontend/dist directory.
The Express.js backend is deployed as a Netlify Serverless Function.
The netlify.toml file contains all the necessary build and redirect configurations. Any request to /api is automatically routed to the serverless backend.
🤝 Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
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
📝 License
Distributed under the MIT License. See LICENSE file for more information.
