# neoighodaro-articles/e-commerce-laravel-vue architecture

> Architecture diagram of the GitHub repository neoighodaro-articles/e-commerce-laravel-vue, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/neoighodaro-articles/e-commerce-laravel-vue
- Repository: https://github.com/neoighodaro-articles/e-commerce-laravel-vue

## Overview

This is a Laravel e-commerce demo exposing API operations for accounts, products, and orders, with a Vue interface identified by the README. The principal workflow is a client request routed to an API controller, which reads or changes the corresponding Eloquent model and returns JSON; registration and login also issue Passport tokens. The README documents the Laravel/Vue split, while the sampled files show API routing and controller/model behavior. The Vue-to-API connection and several framework-wired runtime details are not shown, so those links are omitted or marked unverified.

Main entry points: [`routes/api.php`](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/routes/api.php) (API routes), [`app/Product.php`](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Product.php) (Product model), [`app/User.php`](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/User.php) (User model), [`app/Providers`](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/tree/master/app/Providers) (Application providers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_request["Request handling"]
  node_api_routes["API routes<br/>[api.php]"]
  node_http_kernel["HTTP kernel<br/>[Kernel.php]"]
  node_middleware["HTTP middleware"]
  node_base_controller["Base controller<br/>[Controller.php]"]
end

subgraph group_identity["Accounts and auth"]
  node_user_controller["User API<br/>[UserController.php]"]
  node_auth_controllers["Login and registration"]
  node_user_model["User model<br/>[User.php]"]
  node_passport["Passport tokens"]
end

subgraph group_catalog["Product catalog"]
  node_product_controller["Product API"]
  node_product_model["Product model<br/>[Product.php]"]
  node_product_seed["Product seeder"]
end

subgraph group_commerce["Orders"]
  node_order_controller["Order API"]
  node_order_model["Order model<br/>[Order.php]"]
end

subgraph group_runtime["Laravel runtime"]
  node_app_entry["HTTP entry point<br/>[index.php]"]
  node_bootstrap["Application bootstrap<br/>[app.php]"]
  node_route_provider["Route provider"]
  node_providers["Application providers"]
  node_exception_handler["Exception handler<br/>[Handler.php]"]
end

node_client(("Shop client"))
node_database[("Database")]
node_vue_ui["Vue interface<br/>[app.js]"]

node_client -->|"sends requests"| node_api_routes
node_api_routes -->|"routes to"| node_user_controller
node_api_routes -->|"routes to"| node_product_controller
node_api_routes -->|"routes to"| node_order_controller
node_app_entry -->|"loads"| node_bootstrap
node_bootstrap -->|"binds"| node_http_kernel
node_http_kernel -->|"uses"| node_middleware
node_route_provider -->|"registers"| node_api_routes
node_providers -->|"configures"| node_route_provider
node_providers -.->|"configures"| node_exception_handler
node_user_controller -->|"reads and writes"| node_user_model
node_auth_controllers -->|"creates accounts"| node_user_model
node_user_controller -.->|"issues tokens"| node_passport
node_providers -->|"registers routes"| node_passport
node_product_controller -->|"reads and writes"| node_product_model
node_order_controller -->|"reads and writes"| node_order_model
node_order_controller -->|"gets user ID"| node_user_model
node_order_model -->|"belongs to"| node_product_model
node_order_model -->|"belongs to"| node_user_model
node_product_seed -->|"seeds"| node_product_model
node_product_model -.->|"persists records"| node_database
node_vue_ui -.->|"uses API"| node_api_routes

click node_api_routes "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/routes/api.php"
click node_http_kernel "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Http/Kernel.php"
click node_middleware "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/tree/master/app/Http/Middleware"
click node_base_controller "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Http/Controllers/Controller.php"
click node_user_controller "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Http/Controllers/UserController.php"
click node_auth_controllers "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/tree/master/app/Http/Controllers/Auth"
click node_user_model "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/User.php"
click node_passport "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Providers/AuthServiceProvider.php"
click node_product_controller "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Http/Controllers/ProductController.php"
click node_product_model "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Product.php"
click node_product_seed "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/database/seeds/ProductTableSeeder.php"
click node_order_controller "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Http/Controllers/OrderController.php"
click node_order_model "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Order.php"
click node_app_entry "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/public/index.php"
click node_bootstrap "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/bootstrap/app.php"
click node_route_provider "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Providers/RouteServiceProvider.php"
click node_providers "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/tree/master/app/Providers"
click node_exception_handler "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Exceptions/Handler.php"
click node_vue_ui "https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/public/js/app.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api_routes,node_http_kernel,node_middleware,node_base_controller,node_client toneBlue
class node_user_controller,node_auth_controllers,node_user_model,node_passport,node_database toneAmber
class node_product_controller,node_product_model,node_product_seed toneMint
class node_order_controller,node_order_model toneRose
class node_app_entry,node_bootstrap,node_route_provider,node_providers,node_exception_handler toneIndigo
class node_vue_ui toneTeal
```

## Components

### Request handling

- [API routes](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/routes/api.php): `routes/api.php`
- [HTTP kernel](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Http/Kernel.php): `app/Http/Kernel.php`
- [HTTP middleware](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/tree/master/app/Http/Middleware): `app/Http/Middleware`
- [Base controller](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Http/Controllers/Controller.php): `app/Http/Controllers/Controller.php`

### Accounts and auth

- [User API](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`
- [Login and registration](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/tree/master/app/Http/Controllers/Auth): `app/Http/Controllers/Auth`
- [User model](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/User.php): `app/User.php`
- [Passport tokens](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Providers/AuthServiceProvider.php): `app/Providers/AuthServiceProvider.php`

### Product catalog

- [Product API](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Http/Controllers/ProductController.php): `app/Http/Controllers/ProductController.php`
- [Product model](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Product.php): `app/Product.php`
- [Product seeder](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/database/seeds/ProductTableSeeder.php): `database/seeds/ProductTableSeeder.php`

### Orders

- [Order API](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Http/Controllers/OrderController.php): `app/Http/Controllers/OrderController.php`
- [Order model](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Order.php): `app/Order.php`

### Laravel runtime

- [HTTP entry point](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/public/index.php): `public/index.php`
- [Application bootstrap](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/bootstrap/app.php): `bootstrap/app.php`
- [Route provider](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [Application providers](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/tree/master/app/Providers): `app/Providers`
- [Exception handler](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/app/Exceptions/Handler.php): `app/Exceptions/Handler.php`

### Other components

- **Shop client**
- **Database**
- [Vue interface](https://github.com/neoighodaro-articles/e-commerce-laravel-vue/blob/master/public/js/app.js): `public/js/app.js`

## Connections

- Shop client → API routes: sends requests (evidence: `routes/api.php`)
- API routes → User API: routes to (evidence: `routes/api.php`)
- API routes → Product API: routes to (evidence: `routes/api.php`)
- API routes → Order API: routes to (evidence: `routes/api.php`)
- HTTP entry point → Application bootstrap: loads (evidence: `public/index.php`)
- Application bootstrap → HTTP kernel: binds (evidence: `bootstrap/app.php`)
- HTTP kernel → HTTP middleware: uses (evidence: `app/Http/Kernel.php`)
- Route provider → API routes: registers (evidence: `app/Providers/RouteServiceProvider.php`)
- Application providers → Route provider: configures (evidence: `config/app.php`)
- Application providers → Exception handler: configures
- User API → User model: reads and writes (evidence: `app/Http/Controllers/UserController.php`)
- Login and registration → User model: creates accounts (evidence: `app/Http/Controllers/Auth/RegisterController.php`)
- User API → Passport tokens: issues tokens
- Application providers → Passport tokens: registers routes (evidence: `app/Providers/AuthServiceProvider.php`)
- Product API → Product model: reads and writes (evidence: `app/Http/Controllers/ProductController.php`)
- Order API → Order model: reads and writes (evidence: `app/Http/Controllers/OrderController.php`)
- Order API → User model: gets user ID (evidence: `app/Http/Controllers/OrderController.php`)
- Order model → Product model: belongs to (evidence: `app/Order.php`)
- Order model → User model: belongs to (evidence: `app/Order.php`)
- Product seeder → Product model: seeds (evidence: `database/seeds/ProductTableSeeder.php`)
- Product model → Database: persists records
- Vue interface → API routes: uses API
