ΣEM (WebErpMesv2) is a Laravel 12 application that combines ERP and MES capabilities. The codebase follows standard Laravel conventions with a server-rendered Blade UI, API endpoints for dynamic features, and a Vue.js front-end bundle compiled with Laravel Mix.
┌──────────────────────────┐
│ Web Browser │
│ Blade views + Vue apps │
└─────────────┬────────────┘
│ HTTP/WebSocket
┌─────────────▼────────────┐
│ Laravel App │
│ Controllers / Services │
│ Jobs / Events / Policies │
│ Eloquent Models │
└─────────────┬────────────┘
│
┌─────────────▼────────────┐
│ Database (SQL) │
│ migrations + seeders │
└──────────────────────────┘
- Entry points: HTTP requests are routed in
routes/(web + API) to controllers underapp/Http/Controllers. - Business logic: Domain behavior is represented by Eloquent models in
app/Modelsand related service classes where applicable. - Database: Schema is managed via
database/migrations, with seed data indatabase/seeders. - Auth & permissions: Laravel authentication with
spatie/laravel-permissionfor roles/permissions andmcamara/laravel-localizationfor localization support. - Background work: Laravel queue/jobs and events (standard
app/Jobs,app/Events,app/Listenersconventions) are used for async work when enabled.
- Server-rendered UI: Blade templates in
resources/viewsprovide the base layout. - SPA-style components: Vue 3 components and JS in
resources/jsare bundled with Laravel Mix (webpack.mix.js). - Styling: Tailwind CSS, Bootstrap, AdminLTE, and custom Sass assets are compiled via Mix.
- WebSockets: Laravel Echo and Pusher client dependencies are included for real-time updates (e.g., production tracking notifications).
- PDF/Excel: Libraries for PDF generation and Excel export are used in backend workflows (e.g., quotes, orders, reports).
- User action in browser triggers HTTP request.
- Route matches controller action.
- Controller orchestrates model/service calls.
- Eloquent reads/writes to SQL database.
- Response returns Blade view or JSON; front-end Vue updates UI when applicable.
- Environment:
.envdefines DB, cache, queue, mail, and broadcast settings. - Local development:
php artisan servefor backend andnpm run devfor assets. - Docker:
docker-compose.yamlprovides a local stack for running the full app.
app/Http/Controllers: HTTP controllers for ERP/MES features.app/Models: Core domain entities.resources/views: Blade templates.resources/js: Vue components and JS assets.database/migrations: Schema definitions.routes/: Web and API routes.config/: Application and service configuration.