Skip to content

A comprehensive educational platform combining file sharing (notes/assignments), real-time messaging, anonymous study rooms, and collaborative learning features.

License

Notifications You must be signed in to change notification settings

VIPHACKER100/STUDYHUB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

StudyHub - Notes & Assignment Sharing Platform

A comprehensive educational platform combining file sharing (notes/assignments), real-time messaging, anonymous study rooms, and collaborative learning features.

πŸš€ Features

Core Platform

  • User Authentication - Role-based access (Admin, Teacher, Student)
  • Notes & Assignment Sharing - Upload and share educational content
  • Search & Discovery - Find relevant study materials
  • Ratings & Comments - Community feedback on uploads
  • Bookmarking - Save favorite resources

Messaging System

  • Direct Messages - Private one-on-one messaging with real-time delivery
  • Anonymous Chat Rooms - Subject-specific study groups with random anonymous identities
  • Real-time Features - Typing indicators, read receipts, online status
  • File Sharing - Share documents and images in conversations
  • Message Management - Edit, delete, and search messages

Admin Features

  • User Management - View, edit, and manage user accounts
  • Content Moderation - Monitor and moderate uploads and messages
  • Analytics Dashboard - Platform usage statistics
  • Announcements - Platform-wide and targeted announcements
  • Report System - Handle user reports and content takedowns

πŸ› οΈ Tech Stack

Backend

  • Node.js + Express - Server framework
  • PostgreSQL - Database
  • Socket.io - Real-time WebSocket communication
  • JWT - Authentication
  • Bcrypt - Password hashing

Frontend

  • React 18 - UI framework
  • Vite - Build tool
  • TailwindCSS - Styling
  • React Router - Routing
  • Zustand - State management
  • React Query - Data fetching
  • Socket.io Client - Real-time messaging

πŸ“‹ Prerequisites

  • Node.js >= 18.x
  • Database: PostgreSQL >= 14.x OR MySQL >= 8.0
  • npm or yarn

Note: The application supports both PostgreSQL and MySQL. See MYSQL_SETUP.md for MySQL migration guide.

πŸƒ Quick Start

See SETUP.md for detailed installation instructions.

# 1. Install dependencies
npm install

# 2. Set up environment variables
cp .env.example .env
# Edit .env with your database credentials

# 3. Create database
createdb notes_platform

# 4. Run database setup
cd server
npm run db:setup

# 5. Start development servers
cd ..
npm run dev

The app will be available at:

πŸ“š Documentation

πŸ”‘ Default Admin Access

After running the database setup, you can login with:

  • Email: admin@notesplatform.com
  • Password: admin123

⚠️ IMPORTANT: Change this password immediately in production!

πŸ“ Project Structure

notes-assignment-platform/
β”œβ”€β”€ client/                 # Frontend React app
β”œβ”€β”€ server/                 # Backend Node.js app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/        # Configuration files
β”‚   β”‚   β”œβ”€β”€ controllers/   # Route controllers
β”‚   β”‚   β”œβ”€β”€ models/        # Database models
β”‚   β”‚   β”œβ”€β”€ middleware/    # Express middleware
β”‚   β”‚   β”œβ”€β”€ routes/        # API routes
β”‚   β”‚   β”œβ”€β”€ socket/        # Socket.io handlers
β”‚   β”‚   └── database/      # Database schema & setup
β”‚   └── package.json
β”œβ”€β”€ package.json           # Root workspace config
└── README.md

🌟 Key Features Implementation Status

βœ… Completed (Phase 1, 2, 3)

  • Project setup with monorepo structure
  • PostgreSQL database with comprehensive schema
  • User authentication (register, login, JWT)
  • Direct messaging API & UI
  • Anonymous chat rooms API & UI
  • Socket.io real-time messaging
  • File upload system (AWS S3 / Local)
  • Search functionality with filters
  • Ratings and comments system
  • Admin panel UI & Content Management
  • Email verification & Password Reset
  • User profiles and bookmarks
  • File attachments in messages
  • Privacy & Security (Blocking, Rate Limiting)

🚧 Future Enhancements

  • Notifications system (UI integration)
  • Mobile optimization
  • Redis Caching

πŸ“± API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user
  • GET /api/auth/me - Get current user
  • PUT /api/auth/profile - Update profile
  • PUT /api/auth/password - Change password
  • GET /api/auth/search - Search users

Messages

  • GET /api/messages/conversations - Get all conversations
  • GET /api/messages/conversation/:userId - Get/create conversation
  • GET /api/messages/:conversationId - Get messages
  • POST /api/messages/send - Send message
  • PUT /api/messages/:messageId - Edit message
  • DELETE /api/messages/:messageId - Delete message

Anonymous Rooms

  • GET /api/rooms - Get public rooms
  • POST /api/rooms - Create room
  • GET /api/rooms/:roomId - Get room details
  • POST /api/rooms/:roomId/join - Join room
  • POST /api/rooms/:roomId/leave - Leave room
  • GET /api/rooms/:roomId/messages - Get room messages

πŸ”’ Security Features

  • JWT-based authentication
  • Password hashing with bcrypt
  • CORS protection
  • Helmet security headers
  • Rate limiting
  • Input validation
  • SQL injection prevention
  • XSS protection

🀝 Contributing

This is an educational project. Contributions are welcome!

πŸ“„ License

MIT License - feel free to use this project for learning and development.

πŸ™ Acknowledgments

Built with modern web technologies for educational collaboration and learning.

About

A comprehensive educational platform combining file sharing (notes/assignments), real-time messaging, anonymous study rooms, and collaborative learning features.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors