StudyMate is a student task and study planner web application built as a personal backend development project. The goal of this project is to improve my practical backend skills using PHP, MySQL, sessions, authentication, CRUD operations, and live deployment.
The application helps students organize their university work by managing subjects, study tasks, deadlines, priorities, and task progress.
The main local version of this project is completed.
- Initial project folder structure
- MySQL database setup
- Database connection using PDO
- Reusable header and footer
- Homepage
- User registration
- Secure password hashing
- User login
- User logout
- PHP session-based authentication
- Protected dashboard
- Subjects management
- Tasks management
- Edit and delete features
- Mark tasks as completed
- Task filtering by status and priority
- Dashboard statistics
- Upcoming deadlines table
- Basic Bootstrap layout
- Improved UI design
- Demo login account
- Extra dashboard improvements
- Optional future live deployment
- User registration
- User login
- User logout
- Session-based page protection
- Password hashing using PHP
password_hash() - Password verification using PHP
password_verify()
- Add subjects
- View subjects
- Edit subjects
- Delete subjects
- Add study tasks
- View tasks
- Edit tasks
- Delete tasks
- Mark tasks as completed
- Set task priority
- Set task deadline
- Connect tasks to subjects
- Create tasks without a subject if needed
- Filter tasks by status
- Pending
- Completed
- Filter tasks by priority
- Low
- Medium
- High
- Reset filters
- Total subjects count
- Total tasks count
- Pending tasks count
- Completed tasks count
- High priority pending tasks count
- Upcoming deadlines table
- PHP
- MySQL
- HTML
- CSS
- Bootstrap
- JavaScript
- PDO
- XAMPP for local development
- GitHub for version control and project sharing
studymate/
│
├── auth/
│ ├── register.php
│ ├── login.php
│ └── logout.php
│
├── config/
│ ├── app.php
│ └── database.php
│
├── database/
│ └── schema.sql
│
├── includes/
│ ├── auth_check.php
│ ├── header.php
│ └── footer.php
│
├── public/
│ ├── css/
│ │ └── style.css
│ └── js/
│ └── script.js
│
├── subjects/
│ ├── index.php
│ ├── add.php
│ ├── edit.php
│ └── delete.php
│
├── tasks/
│ ├── index.php
│ ├── add.php
│ ├── edit.php
│ ├── delete.php
│ └── complete.php
│
├── dashboard.php
├── index.php
├── .env.example
├── .gitignore
└── README.md
The project uses a MySQL database named:
studymate
The database contains the following main tables:
userssubjectstasks
The database structure is available in:
database/schema.sql
git clone https://github.com/cjdebug/studymate-php.gitPlace the project folder inside:
C:\xampp\htdocs
The path should look like:
C:\xampp\htdocs\studymate
Start:
Apache
MySQL
Open phpMyAdmin:
http://localhost/phpmyadmin
Create a database named:
studymate
Import or run the SQL file:
database/schema.sql
Open the project in your browser:
http://localhost/studymate
This project includes an .env.example file to show the required environment variable names.
Example:
DB_HOST=localhost
DB_PORT=3306
DB_NAME=studymate
DB_USER=root
DB_PASSWORD=
APP_BASE_URL=/studymateFor local XAMPP development, the project can use default local database values such as localhost, database name studymate, username root, and an empty password.
For deployment, these values can be changed according to the hosting platform.
The real .env file is not uploaded to GitHub because it can contain private database details.
This project includes basic backend security practices such as:
- Password hashing instead of storing plain text passwords
- Password verification using
password_verify() - PDO prepared statements to reduce SQL injection risk
- Session-based authentication
- Protected page access
- User-specific data access using
user_id htmlspecialchars()when displaying user-provided data
- Register a new account.
- Login using the registered account.
- Add subjects.
- Add tasks and connect them to subjects if needed.
- Set task priority and deadline.
- View tasks from the task management page.
- Filter tasks by status or priority.
- Mark tasks as completed.
- Use the dashboard to view progress and upcoming deadlines.
This project was built as a personal backend development project to improve my practical knowledge of PHP, MySQL, authentication, CRUD operations, and deployment.
During development, I used AI as a learning guide because I could not find a YouTube tutorial that matched the exact type of project and explanation style I needed. I did not use it only to copy and paste code. I used it to get step-by-step guidance, understand the purpose of each file, learn how the code works, and improve the structure of the project.
I reviewed the code, tested each feature locally, fixed issues, added comments where needed, and made sure I understood the main backend concepts used in the project, such as database connection, password hashing, sessions, prepared statements, CRUD operations, filtering, and user authentication.
This project is currently available as a local development project. A live demo is not available at the moment because the project uses PHP and MySQL and requires a hosting platform with database support.
A demo account is not included because the project is intended to be set up locally using the database schema.
Users can register a new account after importing the database structure.
Chanuka Jayasundara
Personal backend development project.
GitHub: https://github.com/cjdebug







