Hi! This is our school e-commerce project.
It has a simple frontend, a PHP backend API, and a MySQL/MariaDB database.
Run item_database_structure_new.sql in your MySQL/MariaDB server.
This is the recommended default because it gives you a clean and consistent setup.
Optional (for quick demo data):
- Run archive/item_database_latest.sql
- Use this when you want preloaded sample records right away.
If you want a helper script instead:
php scripts/rebuild_db.phpEasiest on Windows:
- Run start-server.cmd
Manual way (any OS):
php -S 127.0.0.1:8000 -t .Open this in your browser:
- Entry page: index.html
- API: api/
- Frontend JS: js/
- Styles: style.css
- DB schema: item_database_structure_new.sql
- Full dump with structure + sample data: archive/item_database_latest.sql
- Presentation docs: PRESENTATION.md, PRESENTATION.sql, ERD.md
- Presentation flow bullets: PRESENTATION_FLOW.md
- Utility/admin scripts: scripts/
composer.jsonandcomposer.lockare tracked so dependency metadata stays with the project.- Local Composer artifacts like
vendor/andcomposer.pharare ignored by.gitignoreand should not be committed. - Two unused helper scripts were removed from the repo:
scripts/patch_orders.phpandscripts/demo_status.php. - Prices are stored VAT-inclusive in the database; checkout displays reverse-calculated VAT at the frontend only.
- Products: api/products.php
- Auth (signup/login): api/auth.php
- Orders: api/orders.php
The API checks these values:
- DB_HOST (default: 127.0.0.1)
- DB_PORT (default: 3306)
- DB_NAME (default: itc_database_admin)
- DB_USER (default: root)
- DB_PASSWORD (default: root)
PowerShell example:
$env:DB_HOST = '127.0.0.1'
$env:DB_USER = 'root'
$env:DB_PASSWORD = 'root'could not find driver: enablepdo_mysqlin your PHP setup.- DB connection error: check your DB credentials and make sure MySQL/MariaDB is running.