How pavanvattikala/foodease works
Project type and purpose
• Food Ease is a full-stack, Laravel-based restaurant management web application. It provides role-based UIs (Admin, Waiter, Biller, Kitchen, POS) for table management, order entry, real-time kitchen updates, bill generation, and printing via thermal/KOT printers.
File structure
• Top-level Laravel directories:
• app/ (Controllers, Models, Events, Jobs, Helpers, Enums, Middleware, Requests, Providers, View Components)
• resources/ (Blade views, JS/CSS assets)
• public/ (compiled assets, entry point index.php)
• routes/ (web.php, api.php, others)
• config/, bootstrap/, database/, storage/
• docker/ (Dockerfiles for PHP 7.4–8.1)
• Architectural patterns & modules:
• MVC (Models in app/Models, Controllers app/Http/Controllers, Views in resources/views)
• Event-driven & queue-based printing (app/Events, app/Jobs, app/Helpers/Printers)
• Real-time updates via Pusher (configured in .env, config/broadcasting.php)
• Role-based middleware (Admin, Biller, Kitchen, Waiter under app/Http/Middleware)
• Modular Blade components for layouts per role (app/View/Components & resources/views/layouts)
README insights
• Real-time order broadcast (Pusher) for Kitchen module
• Docker support for containerized PHP environments
• Asset pipeline: Laravel Mix (webpack.mix.js), Tailwind, custom JS for POS, kitchen, order flows
• Authentication: Laravel Fortify/Sanctum (auth controllers, password reset, email verification)
a. Main components
• Clients (Web browsers/mobile shortcuts)
– Role-specific frontends: Admin Dashboard, Waiter Mobile UI, Kitchen Display, POS terminal, Biller UI
• Load Balancer / Web Server (optional if scaled) → Nginx/Apache (serving public/index.php within container)
• Laravel Application
– HTTP layer (Routes → Controllers → Services → Models → MySQL)
– Event Bus (Laravel Events → Pusher/Broadcast channels)
– Queue Worker (Jobs for printing, bill saving, email notifications)
• Data Stores
– Relational DB (MySQL/PostgreSQL via config/database.php)
– File storage (local storage for PDFs, backups)
– Cache/Session store (Redis or file based)
• External Services & Integrations
– Pusher (real-time channels)
– Printer Agents (thermal printers, KOT printers run via Supervisord in Docker)
– Email/SMS (mail driver configured in config/mail.php)
b. Relationships & interactions
• User action in browser → HTTP API call to Laravel → Controller logic → DB read/write → Response → Blade view or JSON
• Order submission → Laravel Event dispatched → Pusher pushes to Kitchen frontend → Kitchen UI updates in real time
• Printing job enqueued → Queue Worker picks up → uses Printer helper to format and send to thermal/KOT printers
c. Architectural patterns & design principles
• MVC separation of concerns
• Event-driven & asynchronous processing (Jobs & Queues)
• Pub/Sub for real-time updates
• Role-based access via middleware
• Component-based UI (Blade components)
• Dockerized services for consistent dev/prod environments
d. Key technologies/frameworks
• Laravel 8.x (PHP 7.4–8.1)
• Blade templating, Laravel Mix (Webpack), Tailwind CSS
• Pusher for WebSocket broadcasting
• MySQL or equivalent RDBMS
• Supervisord for managing print agent processes in Docker