A full-stack modern web application built with the MERN stack (MongoDB, Express, React, Node.js) and Socket.io for real-time multiplayer text editing. The application is completely containerized with Docker and Nginx.
- Real-Time Collaboration: Multiple users can edit the same document simultaneously, seeing updates instantly via WebSockets (Socket.io).
- Authentication: Secure JWT-based registration and login system.
- Role-Based Access Control:
Admin&Editor: Can create and modify documents.Viewer: Read-only access to documents.
- Sleek UI: Modern dark-mode aesthetic built with vanilla CSS.
- Dockerized: Fully containerized environment with Nginx reverse proxy.
- API Interceptors: Axios handles attaching tokens to outbound requests seamlessly.
- Frontend: React (Vite), React Router, Axios, Socket.io-client.
- Backend: Node.js, Express, Mongoose, Socket.io, JSONWebToken, BcryptJS.
- Database: MongoDB.
- Infrastructure: Docker, Docker Compose, Nginx.
-
Clone the repository (if applicable):
git clone <repo-url> cd collab-editor
-
Start the application: Use Docker Compose to build and start all containers (Frontend, Backend, MongoDB, and Nginx reverse proxy).
docker-compose up --build -d
-
Access the application: Open your browser and navigate to:
http://localhost
- Sign up a new user (default role is
Editor). - Create a Document in the Dashboard.
- Share the document URL with another user (e.g., in a new Incognito window).
- If the other user signs up as a
Viewer, they will see live updates but cannot type. If they sign up as anEditororAdmin, both can type and see changes instantly.
To stop the application and remove the containers, run:
docker-compose downIf you want to clear the MongoDB data volume, you can use:
docker-compose down -v