NoteSync is a real-time collaborative notes application that allows multiple users to create, edit, and view shared notes in real-time. It is built using Node.js, Express.js, WebSockets, MongoDB, and React.
- User Management: Register and log in with JWT-based authentication.
- Notes Functionality: Create, update, delete, and search notes.
- Real-Time Collaboration: Edit notes collaboratively with instant updates using WebSockets.
- Third-Party API Integration: Fetch and attach quotes to notes during creation.
- Containerization: Dockerized for easy deployment.
- Search and Filter: Search notes by title, content, or tags.
The application is divided into two main components:
-
Backend:
- Built with Node.js, Express.js, and MongoDB.
- Handles user authentication, note management, and WebSocket communication.
- Third-party API integration for fetching quotes.
-
Frontend:
- Built with React and Vite.
- Provides a user-friendly interface for managing notes and collaborating in real-time.
- Docker and Docker Compose installed.
- Node.js and npm installed (for local development).
-
Clone the repository:
git clone https://github.com/Yashagrahari07/NoteSync.git cd NoteSync -
Set up environment variables:
- Create
.envfiles in bothBackendandFrontenddirectories. - Backend
.envexample:DB_CONNECT=mongodb://localhost:27017/notesync JWT_SECRET=your_jwt_secret FRONTEND_URL=http://localhost:5173 - Frontend
.envexample:VITE_API_BASE_URL=http://localhost:3000
- Create
-
Start the application using Docker Compose:
docker-compose up --build
-
Access the application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
To try the application, you can use the following sample users:
-
User 1:
- Email:
raj@gmail.com - Password:
raj1234
- Email:
-
User 2:
- Email:
yash@gmail.com - Password:
yash1234
- Email:
- POST
/users/register: Register a new user. - POST
/users/login: Log in and receive a JWT token. - GET
/users/profile: Get the logged-in user's profile (requires JWT). - GET
/users/logout: Log out the user.
- POST
/notes: Create a new note. - GET
/notes: Get all notes for the logged-in user. - GET
/notes/:id: Get a specific note by ID. - PUT
/notes/:id: Update a note by ID. - DELETE
/notes/:id: Delete a note by ID. - POST
/notes/:id/collaborators: Add a collaborator to a note. - PATCH
/notes/:id/pin: Toggle pin status for a note.
To deploy the application:
-
Build Docker images:
docker-compose build
-
Push the images to a container registry (e.g., Docker Hub).
-
Deploy the containers to a hosting service like Vercel, Render, AWS.
- Backend: Node.js, Express.js, MongoDB, Socket.IO
- Frontend: React, Redux, TailwindCSS
- Containerization: Docker, Docker Compose
- Third-Party API: ZenQuotes API
This project is licensed under the MIT License. See the LICENSE file for details.