# College ERP (Scaffold) This repository contains a lightweight scaffold for a College ERP built with PHP 8+, Bootstrap 5, MySQL, and plain JavaScript/AJAX. It's prepared for use with MAMP/Apache on macOS. Quick setup 1. Place the `college-erp` folder inside your MAMP `htdocs` (already assumed in this workspace). 2. Start MAMP and ensure Apache + MySQL are running. 3. Create the database schema: ```bash # from terminal (assuming mysql client is available) mysql -u root -p < database/cms.sql ``` 4. Adjust DB credentials in `config/constants.php` if necessary. - If you use MAMP, the bundled MySQL often runs on port `8889` (not `3306`). Set `DB_PORT` in `config/constants.php` to `8889`, or set `DB_SOCKET` to the MySQL socket path MAMP uses. 5. Run the seed script to create an admin user: ```bash php database/seed.php ``` Default seeded admin credentials: `admin@example.com` / `admin123` (change after first login) Security notes - Passwords use `password_hash` and verify with `password_verify`. - Database uses PDO with prepared statements. - Basic CSRF token utilities are included (`includes/auth.php`). Next steps - Implement controllers, full models, views, and AJAX endpoints per folder structure. - Add role-based permissions, upload handling, and input validation. Public registration - Added a simple public online admission page at `student_register.php` which posts to the existing student controller and saves uploaded photos/documents to `uploads/students/`. - The public form view is at `views/public/register.php`. - The page uses existing `Department` and `Course` models to populate selects if available.