Studi.io is a modern, collaborative study platform that brings students together in virtual study rooms. Built with real-time communication, resource sharing, and interactive whiteboards, Studi.io makes group studying productive and engaging.
π Live Demo: https://studiio.netlify.app
- πͺ Create & Join Rooms β Easily create or join public/private study rooms
- π¬ Real-time Chat β Instant messaging with Socket.IO for seamless communication
- π Privacy Control β Public or private rooms with customizable access
- πΌοΈ Room Customization β Set custom names, descriptions, and avatars
- βοΈ Cloud Image Uploads β Profile and room images hosted on Cloudinary
- βοΈ Room Management β Full CRUD operations for room owners and admins
- π₯ Member Management β Admin controls and member permissions
- π Real-time Notifications β Instant feedback with
react-hot-toast - π± Responsive Design β Mobile-first UI with Tailwind CSS
- π Secure Authentication β JWT-based auth with access/refresh tokens
- π§ Email Service β OTP verification and notifications via SendGrid
- π Collaborative Whiteboard β Real-time drawing and note-taking
- ποΈ ResourceHub β Centralized document and link management
- π₯ Video Chat β Built-in video conferencing
- π Study Analytics β Track study time and productivity
- π Push Notifications β Browser push notifications for updates
| Technology | Purpose |
|---|---|
| React 18 | UI framework with hooks and modern features |
| TypeScript | Type-safe JavaScript |
| Tailwind CSS | Utility-first CSS framework |
| Redux Toolkit | State management with Redux Persist |
| React Router | Client-side routing |
| Socket.IO Client | Real-time WebSocket communication |
| Axios | HTTP client with interceptors |
| Lucide React | Beautiful icon library |
| React Hot Toast | Toast notifications |
| Vite | Lightning-fast build tool |
| Technology | Purpose |
|---|---|
| Node.js | JavaScript runtime |
| Express.js | Web framework |
| MongoDB | NoSQL database |
| Mongoose | MongoDB ODM with schemas |
| Socket.IO | Real-time bidirectional communication |
| JWT | JSON Web Tokens for authentication |
| bcrypt | Password hashing |
| Cloudinary | Cloud-based image storage |
| SendGrid | Email delivery service |
| Multer | File upload handling |
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Client ββββββββββΊβ Server ββββββββββΊβ MongoDB β
β (React) β HTTP β (Express) β CRUD β (Database) β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β² β²
β β
β WebSocket β
βββββββββββββββββββββββββ
Real-time Updates
- Authentication Layer: JWT-based with refresh token rotation
- Real-time Layer: Socket.IO for instant messaging and presence
- Storage Layer: MongoDB for data, Cloudinary for media
- Email Layer: SendGrid for OTP verification and notifications
- Node.js v18+ and npm/yarn
- MongoDB Atlas account or local MongoDB
- Cloudinary account for image storage
- SendGrid account for email service
git clone https://github.com/yamiSukehiro2907/studi.io.git
cd studi.iocd server
npm installCreate .env file in server/ directory:
PORT=8000
CONNECTION_STRING=your_mongodb_connection_string
ACCESS_TOKEN_SECRET=your_access_token_secret
REFRESH_TOKEN_SECRET=your_refresh_token_secret
ACCESS_TOKEN_EXPIRATION=3600000
REFRESH_TOKEN_EXPIRATION=604800000
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
EMAIL_USER=your_gmail@gmail.com
SENDGRID_API_KEY=your_sendgrid_api_key
NODE_ENV=production
ALLOWED_ORIGINS=http://localhost:5173,https://studiio.netlify.appcd ../client
npm installCreate .env file in client/ directory:
VITE_API_BASE_URL=http://localhost:8000Backend:
cd server
npm run devServer runs on http://localhost:8000
Frontend:
cd client
npm run devClient runs on http://localhost:5173
Backend:
cd server
npm startFrontend:
cd client
npm run build
npm run previewstudi.io/
βββ client/ # Frontend React application
β βββ src/
β β βββ api/ # API service functions
β β βββ assets/ # Images and static files
β β βββ components/ # Reusable React components
β β β βββ Main/ # Main content components
β β β βββ Room/ # Room-related components
β β β βββ Settings/ # Settings modal components
β β β βββ SideBar/ # Sidebar components
β β β βββ chat/ # Chat components
β β β βββ common/ # Shared components
β β βββ config/ # Configuration files
β β β βββ schema/ # TypeScript interfaces
β β β βββ axiosConfig.ts
β β β βββ socket.ts
β β βββ hooks/ # Custom React hooks
β β βββ pages/ # Page components
β β βββ redux/ # Redux store and slices
β β β βββ slices/
β β β βββ store.ts
β β βββ App.tsx # Main App component
β β βββ main.tsx # Entry point
β βββ .env # Environment variables
β βββ package.json
β
βββ server/ # Backend Node.js application
β βββ config/ # Configuration files
β β βββ cloudinary.config.js
β β βββ mail.config.js
β β βββ mongoDB.config.js
β β βββ multer.js
β βββ constants/ # Constants and utilities
β β βββ otp.generate.js
β β βββ token.js
β β βββ username.create.js
β βββ controllers/ # Route controllers
β β βββ auth.controller.js
β β βββ message.controller.js
β β βββ otp.controller.js
β β βββ studyroom.controller.js
β β βββ user.controller.js
β βββ handler/ # Socket.IO handlers
β β βββ socketHandler.js
β βββ middleware/ # Express middleware
β β βββ socketAuth.js
β β βββ validation.js
β βββ models/ # Mongoose models
β β βββ message.model.js
β β βββ otp.model.js
β β βββ resource.model.js
β β βββ section.model.js
β β βββ studyRoom.model.js
β β βββ user.model.js
β βββ routers/ # Express routes
β β βββ auth.route.js
β β βββ message.route.js
β β βββ otp.route.js
β β βββ room.route.js
β β βββ user.route.js
β βββ .env # Environment variables
β βββ index.js # Server entry point
β βββ package.json
β
βββ README.md # This file
sequenceDiagram
participant User
participant Client
participant Server
participant Database
User->>Client: Sign Up
Client->>Server: POST /auth/register
Server->>Database: Create User
Server->>User: Send OTP Email
User->>Client: Enter OTP
Client->>Server: POST /otp/verify-otp
Server->>Database: Verify & Update User
Server->>Client: Success Response
User->>Client: Login
Client->>Server: POST /auth/login
Server->>Database: Verify Credentials
Server->>Client: Set Access & Refresh Tokens
Client->>Client: Store User in Redux
| Event | Payload | Description |
|---|---|---|
join-room |
{ roomId } |
Join a study room |
sendMessage |
{ roomId, content } |
Send a message |
leave-room |
{ roomId } |
Leave a room |
| Event | Payload | Description |
|---|---|---|
newMessage |
Message |
New message received |
user-joined |
{ userId, userName } |
User joined room |
user-left |
{ userId, userName } |
User left room |
messageError |
{ message } |
Error occurred |
- Password Hashing: bcrypt with 10 salt rounds
- JWT Tokens: Separate access (1h) and refresh (7d) tokens
- HTTP-Only Cookies: Tokens stored securely
- CORS Protection: Configured for specific origins
- Input Validation: Server-side validation for all inputs
- Rate Limiting: Protection against brute force attacks
- XSS Protection: Sanitized user inputs
- Email Verification: Required for account activation
- Socket Authentication: JWT verification for WebSocket connections
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a 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 meaningful commit messages
- Update documentation for new features
- Add tests for new functionality
- Ensure all tests pass before submitting PR
Found a bug or have a feature idea? Please open an issue on GitHub Issues.
When reporting bugs, please include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- Browser/OS information
Register a new user
{
"name": "John Doe",
"email": "john@example.com",
"password": "securePassword123"
}Login with email/username
{
"identifier": "john@example.com",
"password": "securePassword123"
}Logout current user (clears tokens)
Refresh access token using refresh token
Create a new study room (requires auth)
{
"name": "Physics Study Group",
"description": "Preparing for finals"
}Get all rooms user is a member of (requires auth)
Search public rooms (requires auth)
Join a public room (requires auth)
Update room details (requires auth, owner/admin only)
Delete a room (requires auth, owner only)
Get paginated messages for a room (requires auth)
Get current user profile (requires auth)
Update user profile (requires auth, supports multipart/form-data)
Change password with current password (requires auth)
- Build the project:
npm run build - Deploy the
distfolder to Netlify - Set environment variable:
VITE_API_BASE_URL=your_backend_url
- Push code to GitHub
- Connect repository to hosting platform
- Set all environment variables
- Deploy with Node.js environment
- Code Splitting: React lazy loading for routes
- Image Optimization: Cloudinary automatic optimization
- Caching: Redux Persist for offline support
- Debouncing: Search queries debounced by 500ms
- Pagination: Messages paginated (50 per page)
- Connection Pooling: MongoDB connection optimization
- Gzip Compression: Reduced payload sizes
- GitHub Repository: https://github.com/yamiSukehiro2907/studi.io
- Live Demo: https://studiio.netlify.app
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Vimal Yadav
- GitHub: @yamiSukehiro2907
- Email: vimalyadavkr001@gmail.com
Need help? Reach out:
- Email: studi.io2907@gmail.com
- Create an issue: GitHub Issues
- Join our community: Discussions
Made with β€οΈ by the Studi.io Team
β Star us on GitHub β it motivates us a lot!
