Cave Laravel project
|
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test Suite (push) Has been cancelled
Test (SQLite) / Unit Tests (SQLite) (push) Has been cancelled
CI / Deploy (push) Has been cancelled
CI / Notify on Failure (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
1. Fix vat_rate -> tax_rate column name mismatch in InvoiceResource form (DB column is tax_rate, but form used vat_rate which silently failed to save) 2. Fix Invoice::booted() to query lines fresh from DB when saving (Filament's repeater doesn't always load the relation into memory) 3. Add InvoiceLine::booted() to auto-calculate amount = qty * unit_price on save (was never set, breaking subtotal/tax/total calculations) 4. Fix paid_date -> paid_at in mark_paid Filament action (DB column is paid_at; paid_date was silently ignored) |
||
|---|---|---|
| .github/workflows | ||
| app | ||
| bootstrap | ||
| config | ||
| database | ||
| docker | ||
| docs | ||
| playwright-report | ||
| public | ||
| resources | ||
| routes | ||
| scripts/conversion | ||
| storage | ||
| test-results | ||
| tests | ||
| .editorconfig | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| artisan | ||
| composer.json | ||
| composer.lock | ||
| docker-compose.prod.yml | ||
| Dockerfile | ||
| package-lock.json | ||
| package.json | ||
| phpunit.xml | ||
| playwright.config.ts | ||
| project_klant_map.php | ||
| README.md | ||
| vite.config.js | ||
Cave Laravel - Facturatie & Project Management
Een modern facturatie- en projectmanagement systeem gebouwd met Laravel 12, Filament 3 en MariaDB.
Functies
Admin Panel (Filament)
- Klanten: CRUD met archivering, zoeken, relaties
- Projecten: Budget, uurtarief, status tracking, tijdregistratie koppeling
- Facturen: PDF generatie, e-mail verzenden, status workflow
- Kosten: Leverancier, categorieën, BTW, goedkeuring workflow
- Tijdregistratie: Handmatige invoer, project koppeling, gefactureerd status
- Dashboard: Statistieken, omzetgrafiek, project uren
API (RESTful)
- Sanctum authenticatie - JWT token based
- Volledige CRUD:
- Clients:
GET/POST/PUT/DELETE /api/clients - Invoices:
GET/POST/PUT/DELETE /api/invoices - Projects:
GET /api/projects - Time Entries:
GET /api/time-entries
- Clients:
- Extra endpoints: PDF download, status updates
- Dashboard statistics:
/api/stats,/api/health
Services
- InvoiceService: PDF generatie, bedragen berekenen, status updates
- TimeTrackingService: Timer start/stop/pause, unbilled uren
- ReportService: Omzet, kosten, tijd rapporten
- ExportService: CSV/Excel export voor klanten, facturen, projecten, tijd
Console Commands
php artisan invoice:generate-number- Genereer volgend factuurnummerphp artisan app:demo-data- Seed database met demo dataphp artisan invoices:check-overdue- Markeer vervallen facturen (cron)
- Factuur verzenden met PDF bijlage
- Dutch templates voor professionele e-mails
Testing
- Unit Tests: Model tests met Pest PHP (29 tests passing)
- E2E Tests: Playwright geconfigureerd
- CI/CD: GitHub Actions workflows
Installatie
# Clone en checkout laravel branch
git clone https://code.rups.cloud/RupsWebsites/cave_old.git
cd cave_old
git checkout laravel
# DDEV starten
ddev start
# Dependencies installeren
composer install
npm install
# Database migrate en seed
php artisan migrate --seed
# Admin gebruiker aanmaken (admin@rups.cloud / admin123)
php artisan make:filament-user
# Development server
ddev composer run dev
Environment
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=cave
DB_USERNAME=db
DB_PASSWORD=db
Toegang
- Admin Panel:
/admin - API:
/api - Credentials:
admin@rups.cloud/admin123
Netwerk
- Lokaal:
http://cave-laravel.ddev.site - LAN:
http://192.168.0.147:32771
PDF Facturen
PDFs worden gegenereerd met Barryvdh DomPDF:
- Dutch templates (
resources/views/pdfs/invoice.blade.php) - Automatische berekening van subtotaal, BTW, totaal
- Bedrijfsgegevens en betalingsinfo
Cron Jobs
Voeg toe aan crontab:
0 9 * * * cd /path/to/cave_laravel && php artisan invoices:check-overdue
Testen
# Unit tests (SQLite in-memory)
DB_CONNECTION=sqlite DB_DATABASE=":memory:" php artisan test
# Unit tests only
DB_CONNECTION=sqlite DB_DATABASE=":memory:" php artisan test --filter="Unit"
# E2E tests (Playwright)
npx playwright test
Tech Stack
| Component | Versie |
|---|---|
| Laravel | 12.x |
| Filament | 3.x |
| PHP | 8.3 |
| MariaDB | 10.6 |
| SQLite | (tests) |
| Pest | 2.x |
| Playwright | latest |
| TailwindCSS | 3.x |
Architectuur
app/
├── Console/Commands/ # CLI commands
├── Events/ # Application events
├── Filament/ # Filament resources & pages
│ └── Resources/
│ ├── ClientResource/
│ ├── ProjectResource/
│ ├── InvoiceResource/
│ ├── ExpenseResource/
│ └── TimeEntryResource/
├── Helpers/ # Helper functions
├── Http/Controllers/ # API Controllers
├── Livewire/ # Time tracking componenten
├── Listeners/ # Event listeners
├── Mail/ # Mailable classes
├── Models/ # Eloquent models
├── Providers/ # Service providers
└── Services/ # Business logic
database/
├── migrations/ # Database migrations
└── seeders/ # Database seeders
resources/
├── views/
│ ├── emails/ # Email templates
│ ├── filament/ # Filament views
│ ├── livewire/ # Livewire views
│ └── pdfs/ # PDF templates
tests/
├── e2e/ # Playwright tests
└── Unit/ # Unit tests (Pest)
Bijdragen
- Fork het project
- Maak een feature branch (
git checkout -b feature/amazing) - Commit je wijzigingen (
git commit -m 'Add amazing feature') - Push naar de branch (
git push origin feature/amazing) - Open een Pull Request
License
Proprietary - Alle rechten voorbehouden RupsWebsites