Skip to content

Tech Stack

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.

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/sentry as a Composer-managed runtime dependency

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/config
  • application/core
  • application/helpers
  • application/libraries
  • application/models
  • application/views
  • application/modules

The main modules currently visible are:

  • site
  • customer
  • api
  • acp

This means the stack is structured as a modular PHP monolith rather than split across separate deployable apps.

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.

The primary database is:

  • MySQL 8.0

The application uses:

  • mysqli
  • pdo_mysql

The schema is broad and supports:

  • content publishing
  • customer identity
  • appointments
  • consultations
  • courses and subscriptions
  • notifications
  • admin RBAC
  • payments and integrations

The Dockerfile shows the runtime depends on these PHP extensions:

  • mysqli
  • pdo_mysql
  • mbstring
  • intl
  • zip
  • gd

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.

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.

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.

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.

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

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.