Skip to content
webhossenPublic

About

StudyMate is a modern academic management and student productivity platform designed for schools and colleges. Built with PHP 8+, MySQL/MariaDB, JavaScript, and Bootstrap, it provides a centralized environment where administrators, teachers, and students can manage academic activities through secure, role-based dashboards. Students can organize ta

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

StudyMate

Academic management and student productivity for schools and colleges — a dependency-free PHP 8 application (no Composer packages required).

PHP MySQL License

StudyMate landing page

Screenshots

Student workspace

Dashboard Focus timer Assignments
Student dashboard Focus timer Student assignments

Teacher workspace

Dashboard Attendance Resources
Teacher dashboard Teacher attendance Teacher resources

Administration

Users Audit log
Admin users Admin audit log

Notifications & confirmation

Toast notifications Confirmation dialog
Toast notifications Logout confirmation

Mobile

Dashboard Navigation drawer
Mobile dashboard Mobile navigation

Password reset

Request a link Choose a new password
Forgot password Reset password

StudyMate sign in

Requirements

  • PHP 8.0+ with PDO MySQL
  • MySQL / MariaDB 10.4+
  • Apache with mod_rewrite (or any web server that can route to index.php)
  • Composer — only for PHPMailer, used to send password reset emails

Getting started

git clone https://github.com/webhossen/studymate.git
cd studymate
composer install          # PHPMailer, for password reset emails
cp .env.example .env     # then edit the database details
php database/migrate.php # create the tables
php database/setup.php    # optional demo data

Open http://localhost/studymate/ — or the full deployment guide for setting up a domain, a hosted server, or Docker.

The two ways to host it

The application detects the layout from APP_URL, so no configuration change is needed beyond setting it correctly:

Setup APP_URL Assets are served from
Document root = project folder, app in a sub-folder https://example.com/studymate /studymate/public/assets/…
Document root = public/ (recommended) https://studymate.example.com /assets/…

Pointing the document root at public/ keeps .env, app/ and storage/ outside the web, which is the safer arrangement for anything internet-facing.

Email

Password reset links are sent with PHPMailer. Configure the transport in .env:

# smtp | mail | log
MAIL_TRANSPORT=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your.address@gmail.com
MAIL_PASSWORD=your-app-password
# tls | ssl | none
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=no-reply@yourdomain.com
MAIL_FROM_NAME=StudyMate
  • smtp — the normal choice for a hosted server
  • mail — hand the message to the local MTA via PHP's mail()
  • log — write the message to storage/logs/mail.log and send nothing (handy while developing)

For Gmail, use an App Password rather than your account password.

While APP_DEBUG=true the reset link is also shown on screen, so the flow can be completed even before a mail server is configured.

Demo accounts

After running database/setup.php:

Role Email Password
Admin admin@studymate.local DemoPass123!
Teacher teacher@studymate.local DemoPass123!
Student student@studymate.local DemoPass123!

Layout

app/
  Core/           Front controller, router, view, database, auth, audit, mailer, upload
  Controllers/    Admin, Teacher, Student and Api controllers
  Helpers/        Global helper functions (e, url, asset, base_path, ...)
  Middleware/     Auth, guest and web (CSRF) middleware
config/           Application and database configuration
database/         Migrations and the demo seeder
public/           Document root, static assets
resources/views/   Templates, layouts and partials
routes/           web.php and api.php route tables
storage/          Uploads and logs (not committed)
tools/            Composer binary (not committed)
docs/screenshots/ README screenshots

See DEPLOYMENT.md for the complete guide: local setup, database creation, shared hosting, VPS/Nginx, moving a database, a production checklist and troubleshooting.

Features

  • Students — tasks, study planner, notes, focus timer with pomodoro sessions, study sessions, assignments and submissions, attendance, exams, grades, calendar and profile.
  • Teachers — class rosters, attendance marking, assignments, submissions and grading, exams, live study-session monitoring, check-ins, resources and announcements.
  • Admins — users and roles, departments, academic years, classes, subjects, enrolments, class-subject assignment, announcements, an audit log and settings.

Design system

The UI is built on a small design system in public/assets/css/app.css:

  • token layer (colour, surface, type, shape, motion) mapped onto Bootstrap's CSS variables
  • dark and light themes, remembered in localStorage
  • app shell with a grouped sidebar, off-canvas mobile drawer and a glass top bar
  • toast notifications and confirmation dialogs for every action
  • an animated logout button (public/assets/css/logout-button.css)

test_desktop.php is a self-contained regression check for the design system and can be run from the CLI.

Screenshots live in docs/screenshots/.

Security

  • CSRF tokens on every state-changing form
  • output escaping through the e() helper
  • role-based route guards and per-file authorisation for downloads
  • password reset tokens are single-use, expire after an hour, and only a SHA-256 hash of the token is stored
  • uploads validated by extension and sniffed MIME type, stored outside the document root and streamed through an authorised endpoint
  • all administrative and teaching writes recorded in the audit log

About

StudyMate is a modern academic management and student productivity platform designed for schools and colleges. Built with PHP 8+, MySQL/MariaDB, JavaScript, and Bootstrap, it provides a centralized environment where administrators, teachers, and students can manage academic activities through secure, role-based dashboards. Students can organize ta

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages