# ADR-001: Custom MVC Architecture over Laravel
## Context
As a Senior Software Engineer building a high-performance personal portfolio, the decision of which framework to use is critical. While Laravel is the industry standard for PHP applications, it comes with a significant overhead (bootstrapping, heavy dependency injection container, and numerous built-in features) that are unnecessary for a read-heavy, bespoke portfolio site.
## Decision
We decided to build a **Custom MVC Architecture** from scratch using PHP 8.4 instead of using Laravel or Symfony.
### Key Elements of the Custom Architecture:
1. **Zero-Dependency Core:** Only relies on native PHP functions and a few essential Composer packages (if any).
2. **Bespoke Router:** A lightweight regex-based router that executes in under 2ms.
3. **Pjax Integration:** Seamless page transitions handled by a custom frontend JavaScript controller, avoiding full page reloads.
4. **Service Container:** A custom dependency injection container for essential services (Database, Authentication) without reflection overhead.
## Consequences
### Positive
- **Extreme Performance:** Page load times and TTFB (Time to First Byte) are consistently under 15ms.
- **Demonstration of Skill:** Showcases deep understanding of architectural patterns, design principles, and native language capabilities to Engineering Managers and CTOs.
- **Total Control:** Every byte sent to the browser is strictly controlled, allowing for micro-optimizations.
### Negative
- **Maintenance Overhead:** Standard features like CSRF protection, ORM, and Migrations must be built and maintained manually.
- **Slower Feature Velocity:** Building complex features (e.g., a fully-fledged admin panel) takes more time compared to using Laravel Nova or Filament.