Skip to content

panakantinandu/studymate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


🎓 StudyMate – Peer Learning & Scheduling Platform

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.


🌐 Live Workflow Overview

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

🚀 Features

👩‍🎓 Student / User Features

  • 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

🧑‍🏫 Tutor Features

  • View and accept/reject session requests
  • Manage upcoming sessions
  • View feedback/rating history
  • Join meetings via direct link

🧑‍💼 Admin Features

  • 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)

📁 Project Structure

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

🗄️ Database Overview

Main Tables

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 Table (Separate)

Admin login stored securely in admin table (not mixed with users table).


🔒 Security Features

  • 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

⚡ jQuery + AJAX Integration

Used for real-time interactivity:

1️⃣ Live Email Validation

  • Prevents duplicate registrations before form submit
  • AJAX request → auth/check_email.php

2️⃣ Live Password Match

  • Immediate feedback for confirm password
  • Ensures valid input before POST

These improve UX and ensure real-time validation.


🔄 Auto Session Completion

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();

📬 Email / OTP Support (PHPMailer)

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';

🛠️ Installation

1️⃣ Clone the Repository

git clone https://github.com/<your-username>/StudyMate.git
cd StudyMate

2️⃣ Import Database

  1. Open phpMyAdmin
  2. Create a DB: studymate_db
  3. Import: studymate_db.sql

3️⃣ Configure DB Connection

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)

4️⃣ Run on XAMPP/WAMP

Place folder in:

htdocs/

Run:

http://localhost/StudyMate/

🧠 Future Enhancements

  • Google Calendar sync
  • SMS reminders (cron jobs)
  • Real-time chat with WebSockets
  • AI-based user matching
  • Group study rooms

📜 License

MIT License.


👨‍💻 Author

Nandu Panakanti Peer Learning — Made Simple.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages