Building a lightweight PHP framework helped me understand what happens underneath larger frameworks. I implemented a router that maps HTTP requests to controller actions. A service container manages dependencies, while service providers register repositories, validators, controllers, authentication services, and middleware. The repository pattern separates database access from application logic. Controllers depend on repository interfaces instead of directly executing SQL queries. This makes the application easier to test and maintain. Middleware is used for authentication, owner authorisation, and CSRF protection. This centralises security rules instead of repeating them inside every controller action. Automated testing was also an important part of the project. PHPUnit covers unit and integration scenarios, while PHPStan, PHPCS, and Deptrac verify code quality and architectural boundaries. The project gave me a better understanding of maintainable software design and showed me why clear separation of responsibilities matters.