FleetCraft is a clean, framework-less PHP backend for managing vehicles, drivers,
and their assignments.
The project demonstrates professional architecture using DDD, Clean
Architecture, Repository Pattern, PSR standards, and SQLite as a
lightweight persistent layer.
This codebase is intended as a portfolio-grade example of production-style PHP development.
- PHP 8.4+
- SQLite
- Doctrine DBAL
- Doctrine Migrations
- FastRoute
- Pest
- PSR-7 / PSR-17 (Nyholm)
- PHP-DI (PSR-11)
- Domain — business logic (Entities, Value Objects)
- Application — use cases / actions
- Infrastructure — persistence (DBAL repositories)
- Presentation — HTTP layer (PSR-7 actions)
| Command | Description |
|---|---|
| make install | Install PHP dependencies |
| make serve | Run local dev server on http://localhost:8080 |
| make migrate | Run database migrations |
| make migrate-generate | Generate new migration class |
| make test | Run Pest test suite |
| make stan | Run PHPStan static analysis |
| make cs-fix | Run PHP CS Fixer |
| make qa | Run full QA pipeline (PHP CS Fixer + PHPStan + Tests) |
git clone https://github.com/Stegur/fleetcraft.git
cd fleetcraft
make install
mkdir var
touch var/fleetcraft.sqlite
make migrate
make serve
API available at:
http://localhost:8080
- GET /health
- GET /vehicles
- GET /vehicles/{id}
- POST /vehicles
- PUT /vehicles/{id}
- DELETE /vehicles/{id}
- PATCH /vehicles/{id}/odometer
- GET /drivers
- GET /drivers/{id}
- POST /drivers
- PUT /drivers/{id}
- DELETE /drivers/{id}
- GET /assignments
- GET /assignments/{id}
- POST /assignments
- PATCH /assignments/{id}/complete
- PATCH /assignments/{id}/cancel
The postman/ directory contains a ready-to-use Postman collection and environment. This allows quick manual testing without writing curl commands.
- Import
FleetCraft.postman_collection.json - Import
FleetCraft.local_environment.json - Select the environment and start testing the API
make test
- Trips (domain model)
- Statistics / reporting
- CQRS read models
- GraphQL API
- JWT authentication
- Structured logging
- DX improvements and DI container bindings
MIT