StudyMate is a complete peer learning & study session scheduling platform built with PHP (PDO), MySQL, Bootstrap, jQuery, and AJAX, enabling students and tutors to collaborate through structured sessions, feedback, and real-time interactions.
The application includes role-based access, session management, ratings, availability scheduling, admin user control, and secure login/registration with live validations.
User Registers → Email Validation (AJAX)
↓
Login → Dashboard (Visits tracked via SESSION + COOKIE)
↓
Select Subjects → Set Availability
↓
Send/Receive Session Requests
↓
Accepted → Auto Meeting Link (Jitsi)
↓
Session Auto-Completes After End Time
↓
Both Users Give Ratings & Feedback
↓
Admin Manages Users, Sessions & Reports
-
Register with live email validation (jQuery + AJAX)
-
Password + Confirm Password live match check
-
Login/logout with SESSION & COOKIE visit count tracking
-
Manage subjects and weekly availability
-
Send and receive session requests
-
Auto-generated Jitsi meeting link on acceptance
-
Automatic session completion after end time
-
Notifications system
-
Ratings & session feedback
-
Dashboard analytics:
- Total sessions
- Completed sessions
- Average rating
- Unread notifications
- View and accept/reject session requests
- Manage upcoming sessions
- View feedback/rating history
- Join meetings via direct link
- Secure admin login
- Manage all users (Edit + Delete)
- Real-time user update modal (username, email, role)
- Delete user with full relational data cleanup
- View sessions, rating logs, and system activity
- Access-controlled visibility (admin vs user)
StudyMate/
├── assets/
│ ├── css/
│ ├── images/
│ └── js/
│ └── validation.js # jQuery live validations
├── auth/
│ ├── login_student.php
│ ├── login_admin.php
│ ├── register.php
│ └── logout.php
├── config/
│ └── pdo.php # DB connection (Git ignored)
├── functions/
│ ├── email_helper.php # PHPMailer email/OTP sender
│ ├── notification.php
│ ├── utils.php
│ └── validation.php
├── includes/
│ ├── auth.php
│ ├── navbar_admin.php
│ ├── session_check_admin.php
│ ├── session_check_student.php
│ └── session_check_teacher.php
├── src/
│ └── PHPMailer/ # Local mail library
├── uploads/
│ └── profile_images/
├── views/
│ ├── admin/
│ ├── student/
│ └── teacher/
├── index.php
└── README.md
| Table | Description |
|---|---|
users |
Student/tutor authentication, roles, login stats |
subjects |
List of available subjects |
user_subjects |
Mapping table for user–subject selections |
availability |
Weekly availability times |
session_requests |
Session requests + statuses |
notifications |
System notifications |
session_feedback |
Ratings and comments after sessions |
Admin login stored securely in admin table (not mixed with users table).
- Password hashing (
password_hash) - Prepared statements (PDO)
- Input sanitization
- AJAX validation (email exists, etc.)
- OTP-based password reset (PHPMailer)
- SESSION-based login protection
- Role-based page access
Used for real-time interactivity:
- Prevents duplicate registrations before form submit
- AJAX request →
auth/check_email.php
- Immediate feedback for confirm password
- Ensures valid input before POST
These improve UX and ensure real-time validation.
Sessions are automatically marked "completed" when end time has passed:
UPDATE session_requests
SET status = 'completed'
WHERE status = 'accepted'
AND STR_TO_DATE(
CONCAT(session_date, ' ', SUBSTRING_INDEX(time_slot, '-', -1)),
'%Y-%m-%d %h:%i %p'
) < NOW();Located at functions/email_helper.php
Handles:
- OTP for password reset
- Important notifications
SMTP configuration example:
$mail->Host = 'smtp.gmail.com';
$mail->Username = 'your_email@gmail.com';
$mail->Password = 'your_app_password';
$mail->Port = 587;
$mail->SMTPSecure = 'tls';git clone https://github.com/<your-username>/StudyMate.git
cd StudyMate- Open phpMyAdmin
- Create a DB:
studymate_db - Import:
studymate_db.sql
config/pdo.php:
$dsn = "mysql:host=localhost;dbname=studymate_db;charset=utf8mb4";
$username = "root";
$password = "";
$pdo = new PDO($dsn, $username, $password, [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
]);(pdo.php must stay out of Git — included in .gitignore)
Place folder in:
htdocs/
Run:
http://localhost/StudyMate/
- Google Calendar sync
- SMS reminders (cron jobs)
- Real-time chat with WebSockets
- AI-based user matching
- Group study rooms
MIT License.
Nandu Panakanti Peer Learning — Made Simple.