A folder-based notes management system built with PHP and MySQL for schools and institutions. Supports role-based access, secure multi-file uploads, and scalable structure.
- Features
- User Roles & Permissions
- Notes System
- Information Page
- Member List
- Database Schema
- Folder Structure
- Security & Validation
- Scalability
- Installation
- Technology Stack
- Future Enhancements
- License
- Secure login (Username + 4-digit PIN)
- Role-based access: Admin / User
- Upload multiple files at once
- Edit / delete own notes
- Folder-based structure: Class β Subject β Lesson β Files
- Search notes by Subject
- Admin can manage users, notes, and system structure
- Scalable for ~450 users per institution
Admin
- Create/manage Classes, Subjects, Lessons
- Approve, block, or remove users
- Upload/update Information Page (text + banner)
- View/delete all notes
- Manage system structure
User
- Secure login with Username + PIN
- Upload multiple files
- Edit/delete own notes
- View notes by Class β Subject β Lesson
- Download all notes from a lesson
- View Information Page
- View Members List
- Folder-based structure
- Unlimited file size
- Allowed formats:
PDF,JPG,PNG - Duplicate filenames auto-overwrite
- Metadata stored in MySQL:
| Column | Description |
|---|---|
| lesson_id | Lesson reference |
| uploaded_by | User ID of uploader |
| file_name | Original file name |
| file_path | Server path |
| uploaded_at | Timestamp |
- Users can edit/delete their own files
- Search functionality: Search by Subject β All Lessons
- Single page for all users
- Admin-only editing
- Content: Text + Banner Image
- Stored in MySQL
- Shows:
Username + Class - Admin can remove/block users
- Users can only view
CREATE TABLE classes (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL
);CREATE TABLE subjects (
id INT AUTO_INCREMENT PRIMARY KEY,
class_id INT NOT NULL,
name VARCHAR(255) NOT NULL,
FOREIGN KEY (class_id) REFERENCES classes(id)
);CREATE TABLE lessons (
id INT AUTO_INCREMENT PRIMARY KEY,
subject_id INT NOT NULL,
name VARCHAR(255) NOT NULL,
FOREIGN KEY (subject_id) REFERENCES subjects(id)
);CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(100) NOT NULL UNIQUE,
class_id INT NOT NULL,
pin_hash VARCHAR(255) NOT NULL,
role ENUM('admin','user') NOT NULL DEFAULT 'user',
status ENUM('pending','active') NOT NULL DEFAULT 'pending',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (class_id) REFERENCES classes(id)
);CREATE TABLE notes (
id INT AUTO_INCREMENT PRIMARY KEY,
lesson_id INT NOT NULL,
uploaded_by INT NOT NULL,
file_name VARCHAR(255) NOT NULL,
file_path VARCHAR(500) NOT NULL,
uploaded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (lesson_id) REFERENCES lessons(id),
FOREIGN KEY (uploaded_by) REFERENCES users(id)
);CREATE TABLE information_page (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255),
content TEXT,
image_path VARCHAR(500),
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);uploads/
βββ class_name/
βββ subject_name/
βββ lesson_name/
βββ uploaded_files
- Users can upload multiple files
- Duplicate filenames auto-overwrite
- Validated formats: PDF / JPG / PNG
- SQL Injection prevention (prepared statements)
- PIN hashed (
password_hash()) - Role-based access control
- Session management + timeout
- File type validation
- Users can only edit/delete their own notes
- Supports ~450 users per institution
- Extendable for multiple schools, +2 level, Bachelor level
- Clone the repository:
git clone https://github.com/<username>/notes-management-system.git- Import MySQL database schema
- Configure credentials in
config.php - Upload to PHP-enabled server
- Create the first Admin user
- Backend: PHP (AntiGravity framework)
- Database: MySQL
- Frontend: HTML5, CSS3, JS
- File Storage: Folder-based uploads
- Authentication: Username + 4-digit PIN
- Multi-school / multi-institution support
- Extended file type support
- Lesson-level access permissions
- Notifications on new uploads
MIT License Β© 2026