# mainskybird/village architecture

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

- Interactive diagram: https://gitdiagram.com/mainskybird/village
- Repository: https://github.com/mainskybird/village

## Overview

This is a Laravel/Vue starter application providing account registration and authentication, a dashboard, and account settings. The main workflow is user authentication followed by profile, password/security, and appearance management. Laravel Fortify handles auth setup, while settings routes dispatch to controllers that validate requests and update the user model. The Vue pages and reusable UI are present, but their runtime wiring was not sampled; frontend-to-backend links are therefore omitted. The README is empty, so capability coverage is based on the file tree and sampled source.

Main entry points: [`routes/settings.php`](https://github.com/mainskybird/village/blob/main/routes/settings.php) (Settings Routes), [`app/Http/Controllers/Settings/ProfileController.php`](https://github.com/mainskybird/village/blob/main/app/Http/Controllers/Settings/ProfileController.php) (Profile Controller), [`app/Http/Controllers/Settings/SecurityController.php`](https://github.com/mainskybird/village/blob/main/app/Http/Controllers/Settings/SecurityController.php) (Security Controller), [`app/Actions/Fortify/CreateNewUser.php`](https://github.com/mainskybird/village/blob/main/app/Actions/Fortify/CreateNewUser.php) (Registration Action)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["HTTP and Settings"]
  node_routes["Settings Routes<br/>[settings.php]"]
  node_profile["Profile Controller"]
  node_security["Security Controller"]
  node_profile_requests["Profile Requests"]
  node_twofactor_request["Two-Factor Request"]
  node_middleware["Inertia Middleware"]
  node_appearance_middleware["Appearance Middleware"]
end

subgraph group_identity["Identity and Auth"]
  node_fortify["Fortify Setup"]
  node_registration["Registration Action<br/>[CreateNewUser.php]"]
  node_profile_rules["Profile Rules"]
  node_user["User Account<br/>[User.php]"]
end

subgraph group_client["Vue Application"]
  node_dashboard["Dashboard<br/>[Dashboard.vue]"]
  node_welcome["Welcome Page<br/>[Welcome.vue]"]
  node_auth_pages["Auth Pages"]
  node_profile_page["Profile Settings<br/>[Profile.vue]"]
  node_security_page["Security Settings<br/>[Security.vue]"]
  node_appearance_page["Appearance Settings<br/>[Appearance.vue]"]
  node_twofactor_composable["Two-Factor Logic"]
  node_appearance_composable["Appearance Logic<br/>[useAppearance.ts]"]
end

node_person(("User"))

node_person -->|"requests settings"| node_routes
node_routes -->|"dispatches profile"| node_profile
node_routes -->|"dispatches security"| node_security
node_profile -->|"validates with"| node_profile_requests
node_security -->|"validates with"| node_twofactor_request
node_profile -->|"updates account"| node_user
node_security -->|"updates password"| node_user
node_fortify -->|"registers action"| node_registration
node_registration -->|"uses rules"| node_profile_rules
node_registration -->|"creates account"| node_user
node_person -.->|"uses auth screens"| node_auth_pages
node_person -.->|"views dashboard"| node_dashboard
node_person -.->|"views welcome"| node_welcome
node_person -.->|"manages profile"| node_profile_page
node_person -.->|"manages security"| node_security_page
node_person -.->|"sets appearance"| node_appearance_page
node_security_page -.->|"uses two-factor"| node_twofactor_composable
node_appearance_page -.->|"uses appearance"| node_appearance_composable

click node_routes "https://github.com/mainskybird/village/blob/main/routes/settings.php"
click node_profile "https://github.com/mainskybird/village/blob/main/app/Http/Controllers/Settings/ProfileController.php"
click node_security "https://github.com/mainskybird/village/blob/main/app/Http/Controllers/Settings/SecurityController.php"
click node_profile_requests "https://github.com/mainskybird/village/tree/main/app/Http/Requests/Settings"
click node_twofactor_request "https://github.com/mainskybird/village/blob/main/app/Http/Requests/Settings/TwoFactorAuthenticationRequest.php"
click node_middleware "https://github.com/mainskybird/village/blob/main/app/Http/Middleware/HandleInertiaRequests.php"
click node_appearance_middleware "https://github.com/mainskybird/village/blob/main/app/Http/Middleware/HandleAppearance.php"
click node_fortify "https://github.com/mainskybird/village/blob/main/app/Providers/FortifyServiceProvider.php"
click node_registration "https://github.com/mainskybird/village/blob/main/app/Actions/Fortify/CreateNewUser.php"
click node_profile_rules "https://github.com/mainskybird/village/blob/main/app/Concerns/ProfileValidationRules.php"
click node_user "https://github.com/mainskybird/village/blob/main/app/Models/User.php"
click node_dashboard "https://github.com/mainskybird/village/blob/main/resources/js/pages/Dashboard.vue"
click node_welcome "https://github.com/mainskybird/village/blob/main/resources/js/pages/Welcome.vue"
click node_auth_pages "https://github.com/mainskybird/village/tree/main/resources/js/pages/auth"
click node_profile_page "https://github.com/mainskybird/village/blob/main/resources/js/pages/settings/Profile.vue"
click node_security_page "https://github.com/mainskybird/village/blob/main/resources/js/pages/settings/Security.vue"
click node_appearance_page "https://github.com/mainskybird/village/blob/main/resources/js/pages/settings/Appearance.vue"
click node_twofactor_composable "https://github.com/mainskybird/village/blob/main/resources/js/composables/useTwoFactorAuth.ts"
click node_appearance_composable "https://github.com/mainskybird/village/blob/main/resources/js/composables/useAppearance.ts"

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_routes,node_profile,node_security,node_profile_requests,node_twofactor_request,node_middleware,node_appearance_middleware,node_person toneBlue
class node_fortify,node_registration,node_profile_rules,node_user toneAmber
class node_dashboard,node_welcome,node_auth_pages,node_profile_page,node_security_page,node_appearance_page,node_twofactor_composable,node_appearance_composable toneMint
```

## Components

### HTTP and Settings

- [Settings Routes](https://github.com/mainskybird/village/blob/main/routes/settings.php): `routes/settings.php`
- [Profile Controller](https://github.com/mainskybird/village/blob/main/app/Http/Controllers/Settings/ProfileController.php): `app/Http/Controllers/Settings/ProfileController.php`
- [Security Controller](https://github.com/mainskybird/village/blob/main/app/Http/Controllers/Settings/SecurityController.php): `app/Http/Controllers/Settings/SecurityController.php`
- [Profile Requests](https://github.com/mainskybird/village/tree/main/app/Http/Requests/Settings): `app/Http/Requests/Settings`
- [Two-Factor Request](https://github.com/mainskybird/village/blob/main/app/Http/Requests/Settings/TwoFactorAuthenticationRequest.php): `app/Http/Requests/Settings/TwoFactorAuthenticationRequest.php`
- [Inertia Middleware](https://github.com/mainskybird/village/blob/main/app/Http/Middleware/HandleInertiaRequests.php): `app/Http/Middleware/HandleInertiaRequests.php`
- [Appearance Middleware](https://github.com/mainskybird/village/blob/main/app/Http/Middleware/HandleAppearance.php): `app/Http/Middleware/HandleAppearance.php`

### Identity and Auth

- [Fortify Setup](https://github.com/mainskybird/village/blob/main/app/Providers/FortifyServiceProvider.php): `app/Providers/FortifyServiceProvider.php`
- [Registration Action](https://github.com/mainskybird/village/blob/main/app/Actions/Fortify/CreateNewUser.php): `app/Actions/Fortify/CreateNewUser.php`
- [Profile Rules](https://github.com/mainskybird/village/blob/main/app/Concerns/ProfileValidationRules.php): `app/Concerns/ProfileValidationRules.php`
- [User Account](https://github.com/mainskybird/village/blob/main/app/Models/User.php): `app/Models/User.php`

### Vue Application

- [Dashboard](https://github.com/mainskybird/village/blob/main/resources/js/pages/Dashboard.vue): `resources/js/pages/Dashboard.vue`
- [Welcome Page](https://github.com/mainskybird/village/blob/main/resources/js/pages/Welcome.vue): `resources/js/pages/Welcome.vue`
- [Auth Pages](https://github.com/mainskybird/village/tree/main/resources/js/pages/auth): `resources/js/pages/auth`
- [Profile Settings](https://github.com/mainskybird/village/blob/main/resources/js/pages/settings/Profile.vue): `resources/js/pages/settings/Profile.vue`
- [Security Settings](https://github.com/mainskybird/village/blob/main/resources/js/pages/settings/Security.vue): `resources/js/pages/settings/Security.vue`
- [Appearance Settings](https://github.com/mainskybird/village/blob/main/resources/js/pages/settings/Appearance.vue): `resources/js/pages/settings/Appearance.vue`
- [Two-Factor Logic](https://github.com/mainskybird/village/blob/main/resources/js/composables/useTwoFactorAuth.ts): `resources/js/composables/useTwoFactorAuth.ts`
- [Appearance Logic](https://github.com/mainskybird/village/blob/main/resources/js/composables/useAppearance.ts): `resources/js/composables/useAppearance.ts`

### Other components

- **User**

## Connections

- User → Settings Routes: requests settings (evidence: `routes/settings.php`)
- Settings Routes → Profile Controller: dispatches profile (evidence: `routes/settings.php`)
- Settings Routes → Security Controller: dispatches security (evidence: `routes/settings.php`)
- Profile Controller → Profile Requests: validates with (evidence: `app/Http/Controllers/Settings/ProfileController.php`)
- Security Controller → Two-Factor Request: validates with (evidence: `app/Http/Controllers/Settings/SecurityController.php`)
- Profile Controller → User Account: updates account (evidence: `app/Http/Controllers/Settings/ProfileController.php`)
- Security Controller → User Account: updates password (evidence: `app/Http/Controllers/Settings/SecurityController.php`)
- Fortify Setup → Registration Action: registers action (evidence: `app/Providers/FortifyServiceProvider.php`)
- Registration Action → Profile Rules: uses rules (evidence: `app/Actions/Fortify/CreateNewUser.php`)
- Registration Action → User Account: creates account (evidence: `app/Actions/Fortify/CreateNewUser.php`)
- User → Auth Pages: uses auth screens
- User → Dashboard: views dashboard
- User → Welcome Page: views welcome
- User → Profile Settings: manages profile
- User → Security Settings: manages security
- User → Appearance Settings: sets appearance
- Security Settings → Two-Factor Logic: uses two-factor
- Appearance Settings → Appearance Logic: uses appearance
