How radenadri/whatsnew works
Main Components
• Backend (Laravel):
– Core MVC structure under the “app” directory that includes Controllers (for HTTP routes, authentication, settings, etc.), Models (e.g., Post, User), Middleware, Providers, and Requests.
– Routes are defined separately in the “routes” directory (files like web.php, auth.php, settings.php) to direct incoming HTTP requests to the proper controllers.
– Configuration files under “config”, migration and seeder files in the “database” folder, and testing suites in “tests”.
– Bootstrapping components in the “bootstrap” folder (including server-side rendering assets under bootstrap/ssr).
• Frontend (Vue):
– Vue components, layouts, and pages are located in the “resources/js” folder. This includes UI components (buttons, modals, navigation), layout files (AppLayout.vue, AuthLayout.vue), and pages (Home.vue, PostDetail.vue, etc.).
– TypeScript files and composables for reusability and state management.
– Styling is managed in “resources/css” (with Tailwind CSS and additional monospace styles).
• Infrastructure and Build:
– Vite (vite.config.ts) is used for fast compilation and bundling.
– Node package configuration (package.json) and Composer for PHP dependencies.
– Public folder for static assets and entry point (index.php) that routes front-end requests.
– GitHub Actions (under .github/workflows) provide CI/CD for linting and testing.
Relationships and Interactions
• Inertia Integration:
– Illustrate the flow where the browser sends HTTP requests to Laravel’s public index, which delegates requests (via routes) to appropriate controllers (often the Inertia controller) that then render and pass data to the Vue-based views.
– Represent how data flows from the Laravel backend (e.g., via Controllers and Models) to the Vue components via Inertia, establishing a single-page application experience.
• MVC and Modular Separation:
– Show the backend’s separation into controllers handling authentication, front-end requests, admin settings, etc.
– Illustrate the frontend’s layered architecture, where layouts wrap pages and pages further include many smaller UI components.
• Build and Dependency Management:
– Connect how Vite and Node modules compile the Vue assets, while Composer manages backend dependencies.
– Indicate the integration between SSR assets (in bootstrap/ssr) and the overall rendering approach.
Architectural Patterns and Design Principles
• MVC Architecture on the backend with clear separation between routes, controllers, models, and middleware.
• Component-Based Architecture on the frontend, where Vue components are organized by purpose (e.g., ui components, pages, layouts).
• The integration pattern via Inertia that bridges server-driven routing with client-side rendering.
• Emphasis on modularity and reusability (helper functions, composables, shared UI components).