Studies
Tesla App — web version
PHP web app reproducing Tesla control features, with UML design, API mocks, and an MVC base.
Tech stack
Project background
Academic project developed over two semesters around a web reproduction of the Tesla mobile app. The goal was to let users control and inspect a vehicle from a browser, using a PHP architecture, a MariaDB database, and API exchanges simulated through mocks when real-world testing was not available.
Project highlights
- Web application designed to control a Tesla vehicle from a browser.
- PHP MVC architecture with controllers, views, API models, SQL models, and an Application class.
- JSON mocks to simulate Tesla API responses and support testing without direct vehicle access.
- PHPUnit tests, PHPDoc documentation, and style rules with PHP_CodeSniffer.
Functional scope
The system covered secure authentication, vehicle information, location, opening controls, trunk actions, lights, speed limiter configuration, and possible additions such as trip history or charging statistics. Each feature was described with actors, preconditions, main flows, and alternative flows.
UML modeling
The project used context, use case, sequence, and class diagrams to clarify interactions between the user, application, Tesla API, and database. This phase guided the organization of controllers, API models, SQL models, and views.
Implementation and code
The code was organized as a PHP MVC application. Models were split between API calls and database access through PDO. Tesla API responses were simulated with JSON mocks so development and testing could continue without constant access to the vehicle. A second iteration restructured the project around app and public directories plus an Application class launched by index.php, with improved error handling.
Tests and limits
Unit tests used PHPUnit with simulated JSON response fixtures. The project produced a usable, documented web base, but real API calls could not be fully validated on the vehicle because of security, token, and coordination constraints between the development and security teams.