How fayroozh/laravel-shop works
Project type and purpose
• This is a full-stack e-commerce and inventory management application.
• Backend: Laravel (PHP), exposing both a Blade-based admin dashboard and a REST/JSON API.
• Frontend: React/Vite SPA under the “front” folder, serving the customer storefront and checkout flows.
• Database: relational (MySQL/PostgreSQL) via Eloquent ORM.
• Features: user authentication (Sanctum), product/catalog management, orders, feedback, inventory, reporting, role/permission control, real-time notifications.
File structure
• Top level
• app/: Laravel MVC code (Http/Controllers, Models, Middleware, Services, Reports, Notifications)
• resources/views/: Blade templates for admin and auth UI
• front/: React SPA (JSX components, router, state/store, API client)
• public/: entrypoint to PHP app (index.php) and static assets
• database/: migrations & seeders define schema and initial data
• routes/: web.php (Blade/admin UI + API tests), api.php (SPA JSON endpoints)
• Patterns / architecture
• MVC in Laravel: Controllers → Models → Views (Blade)
• Service layer: app/Services and app/Reports encapsulate business logic
• Event/Notification layer: Laravel Notifications queued via app/Notifications
• API layer: routes/api.php + Controllers returning JSON
• SPA layer: React app using a REST API client (Sanctum for auth, axios/fetch in front/src/services/api-client.js)
README for additional insights
• Standard Laravel framework boilerplate README (doesn’t include specifics).
• We infer tech stack: PHP 8+, Laravel, MySQL, Redis/queue (maybe), Vite, React, Tailwind CSS.