Academic management and student productivity for schools and colleges — a dependency-free PHP 8 application (no Composer packages required).
| Dashboard | Focus timer | Assignments |
|---|---|---|
![]() |
![]() |
![]() |
| Dashboard | Attendance | Resources |
|---|---|---|
![]() |
![]() |
![]() |
| Users | Audit log |
|---|---|
![]() |
![]() |
| Toast notifications | Confirmation dialog |
|---|---|
![]() |
![]() |
| Dashboard | Navigation drawer |
|---|---|
![]() |
![]() |
| Request a link | Choose a new password |
|---|---|
![]() |
![]() |
- PHP 8.0+ with PDO MySQL
- MySQL / MariaDB 10.4+
- Apache with
mod_rewrite(or any web server that can route toindex.php) - Composer — only for PHPMailer, used to send password reset emails
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 dataOpen http://localhost/studymate/ — or the full deployment guide for setting up a domain, a hosted server, or Docker.
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.
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=StudyMatesmtp— the normal choice for a hosted servermail— hand the message to the local MTA via PHP'smail()log— write the message tostorage/logs/mail.logand 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.
After running database/setup.php:
| Role | Password | |
|---|---|---|
| Admin | admin@studymate.local |
DemoPass123! |
| Teacher | teacher@studymate.local |
DemoPass123! |
| Student | student@studymate.local |
DemoPass123! |
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.
- 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.
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/.
- 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















