StudySphere
StudySphere: A web app designed to enhance collaborative learning by enabling real-time communication and document sharing for study groups. Built using the MERN stack, StudySphere integrates WebSocket technology for seamless, live interactions and offers intuitive user management and session handling features
Install / Use
/learn @dhruvil-sheth30/StudySphereREADME
StudySphere
📚 About
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.
✨ Features
- 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
🛠️ Tech Stack
Frontend
- 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
Backend
- 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
🚀 Getting Started
Prerequisites
- Node.js (v14+)
- MongoDB (local or Atlas)
- Git
Installation
-
Clone the repository
git clone https://github.com/your-username/StudySphere.git cd StudySphere -
Setup environment variables
Create a
.envfile in the backend directory:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secretCreate a
.envfile 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 devStart the frontend development server:
cd ../frontend npm run dev -
Access the application
Open your browser and navigate to:
http://localhost:3000
📝 API Documentation
Authentication
POST /api/auth/signup- Register a new userPOST /api/auth/login- Login a userPOST /api/auth/logout- Logout a user
Messages
GET /api/message/:id- Get messages with a specific userPOST /api/message/send/:id- Send a message to a specific user
Users
GET /api/users- Get all users for the sidebar
🤝 Contributing
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
Code Style Guidelines
- Follow the existing code style
- Write descriptive commit messages
- Comment your code where necessary
- Test your changes before submitting a PR
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- All the contributors who have helped shape StudySphere
- The amazing open-source community
- Various tutorials and resources that helped in building this application
