A modern, extensible Point-of-Sale (POS) application for cafes, built with Laravel 12.x, Filament 4.x (Server‑Driven UI on Livewire/Alpine/Tailwind), and Tailwind CSS v4.x. It provides robust order management, reporting, and admin features with a clean, modular architecture and developer-friendly workflow.
- Backend: PHP 8.2+ (Laravel 12.x)
- Frontend: Blade, Filament (4.x), Vite (7.x), TailwindCSS (4.1), JavaScript (ESM)
- Database: MySQL/SQLite
- Testing: PHPUnit (11.5), PHPStan (level 8), Pint (1.24)
- Build Tools: Composer, NPM
- Other: Spatie Media Library, Filament plugins, FakerPHP
See tech-stack.md for details.
- Layered MVC (Model-View-Controller) with Service/Repository patterns
- Modular organization: Models, Controllers, Policies, Providers, Enums, Factories, Migrations
- Filament 4.x for admin UI as Server‑Driven UI (Resources, Pages, Widgets) powered by Livewire/Alpine/Tailwind
- Clear separation of concerns, extensibility, and security via policy-based authorization
See architecture.md for full overview and diagrams.
- PHP 8.2+
- MySQL 5.7+ or SQLite
- Node.js (for frontend assets)
composer install
npm install
- Copy
.env.example
to.env
and configure database and environment variables
cp .env.example .env
- Generate app key
php artisan key:generate
- Run migrations and seeders:
php artisan migrate --seed
- Run all development services concurrently
composer dev
- Or individually:
php artisan serve # Laravel development server
npm run dev # Vite dev server with Tailwind v4
php artisan queue:listen # Queue worker
php artisan pail # Real-time log monitoring
See folder-structure.md for full details.
app/
Models/ # Domain entities
Http/Controllers/ # Request handling
Policies/ # Authorization logic
Providers/ # Service providers
Filament/ # Admin UI (Filament v4)
Resources/ # Eloquent-backed resources
Orders/
OrderResource.php
Pages/ # List/Create/Edit pages
Widgets/ # Resource widgets
Schemas/ # Extracted schemas
Tables/ # Extracted tables
Pages/ # Standalone panel pages (e.g., Dashboard)
Widgets/ # Dashboard widgets
Clusters/ # Optional navigation clusters
Imports/ # Bulk imports (optional)
Exports/ # Bulk exports (optional)
Livewire/ # UI workflows
Helpers/ # Utility functions
Casts/ # Custom attribute casting
resources/
views/ # Blade templates
js/ # Frontend scripts
css/ # Stylesheets
lang/ # Localization
public/ # Entry point and assets
config/ # Configuration files
routes/ # Route definitions
storage/ # App storage
tests/ # Feature and unit tests
database/ # Migrations, factories, seeders
- Modern Admin Interface: Filament 4.x with enhanced UI/UX and improved performance
- Advanced Order Management: Complete order lifecycle with real-time updates
- Comprehensive Reporting: Analytics dashboard with visual insights
- Role-based Authorization: Secure access control with policies and permissions
- Responsive Design: Tailwind CSS v4 with optimized build performance
- Modular Architecture: Clean, extensible codebase following Laravel best practices
- Automated Testing: PHPUnit with PHPStan static analysis and Pint code formatting
- Hot Reload Development: Vite 7.x with lightning-fast asset compilation
- Database Flexibility: Support for MySQL and SQLite with comprehensive seeding
- Modern Stack: Laravel 12.x + Filament 4.x + Tailwind v4 + Vite 7.x
- Component Development: Modular Livewire and Filament components
- Data Access: Eloquent ORM with relationships and factories
- Authorization: Policy-based security with Spatie permissions
- Quality Assurance: Automated testing with PHPUnit, PHPStan Level 8, and Pint
- Asset Pipeline: Vite with hot reload and optimized Tailwind v4 compilation
- Development Commands: Unified
composer dev
script for concurrent services - Branching: Feature branches with pull requests and code review
# Run all quality checks
composer cs # Code style (Pint + Prettier)
composer stan # Static analysis (PHPStan Level 8)
composer test # PHPUnit test suite
# Individual commands
./vendor/bin/pint # Laravel Pint formatting
./vendor/bin/phpstan # Static analysis
php artisan test # Run tests
See workflow.md for workflow details.
- PascalCase for classes, camelCase for methods/variables
- snake_case for migrations
- PSR-4 autoloading and folder structure
- Separation of concerns: business logic in models/services, thin controllers
- Consistent error handling and validation
See exemplars.md for code examples and architecture.md for standards.
- Unit Tests:
tests/Unit/
— Isolated component tests - Feature Tests:
tests/Feature/
— End-to-end workflow tests - Test Data: Factories and seeders for consistent environments
- Quality Assurance: PHPStan Level 8 static analysis
- Code Style: Laravel Pint formatting
- Performance: Optimized database setup for test runs
# Full test suite with quality checks
composer test # PHPUnit tests
composer stan # PHPStan static analysis
composer cs # Code style formatting
# Individual test commands
php artisan test # Run all tests
php artisan test --filter=Unit # Unit tests only
php artisan test --filter=Feature # Feature tests only
See exemplars.md and architecture.md for patterns.
- Standards: Follow coding standards using established patterns (exemplars.md)
- Development: Use feature branches with pull requests and code review
- Testing: Write comprehensive tests for new functionality (unit and feature tests)
- Documentation: Update relevant documentation and blueprint files
- Quality: Ensure all code passes PHPStan Level 8 and Pint formatting
- Guidelines: See copilot-instructions.md for detailed guidelines
The project has been successfully upgraded to the latest technology stack. See comprehensive upgrade documentation:
- Upgrade Plan - Complete three-phase upgrade strategy
- Phase 1 Report - Preparation and dependency review
- Phase 2 Report - Package upgrades and refactoring
- Phase 3 Report - Testing, validation, and finalization
This app adds standard security headers via App\Http\Middleware\SecurityHeaders
and applies them to Filament pages as well:
- Content-Security-Policy (CSP), X-Content-Type-Options=nosniff, X-Frame-Options=SAMEORIGIN
- Referrer-Policy=no-referrer, Permissions-Policy for common features
- Strict-Transport-Security (HSTS) in production over HTTPS
CSP defaults: development allows localhost/ws for Vite/Livewire; production is stricter and limited to self with minimal inline allowances required by Filament/Livewire.
Override CSP (choose one):
- Edge/web server: set the Content-Security-Policy header in Nginx/Apache/CDN; the middleware won’t overwrite an existing header.
- App-level: register your own middleware earlier in
bootstrap/app.php
or the Filament panel provider; or adjustbuildCsp()
inapp/Http/Middleware/SecurityHeaders.php
. - Per-route: apply a route or group middleware to set a different policy for specific pages.
Tests assert these headers on core and Filament routes. If you move headers to the edge, ensure they remain present or update the tests accordingly.
✅ Latest Technology Stack: Laravel 12.x, Filament 4.x, Tailwind v4.x
✅ Security: All vulnerabilities patched, PHPStan Level 8 compliance
✅ Performance: Optimized build pipeline, faster asset compilation
✅ Testing: Comprehensive automated tests
✅ Documentation: Complete upgrade documentation and developer guides
✅ Code Quality: Enforced static analysis and consistent formatting
MIT License. See tech-stack.md for details.