Cave Laravel project
Find a file
archon 561251400f
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
Fix Cave-Laravel invoice bugs
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)
2026-03-28 19:53:49 +01:00
.github/workflows feat: Add Invoice email, Project, Expense, TimeEntry resources 2026-03-12 01:19:32 +01:00
app Fix Cave-Laravel invoice bugs 2026-03-28 19:53:49 +01:00
bootstrap fix: remove deleted AdminPanelProvider reference + broken Filament boot call 2026-03-14 23:52:02 +01:00
config feat: Add Tasks, Tags, Notes, Documents, Settings, Recurring Schedules 2026-03-12 13:16:54 +01:00
database Add data import script: rups_ prefix → clean Laravel tables 2026-03-14 19:35:31 +01:00
docker fix(P1): Production deployment files and test fixes 2026-03-12 20:32:06 +01:00
docs feat: Add migration command for cave_old data 2026-03-13 20:17:07 +01:00
playwright-report feat: Add comprehensive seeders, widgets, dashboard, and E2E tests 2026-03-12 01:09:30 +01:00
public fix: compress logo 877KB→17KB, shrink display to 48px 2026-03-15 20:50:34 +01:00
resources fix: add 5-col grid support to stats overview widget 2026-03-15 21:08:05 +01:00
routes fix: Apply critical and high-priority security fixes 2026-03-14 22:19:00 +01:00
scripts/conversion Exclude users table from data transformation to protect credentials 2026-03-14 17:32:41 +01:00
storage Initial Laravel 12 + Filament setup 2026-03-12 00:25:10 +01:00
test-results feat: Add API, Events, Listeners, Console Commands 2026-03-12 01:16:00 +01:00
tests refactor: Convert all Dutch labels to English 2026-03-13 00:16:53 +01:00
.editorconfig Initial Laravel 12 + Filament setup 2026-03-12 00:25:10 +01:00
.env.example fix: Apply critical and high-priority security fixes 2026-03-14 22:19:00 +01:00
.gitattributes Initial Laravel 12 + Filament setup 2026-03-12 00:25:10 +01:00
.gitignore chore: Ignore database/sql directory 2026-03-14 22:17:18 +01:00
artisan Initial Laravel 12 + Filament setup 2026-03-12 00:25:10 +01:00
composer.json feat: add Kanban board for tasks 2026-03-15 00:33:23 +01:00
composer.lock feat: add Kanban board for tasks 2026-03-15 00:33:23 +01:00
docker-compose.prod.yml fix(P1): Production deployment files and test fixes 2026-03-12 20:32:06 +01:00
Dockerfile fix(P1): Production deployment files and test fixes 2026-03-12 20:32:06 +01:00
package-lock.json feat: Add comprehensive seeders, widgets, dashboard, and E2E tests 2026-03-12 01:09:30 +01:00
package.json feat: Add comprehensive seeders, widgets, dashboard, and E2E tests 2026-03-12 01:09:30 +01:00
phpunit.xml Initial Laravel 12 + Filament setup 2026-03-12 00:25:10 +01:00
playwright.config.ts feat: Add comprehensive seeders, widgets, dashboard, and E2E tests 2026-03-12 01:09:30 +01:00
project_klant_map.php fix: Medium/low priority security and code quality fixes 2026-03-14 23:13:06 +01:00
README.md docs: Update README with complete feature list 2026-03-12 01:19:57 +01:00
vite.config.js Initial Laravel 12 + Filament setup 2026-03-12 00:25:10 +01:00

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
  • 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 factuurnummer
  • php artisan app:demo-data - Seed database met demo data
  • php artisan invoices:check-overdue - Markeer vervallen facturen (cron)

Email

  • 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

  1. Fork het project
  2. Maak een feature branch (git checkout -b feature/amazing)
  3. Commit je wijzigingen (git commit -m 'Add amazing feature')
  4. Push naar de branch (git push origin feature/amazing)
  5. Open een Pull Request

License

Proprietary - Alle rechten voorbehouden RupsWebsites