# shuvo2o/crud_project architecture

> Architecture diagram of the GitHub repository shuvo2o/crud_project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shuvo2o/crud_project
- Repository: https://github.com/shuvo2o/crud_project

## Overview

##### Main Components

A. Frontend Layer (Vue.js)
- SPA architecture using Inertia.js (evident from HandleInertiaRequests middleware)
- Component structure:
- Layouts (AuthenticatedLayout, GuestLayout)
- Pages (Auth, Profile, Skill sections)
- Reusable Components

B. Backend Layer (Laravel)
- Controllers structure:
- Auth Controllers
- Profile Controller
- Skill Controller
- Middleware layer
- Request Validation layer

C. Database Layer
- Users table
- Skills table
- Cache table
- Jobs table

D. Storage System
- Public storage (skill_images)
- Framework storage (cache, sessions, views)

**[Client Layer]**
- ↑↓
**[Application Layer]**
- ↑↓
**[Data Layer]**

##### Key Relationships to Illustrate

A. Frontend-Backend Integration:
- Inertia.js as the bridge between Vue.js and Laravel
- API routes flow through web.php and auth.php

B. Authentication Flow:
- Complete auth cycle from login/register to session management
- Email verification process

C. Data Flow:
- Model relationships (User-Skill)
- File handling for skill images
- Cache and job processing paths

##### Additional Elements

- Configuration nodes (showing key config files)
- Testing boundaries (Feature and Unit tests)
- Queue system for background jobs

##### Implementation Notes

- Clear hierarchical layout
- Consistent spacing and alignment
- Proper labeling of all components
- Detailed but uncluttered connection lines

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        VueApp["Vue.js Application"]:::frontend
        click VueApp "https://github.com/shuvo2o/crud_project/blob/main/resources/js/app.js"
        
        subgraph Components
            Layouts["Layouts"]:::frontend
            click Layouts "https://github.com/shuvo2o/crud_project/tree/main/resources/js/Layouts"
            Pages["Pages"]:::frontend
            click Pages "https://github.com/shuvo2o/crud_project/tree/main/resources/js/Pages"
            ReusableComp["Reusable Components"]:::frontend
            click ReusableComp "https://github.com/shuvo2o/crud_project/tree/main/resources/js/Components"
        end
        
        subgraph "Auth Views"
            Login["Login.vue"]:::frontend
            click Login "https://github.com/shuvo2o/crud_project/blob/main/resources/js/Pages/Auth/Login.vue"
            Register["Register.vue"]:::frontend
            click Register "https://github.com/shuvo2o/crud_project/blob/main/resources/js/Pages/Auth/Register.vue"
            ResetPwd["ResetPassword.vue"]:::frontend
            click ResetPwd "https://github.com/shuvo2o/crud_project/blob/main/resources/js/Pages/Auth/ResetPassword.vue"
            VerifyEmail["VerifyEmail.vue"]:::frontend
            click VerifyEmail "https://github.com/shuvo2o/crud_project/blob/main/resources/js/Pages/Auth/VerifyEmail.vue"
        end
    end

    subgraph Backend
        InertiaMiddleware["Inertia Middleware"]:::backend
        click InertiaMiddleware "https://github.com/shuvo2o/crud_project/blob/main/app/Http/Middleware/HandleInertiaRequests.php"
        
        subgraph Controllers
            AuthControllers["Auth Controllers"]:::backend
            click AuthControllers "https://github.com/shuvo2o/crud_project/tree/main/app/Http/Controllers/Auth"
            ProfileController["Profile Controller"]:::backend
            click ProfileController "https://github.com/shuvo2o/crud_project/blob/main/app/Http/Controllers/ProfileController.php"
            SkillController["Skill Controller"]:::backend
            click SkillController "https://github.com/shuvo2o/crud_project/blob/main/app/Http/Controllers/SkillController.php"
        end
        
        subgraph Validation
            AuthValidation["Auth Validation"]:::backend
            click AuthValidation "https://github.com/shuvo2o/crud_project/blob/main/app/Http/Requests/Auth/LoginRequest.php"
            ProfileValidation["Profile Validation"]:::backend
            click ProfileValidation "https://github.com/shuvo2o/crud_project/blob/main/app/Http/Requests/ProfileUpdateRequest.php"
        end
        
        subgraph Routes
            WebRoutes["Web Routes"]:::backend
            click WebRoutes "https://github.com/shuvo2o/crud_project/blob/main/routes/web.php"
            AuthRoutes["Auth Routes"]:::backend
            click AuthRoutes "https://github.com/shuvo2o/crud_project/blob/main/routes/auth.php"
        end
    end

    subgraph "Data Layer"
        subgraph Models
            UserModel["User Model"]:::model
            click UserModel "https://github.com/shuvo2o/crud_project/blob/main/app/Models/User.php"
            SkillModel["Skill Model"]:::model
            click SkillModel "https://github.com/shuvo2o/crud_project/blob/main/app/Models/Skill.php"
        end
        
        subgraph Database
            UsersTable["Users Table"]:::database
            click UsersTable "https://github.com/shuvo2o/crud_project/blob/main/database/migrations/0001_01_01_000000_create_users_table.php"
            SkillsTable["Skills Table"]:::database
            click SkillsTable "https://github.com/shuvo2o/crud_project/blob/main/database/migrations/2024_06_05_170510_create_skills_table.php"
            CacheTable["Cache Table"]:::database
            click CacheTable "https://github.com/shuvo2o/crud_project/blob/main/database/migrations/0001_01_01_000001_create_cache_table.php"
            JobsTable["Jobs Table"]:::database
            click JobsTable "https://github.com/shuvo2o/crud_project/blob/main/database/migrations/0001_01_01_000002_create_jobs_table.php"
        end
        
        subgraph Storage
            PublicStorage["Public Storage"]:::storage
            click PublicStorage "https://github.com/shuvo2o/crud_project/tree/main/public/skill_images"
            FrameworkStorage["Framework Storage"]:::storage
            click FrameworkStorage "https://github.com/shuvo2o/crud_project/tree/main/storage/framework"
        end
        
        subgraph Config
            DBConfig["Database Config"]:::config
            click DBConfig "https://github.com/shuvo2o/crud_project/blob/main/config/database.php"
            AuthConfig["Auth Config"]:::config
            click AuthConfig "https://github.com/shuvo2o/crud_project/blob/main/config/auth.php"
            CacheConfig["Cache Config"]:::config
            click CacheConfig "https://github.com/shuvo2o/crud_project/blob/main/config/cache.php"
            QueueConfig["Queue Config"]:::config
            click QueueConfig "https://github.com/shuvo2o/crud_project/blob/main/config/queue.php"
        end
    end

    subgraph Testing
        FeatureTests["Feature Tests"]:::test
        click FeatureTests "https://github.com/shuvo2o/crud_project/tree/main/tests/Feature"
        AuthTests["Auth Tests"]:::test
        click AuthTests "https://github.com/shuvo2o/crud_project/tree/main/tests/Feature/Auth"
        ProfileTests["Profile Tests"]:::test
        click ProfileTests "https://github.com/shuvo2o/crud_project/blob/main/tests/Feature/ProfileTest.php"
    end

    %% Relationships
    VueApp --> InertiaMiddleware
    InertiaMiddleware --> Controllers
    Controllers --> Models
    Models --> Database
    Controllers --> Storage
    
    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef model fill:#f1c40f,stroke:#f39c12,color:black
    classDef database fill:#e67e22,stroke:#d35400,color:white
    classDef storage fill:#9b59b6,stroke:#8e44ad,color:white
    classDef config fill:#1abc9c,stroke:#16a085,color:white
    classDef test fill:#e74c3c,stroke:#c0392b,color:white
```
