Tech Stack
Tech Stack
Section titled “Tech Stack”Stack Overview
Section titled “Stack Overview”The current motmaina platform uses a mixed stack:
- a PHP monolith for the main website application
- MySQL as the primary relational database
- Nginx and PHP-FPM for web serving in development
- Docker Compose for local environment orchestration
- Astro Starlight for documentation
This is a pragmatic production-oriented stack rather than a modern SPA plus API-only architecture.
1. Application Runtime
Section titled “1. Application Runtime”The main application runtime is:
- PHP
7.4 - CodeIgniter-based application structure
- Composer autoloading
The project composer.json also confirms:
- platform target locked to PHP
7.4 sentry/sentryas a Composer-managed runtime dependency
2. Framework and Application Structure
Section titled “2. Framework and Application Structure”The website is built on:
- CodeIgniter
- HMVC-style modular extension through
MX_Controller - custom framework extensions under
application/core
The application is organized in classic CodeIgniter layers plus modules:
application/configapplication/coreapplication/helpersapplication/librariesapplication/modelsapplication/viewsapplication/modules
The main modules currently visible are:
sitecustomerapiacp
This means the stack is structured as a modular PHP monolith rather than split across separate deployable apps.
3. Web Server Layer
Section titled “3. Web Server Layer”The provided development environment uses:
- Nginx
1.27-alpine - PHP-FPM
The Nginx setup performs:
- request rewriting to
index.php - static asset serving
- PHP request forwarding to the PHP container
This is a standard server-rendered PHP deployment pattern.
4. Database Layer
Section titled “4. Database Layer”The primary database is:
- MySQL
8.0
The application uses:
mysqlipdo_mysql
The schema is broad and supports:
- content publishing
- customer identity
- appointments
- consultations
- courses and subscriptions
- notifications
- admin RBAC
- payments and integrations
5. PHP Extensions and System Libraries
Section titled “5. PHP Extensions and System Libraries”The Dockerfile shows the runtime depends on these PHP extensions:
mysqlipdo_mysqlmbstringintlzipgd
It also installs supporting system packages for:
- image handling
- archive support
- internationalization
- font and graphic processing dependencies
This is important because several platform features rely on media, multilingual content, file handling, and reporting workflows.
6. Development Infrastructure
Section titled “6. Development Infrastructure”The repository includes a Docker-based development setup using:
docker-compose.dev.yml- a custom PHP 7.4 FPM image
- an Nginx container
- a MySQL container
The default local development entry points are:
- website on port
8080 - MySQL on port
3307
This means the intended local stack is containerized, even though the app can also run on a manually configured host environment.
7. Documentation Stack
Section titled “7. Documentation Stack”The docs application uses:
- Astro
5.6.1 - Starlight
0.37.7 - Markdown and MDX
- Sharp
0.34.2
This docs stack is separate from the website runtime itself and is used to document product, routes, architecture, and database behavior.
8. Legacy and In-Repo Third-Party Libraries
Section titled “8. Legacy and In-Repo Third-Party Libraries”Beyond Composer, the main application also contains in-repo third-party packages under application/third_party, including:
- Google API PHP Client
- PHPMailer
- PHPExcel
- MX HMVC extension classes
It also contains internal libraries under application/libraries, including support for:
- payment gateways such as Hyperpay and Tabby
- PDF generation
- QR code generation
- Google-related integrations
- mail handling
This indicates the stack is partly modernized through Composer, but still heavily dependent on legacy in-repo library management patterns.
9. Operational and Business Integrations
Section titled “9. Operational and Business Integrations”The codebase and migrations indicate integration with several business-facing systems and workflows:
- Sentry for monitoring
- payment processing
- email delivery
- notification templates
- Google services
- healthcare and consultation workflow handling
These are part of the practical platform stack even though they are not all represented as top-level infrastructure services in Docker.
10. Documentation-Level Summary
Section titled “10. Documentation-Level Summary”At a high level, the tech stack can be described as:
- backend-rendered PHP web application
- CodeIgniter plus HMVC modular structure
- MySQL relational database
- Nginx plus PHP-FPM serving model
- Docker Compose for local setup
- Astro Starlight for project documentation
Why This Matters
Section titled “Why This Matters”This stack explains several characteristics of the current system:
- tight coupling between routes, views, and business logic
- strong dependence on server-side rendering and request rewriting
- shared database ownership across many business domains
- incremental growth through migrations and in-repo libraries
- documentation maintained in a separate modern toolchain
For contributors, this means work on the platform often spans both legacy PHP conventions and newer documentation and tooling practices.