# MHI Gateway

## Overview

MHI Gateway is a multi-tenant communications platform developed by
Micro Health Initiative.

The platform will provide:

- SMPP
- WhatsApp
- Email
- Push Notifications
- USSD
- Voice

through a single API.

---

## Technology

Laravel 12

PHP 8.4

MySQL

Redis

Queues

REST API

---

## Architecture

Use Clean Architecture.

Business logic must NOT live inside controllers.

Controllers should be thin.

Use:

- Services

- DTOs

- Repositories where necessary

- Events

- Jobs

---

## Multi Tenancy

Every business entity belongs to a tenant.

Never query tenant-owned data without tenant filtering.

---

## Billing

Money must be stored as integer.

Never use float.

---

## Security

Never expose

- passwords

- API keys

- SMPP credentials

inside logs.

---

## Vendor Packages

Never edit vendor files.

Always solve problems using configuration or wrapper classes.

---

## Development Workflow

For every task:

1. Explain design.

2. Show affected files.

3. Implement one milestone only.

4. Run tests.

5. Stop for review.

Never implement multiple milestones at once.
