This project is an online coding web application that allows mentors to share code blocks with students in real-time. It includes a lobby page where users can choose from various code blocks and a code block page where mentors can observe code changes made by students in real-time.
The project is deployed on Render. You can access the deployed static site here.
- Lobby page with a list of code blocks to choose from.
- Real-time code editing and observation for mentors and students.
- Syntax highlighting for JavaScript code using Highlight.js.
- Firebase Realtime Database integration for real-time data synchronization.
- Node.js
- Express.js
- Socket.io
- React
- Vite
- Material-UI
- Firebase Realtime Database
- Navigate to the
backend
directory:cd backend
. - Install dependencies:
npm install
. - Create a
.env
file in thebackend
directory and define the following environment variable:PORT=5000
. Replace5000
with the desired port number. - Start the backend server:
npm start
.
- Navigate to the
frontend/my-app
directory:cd frontend/my-app
. - Create a
.env
file in thefrontend/my-app
directory with the following environment variables for Firebase configuration:
VITE_REACT_APP_API_KEY=
your_firebase_api_keyVITE_REACT_APP_AUTH_DOMAIN=
your_firebase_auth_domainVITE_REACT_APP_PROJECT_ID=
your_firebase_project_idVITE_REACT_APP_STORAGE_BUCKET=
your_firebase_storage_bucketVITE_REACT_APP_MESSAGING_SENDER_ID=
your_firebase_messaging_sender_idVITE_REACT_APP_APP_ID=
your_firebase_app_idVITE_REACT_APP_MEASUREMENT_ID=
your_firebase_measurement_idVITE_REACT_APP_BASE_URL=
your_backend_url
- Note: Replace with your Firebase project configuration details. Also, ensure that
VITE_REACT_APP_BASE_URL
matches the URL where the backend server is running.
- Install dependencies:
npm install
. - Build the frontend application:
npm run build
. - Start the frontend development server:
npm run dev
.
- Visit the lobby page and choose a code block.
- Enter the code block page to observe or edit the code in real-time.
- Mentors have read-only access, while students can make code changes.
- Real-time updates are synchronized using Socket.io.
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.