- Overview
- Features
- Tech Stack
- Live Demo
- Installation
- Environment Variables
- Usage
- Folder Structure
- API Endpoints
- Socket.io Events
- Frontend Components
- Contributing
- License
- Acknowledgements
ZeroTrace is a fully anonymous real-time chat application. Users can create public or private rooms, share invite links, and chat without revealing personal identity. Messages disappear when users leave, ensuring maximum privacy.
- Anonymous chat with optional nicknames
- Public & private rooms with invite codes
- Real-time messaging with Socket.io
- Shareable invite links for private rooms
- Dynamic UI notifications using React Toastify
- Responsive & clean design using Tailwind CSS
- Automatic scroll to the newest message
- Room visibility icons using Lucide React
- Easy room creation and joining
- Local/session storage for rooms and messages
- Frontend: React.js, Vite, Tailwind CSS, Lucide Icons, React Toastify, Zustand
- Backend: Node.js, Express.js, MongoDB, Mongoose
- Real-Time Communication: Socket.io
- Utilities: UUID, Axios
git clone https://github.com/your-username/ZeroTrace.git
cd ZeroTracecd server
npm install
npm run startcd client
npm install
npm run devSee server/.env.example:
MONGO_URI=your_mongodb_connection_string
PORT=5000
See client/.env.example:
VITE_API_URL=http://localhost:5000/api
VITE_SOCKET_URL=http://localhost:5000
- Open the Application (
npm run devinclient) - Enter a nickname (optional) or join anonymously.
- View Available Rooms.
- Create new public or private rooms.
- Share invite links for private rooms.
- Start chatting in real-time.
- Note: Messages disappear when leaving the room.
ZeroTrace/
├── client/
│ ├── .env
│ ├── .env.example
│ ├── index.html
│ ├── package.json
│ ├── vite.config.js
│ ├── public/
│ │ └── vite.svg
│ └── src/
│ ├── api/
│ │ ├── roomApi.js
│ │ └── sessionApi.js
│ ├── assets/
│ │ └── react.svg
│ ├── components/
│ │ ├── ChatWindow.jsx
│ │ ├── MessageInput.jsx
│ │ ├── RoomForm.jsx
│ │ ├── Rooms.jsx
│ │ └── SessionForm.jsx
│ ├── hooks/
│ │ └── useSocketHook.js
│ ├── pages/
│ │ ├── Home.jsx
│ │ ├── NotFound.jsx
│ │ └── Room.jsx
│ ├── stores/
│ │ ├── roomStore.js
│ │ └── sessionStore.js
│ ├── App.jsx
│ ├── index.css
│ └── main.jsx
├── server/
│ ├── .env
│ ├── .env.example
│ ├── package.json
│ └── src/
│ ├── index.js
│ ├── socket.js
│ ├── config/
│ │ └── db.js
│ ├── controllers/
│ │ ├── roomController.js
│ │ └── sessionController.js
│ ├── models/
│ │ ├── Message.js
│ │ ├── Room.js
│ │ └── Session.js
│ └── routes/
│ ├── rooms.js
│ └── sessions.js
├── README.md
Session Endpoints (server/src/routes/sessions.js)
POST /api/sessions— Create a new session (nickname optional)GET /api/sessions/:id— Get session info by sessionId
Room Endpoints (server/src/routes/rooms.js)
GET /api/rooms— List all roomsPOST /api/rooms— Create a new room (public/private)GET /api/rooms/:id— Get room info by roomId
Socket events are handled in server/src/socket.js:
join_room— Join a room (emitssystem_message)leave_room— Leave a room (emitssystem_message)send_message— Send a message (emitsreceive_message)receive_message— Receive a message in roomsystem_message— System notifications (join/leave)disconnect— Socket disconnect
App: Main router and toast notificationsHome: Welcome pageSessionForm: Create/join sessionRooms: List and join roomsRoomForm: Create new roomRoom: Chat room pageChatWindow: Message display and inputMessageInput: Send messagesNotFound: 404 page
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature- Commit changes:
git commit -m "Add feature description"- Push branch:
git push origin feature/your-feature- Open a Pull Request
This project is licensed under MIT. See LICENSE for details.
- React
- Socket.io
- MongoDB
- Tailwind CSS
- React Toastify
- Lucide React Icons
- Zustand
Made with ❤️ by theEquinoxDev