# SLPS database

`slps_schema.sql` is the MySQL schema for the supplied SLPS proposal. It includes the department and campus structure, users and profiles, student and HOD records, projects and groups, ZIP submissions, practical guides, past papers, grades, logbooks, attendance, notifications, messaging, requests, security history, settings and backups.

Create a MySQL database named `slps`, then import `slps_schema.sql` using MySQL 8.0 or newer. Configure the PHP application with `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER`, and `DB_PASSWORD`. PHP needs the `mysqli` extension; enable `ZipArchive` and `fileinfo` for validated uploads and extracted code files.

Uploaded documents and submission files are stored outside the web root. Set `SLPS_PRIVATE_STORAGE` to a writable private directory before starting the service. If unset, storage defaults to a sibling directory named `slps-private` beside the project folder. Keep the directory private and include it in your server backup plan.

From the SLPS project root, run `php tools/create_user.php` to create the first staff or admin account. Enter a username, email, role and password when prompted; the password is hashed before it is stored. The ZIP contains no default staff login or plain-text password.
