StudySphere is a real-time communication platform designed specifically for collaborative learning and study groups. It enables students and educators to connect instantly, share knowledge, and engage in productive study sessions. Built with the MERN stack and WebSocket technology, StudySphere provides a seamless, responsive environment for academic collaboration.
- Real-Time Messaging: Instant communication with other users
- User Authentication: Secure login and registration system
- User Status Tracking: See when users are online
- Responsive Design: Works on desktop and mobile devices
- Intuitive Interface: Clean and easy-to-use UI
- Emoji Support: Express yourself with emojis in messages
- Message Notifications: Get alerted when you receive new messages
- React: UI building and component management
- Tailwind CSS & DaisyUI: Styling and UI components
- Socket.io-client: Real-time client-server communication
- React Router: Navigation and routing
- Zustand: State management
- React Hot Toast: Notification system
- Node.js & Express: Server and API implementation
- MongoDB & Mongoose: Database and data modeling
- Socket.io: WebSocket implementation for real-time features
- JWT: Authentication and authorization
- bcrypt.js: Password hashing
- Cookie-parser: HTTP request cookie parsing
- Node.js (v14+)
- MongoDB (local or Atlas)
- Git
-
Clone the repository
git clone https://github.com/your-username/StudySphere.git cd StudySphere
-
Setup environment variables
Create a
.env
file in the backend directory:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret
Create a
.env
file in the frontend directory:VITE_API_BASE_URL=http://localhost:5000
-
Install backend dependencies
cd backend npm install
-
Install frontend dependencies
cd ../frontend npm install
-
Run the application
Start the backend server:
cd ../backend npm run dev
Start the frontend development server:
cd ../frontend npm run dev
-
Access the application
Open your browser and navigate to:
http://localhost:3000
POST /api/auth/signup
- Register a new userPOST /api/auth/login
- Login a userPOST /api/auth/logout
- Logout a user
GET /api/message/:id
- Get messages with a specific userPOST /api/message/send/:id
- Send a message to a specific user
GET /api/users
- Get all users for the sidebar
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
- Follow the existing code style
- Write descriptive commit messages
- Comment your code where necessary
- Test your changes before submitting a PR
This project is licensed under the MIT License - see the LICENSE file for details.
- All the contributors who have helped shape StudySphere
- The amazing open-source community
- Various tutorials and resources that helped in building this application