This guide explains how to run Torma Security Solutions Ltd. locally with the same defaults expected by the frontend and backend code.
Requirements
- PHP 7.4+ (PHP 8.x recommended)
- MySQL 5.7+ or MariaDB 10.2+
- A static file server for
Web/(Apache, Nginx, or a local dev server)
1) Configure the Database
Create the database and import the schema:
mysql -u root -p < API/database/torma.sqlNote
The import script creates tables, foreign keys, and stored procedures used by the API models. Do not skip it.
2) Configure API Secrets and Connection
Edit API/config/config.php:
DB_HOSTDB_NAMEDB_USERDB_PASSJWT_SECRETJWT_EXPIRATIONDEBUG_MODE
Warning
Change
JWT_SECRETand disable debug mode before deploying to production.
3) Start the Backend API
From the API/ directory:
php -S localhost:8000The health endpoint is available at:
GET http://localhost:8000/4) Serve the Frontend
Serve files from Web/ with any static server, then open index.html.
The frontend scripts use http://localhost:8000 as the API base URL, so keep the API server running on that host/port unless you also update frontend API URLs.
5) Verify the Flow
Run this basic smoke test:
- Register on
register.html - Log in on
login.html - Browse products on
products.html - Add products to cart and place an order via
order.html - Create a reservation on
contact.html
For full test coverage, follow testing.