Trongate PHP Framework Docs
Introduction
Basic Concepts
Understanding Routing
Intercepting Requests
Module Fundamentals
Database Operations
Templates
Helpers
Form Handling
Working With Files
Image Manipulation
Working With Dates & Times
Authorization & Authentication
Tips And Best Practices

Modular MVC

The core of every Trongate application is the modules directory. Each module is self-contained, independent, and built with Native PHP - no Composer, no PSR-4 autoloaders, no hidden bloat.

Modules: The Only Part of Your App That Matters

Everything else is plumbing.
Your actual app? It lives in modules/. One folder per feature. Done.

Here's an example of a real-world Trongate module:

Key Characteristics

  • One controller file per module. Required.
  • One model file per module. Optional.
  • A views/ folder. Optional.
  • CSS, JS, images? Throw them in too, if you want. Optional.
  • Child modules inside modules? Yes. Nesting allowed.

The Benefits of Modular MVC

  • Copy → paste → works. No setup. No config. No faffing about.
  • Don't like models? Fine. Write 50 lines in the controller. We don’t judge.
  • Need models? Cool. Keep your controller skinny. We respect that too.
  • Assets live with the code that uses them.
    No more hunting through massive and confusing paths, such as: .

Trongate modules are 100% portable.
Steal one from your last project. Drop it in. Refresh. Boom!

How Trongate Modules Destroy “Traditional” MVC

Other frameworks Trongate
Modules need registration, routes, service providersDrop folder. Done.
Assets scattered across 17 directoriesEverything lives together. Like family.
Can’t reuse without Composer + config hellCopy. Paste. Enjoy.
“Where’s my login module?” → 45-minute treasure huntmodules/users/ → oh look, it’s right there.