WaterDefender is a Laravel-based web application developed as part of the TLE2 project, combining reactive interfaces, modern frontend tooling and automated code quality checks.
Note
The project is currently under active development. Core WaterDefender functionality has yet to be implemented.
| Layer | Technologies |
|---|---|
| Backend | PHP 8.3+, Laravel 13 |
| Frontend | Blade, Livewire 4, Blaze |
| Styling | Tailwind CSS 4 |
| Build tooling | Vite+, Node.js, npm |
| Database | SQLite |
| Testing | Pest 5 |
| Code quality | Larastan, PHPStan, Laravel Pint, Prettier |
- PHP 8.3+
- Composer
- Node.js 26.13.1
- npm 12.2.3
Node.js and npm versions are managed through Volta.
git clone https://github.com/toon-van-berkel/WaterDefender.git
cd WaterDefender
composer run setupThe setup script installs dependencies, configures the environment, generates the application key, runs migrations and builds frontend assets.
composer run devOpen localhost:8000 in your browser.
Manual installation
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
npm install
npm run buildFor Windows PowerShell:
Copy-Item .env.example .env| Command | Description |
|---|---|
composer run setup |
Initialize the application |
composer run dev |
Start the development environment |
composer run test |
Run the complete quality check suite |
composer run lint |
Format PHP code |
composer run lint:check |
Validate code formatting |
composer run types:check |
Run static analysis |
composer run ci:check |
Run CI checks |
npm run dev |
Start the frontend development server |
npm run build |
Build production assets |
npm run format |
Format frontend code using Prettier |
Every contribution should pass the complete quality check suite.
composer run testflowchart LR
A[Source Code] --> B[Laravel Pint]
B --> C[Larastan]
C --> D[Pest]
D --> E[Ready for Review]
style A fill:#004A73,color:#fff,stroke:#01CBE1
style B fill:#004A73,color:#fff,stroke:#01CBE1
style C fill:#004A73,color:#fff,stroke:#01CBE1
style D fill:#004A73,color:#fff,stroke:#01CBE1
style E fill:#01CBE1,color:#004A73,stroke:#01CBE1
Individual checks can also be executed independently.
composer run lint:check
composer run types:check
php artisan testWaterDefender uses automated code formatting to maintain a consistent code style across the application.
| Formatter | Responsibility | Command |
|---|---|---|
| Laravel Pint | PHP code formatting | composer run lint |
| Prettier | Frontend code formatting | npm run format |
Run both formatters before submitting a pull request:
composer run lint
npm run formatWaterDefender/
├── app/ # Application logic
├── bootstrap/ # Framework initialization
├── config/ # Application configuration
├── database/
│ ├── factories/
│ ├── migrations/
│ └── seeders/
├── public/ # Public assets
├── resources/
│ ├── css/
│ ├── js/
│ └── views/
├── routes/ # Application routes
├── tests/
│ ├── Feature/
│ └── Unit/
├── .env.example
├── composer.json
└── package.json
Environment-specific configuration is managed through .env.
DB_CONNECTION=sqlite
SESSION_DRIVER=database
CACHE_STORE=database
QUEUE_CONNECTION=databaseImportant
Never commit a populated .env file or hardcode sensitive credentials.
When changing the database configuration, run:
php artisan migrate- Create a feature or fix branch.
- Follow the existing Laravel and frontend conventions.
- Add or update relevant tests.
- Format PHP code using
composer run lint. - Format frontend code using
npm run format. - Run
composer run test. - Submit a pull request.
