Requirements
Requirements
Section titled “Requirements”Purpose
Section titled “Purpose”This page describes what is needed to run the current motmaina-website application in a local or server environment.
The application is a PHP-based CodeIgniter monolith with MySQL, Nginx, and PHP-FPM in the provided development setup.
Core Runtime Requirements
Section titled “Core Runtime Requirements”To run the website, the following are required:
- PHP
7.4 - MySQL
8.0or a compatible MySQL server - Nginx or another web server capable of routing requests to
index.php - Composer dependencies installed under
vendor/
PHP Extensions
Section titled “PHP Extensions”Based on the Dockerfile, the application expects these PHP extensions:
mysqlipdo_mysqlmbstringintlzipgd
The image also installs system packages needed for image processing, internationalization, and archive handling.
Required Application Structure
Section titled “Required Application Structure”The runtime assumes the standard project layout remains intact:
index.phpas the front controllerapplication/for CodeIgniter application codesystem/for the framework corevendor/for Composer-loaded dependencies
If any of these are missing or moved without reconfiguration, the application will not boot correctly.
Environment Variables
Section titled “Environment Variables”The application loads environment values from:
.env.env.local- server environment variables
The most important variables visible from the current codebase are:
CI_ENVDB_HOSTDB_USERNAMEDB_PASSWORDDB_NAMEAPP_TIMEZONEMOTMAINA_ENVIRONMENT
Minimum Database Requirements
Section titled “Minimum Database Requirements”The application uses MySQL through CodeIgniter’s mysqli driver and reads its connection settings from environment variables.
At minimum, the following must exist:
- a reachable MySQL host
- a database schema for the website
- a database user with read and write access to that schema
The provided development setup uses:
- database name:
motmaina_website - username:
motmaina - password:
motmaina
Web Server Requirements
Section titled “Web Server Requirements”The provided development environment uses Nginx with these expectations:
- document root points to the project root
index.phpis the main entry file- all unmatched requests are rewritten to
/index.php?$query_string - PHP files are forwarded to PHP-FPM
This routing behavior is essential because the application depends on CodeIgniter’s request dispatching.
Recommended Local Development Setup
Section titled “Recommended Local Development Setup”The repository already includes a Docker-based local setup in:
motmaina-website/docker/docker-compose.dev.ymlmotmaina-website/docker/development/Dockerfilemotmaina-website/docker/development/nginx/default.conf
The containerized setup includes:
nginx:1.27-alpinephp:7.4-fpmmysql:8.0
The exposed development ports are:
- website:
http://localhost:8080 - database:
localhost:3307
Manual Run Requirements
Section titled “Manual Run Requirements”If the app is not run through Docker, the host machine still needs:
- PHP
7.4with the required extensions - a configured web server with request rewriting
- a running MySQL instance
- project dependencies installed through Composer
- environment variables or
.envfiles configured correctly
Composer and Third-Party Dependencies
Section titled “Composer and Third-Party Dependencies”The project uses Composer and includes at least:
sentry/sentry
The codebase also contains bundled third-party libraries under application/third_party, including:
- Google API PHP client
- PHPMailer
- PHPExcel
This means a successful runtime depends on both Composer-managed packages and legacy in-repo third-party libraries.
Writable and Operational Directories
Section titled “Writable and Operational Directories”The application should have appropriate file permissions for operational directories such as:
application/cacheapplication/logs
In containerized development, permissions are prepared in the PHP image build.
Optional External Service Requirements
Section titled “Optional External Service Requirements”Some features may require external credentials or service configuration depending on which flows are used:
- email delivery providers
- payment gateways such as Hyperpay or Tabby
- Google service integrations
- error monitoring through Sentry
- SMS or messaging providers in production-like environments
These are not always required to boot the application, but they may be required for specific business workflows to function fully.
Practical Definition of “Ready to Run”
Section titled “Practical Definition of “Ready to Run””The application should be considered ready to run when all of the following are true:
- PHP, MySQL, and the web server are available.
- Composer dependencies are installed.
- Environment variables are present.
- The database is reachable and contains the required schema.
- Request rewriting sends traffic into
index.php. - Cache and log directories are writable.
Recommended Default Path
Section titled “Recommended Default Path”For local development, the safest path is to use the existing Docker setup rather than configuring the stack manually. It already reflects the expected runtime combination used by the current project.