# aye-nyein-thaw/pinbook architecture

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

- Interactive diagram: https://gitdiagram.com/aye-nyein-thaw/pinbook
- Repository: https://github.com/aye-nyein-thaw/pinbook

## Overview

This Laravel educational starter exposes a small travel-trip application alongside scaffolded account workflows. A browser request enters Laravel’s web routing, which dispatches trip, dashboard, profile, or authentication actions; controllers return Blade views or update account state. The travel domain is represented by related Eloquent models, while public trip browsing queries trips marked public. Authentication includes registration, login, email verification, password reset, and password management; several individual handlers are unsampled, so those are represented as a subsystem. Relationships are limited to route, call, and model links evidenced by excerpts or the source index.

Main entry points: [`app/Models/Trip.php`](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/Trip.php) (Trip), [`app/Models/User.php`](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/User.php) (User account), [`routes/web.php`](https://github.com/aye-nyein-thaw/pinbook/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/Userzone/ProfileController.php`](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Controllers/Userzone/ProfileController.php) (Profile management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and views"]
  node_bootstrap["Laravel bootstrap<br/>[app.php]"]
  node_web_routes["Web routes<br/>[web.php]"]
end

subgraph group_accounts["Accounts and profile"]
  node_dashboard_controller["User dashboard"]
  node_dashboard_view["Dashboard view"]
  node_profile_controller["Profile management"]
  node_profile_request["Profile validation"]
  node_profile_view["Profile form<br/>[edit.blade.php]"]
  node_auth_routes["Authentication routes<br/>[auth.php]"]
  node_auth_handlers["Auth workflows"]
  node_login_request["Login validation<br/>[LoginRequest.php]"]
  node_register_view["Registration form<br/>[register.blade.php]"]
end

subgraph group_travel["Travel domain"]
  node_trip_controller["Trip browsing<br/>[TripController.php]"]
  node_trip_view["Public trip view<br/>[index.blade.php]"]
end

subgraph group_data["Domain data"]
  node_user[("User account<br/>[User.php]")]
  node_trip[("Trip<br/>[Trip.php]")]
  node_place[("Place<br/>[Place.php]")]
  node_category[("Category<br/>[Category.php]")]
  node_comment[("Comment<br/>[Comment.php]")]
  node_trip_factory["Trip factory<br/>[TripFactory.php]"]
  node_place_factory["Place factory<br/>[PlaceFactory.php]"]
  node_user_factory["User factory<br/>[UserFactory.php]"]
end

node_browser(("Browser visitor"))

node_browser -->|"sends request"| node_bootstrap
node_bootstrap -->|"loads routes"| node_web_routes
node_web_routes -->|"dispatches to"| node_trip_controller
node_web_routes -->|"dispatches to"| node_dashboard_controller
node_web_routes -->|"dispatches to"| node_profile_controller
node_web_routes -->|"includes routes"| node_auth_routes
node_trip_controller -->|"queries public"| node_trip
node_trip_controller -->|"renders"| node_trip_view
node_dashboard_controller -->|"renders"| node_dashboard_view
node_profile_controller -->|"validates with"| node_profile_request
node_profile_controller -->|"renders"| node_profile_view
node_auth_routes -->|"dispatches to"| node_auth_handlers
node_auth_handlers -->|"authenticates with"| node_login_request
node_auth_handlers -->|"renders"| node_register_view
node_auth_handlers -->|"creates account"| node_user
node_profile_controller -->|"updates account"| node_user
node_user -->|"has many"| node_trip
node_user -->|"has many"| node_comment
node_trip -->|"belongs to"| node_user
node_trip -->|"has many"| node_place
node_trip -->|"has many"| node_comment
node_place -->|"belongs to"| node_trip
node_place -->|"categorized by"| node_category
node_trip_factory -->|"builds"| node_trip
node_place_factory -->|"builds"| node_place
node_user_factory -->|"builds"| node_user

click node_bootstrap "https://github.com/aye-nyein-thaw/pinbook/blob/main/bootstrap/app.php"
click node_web_routes "https://github.com/aye-nyein-thaw/pinbook/blob/main/routes/web.php"
click node_trip_controller "https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Controllers/TripController.php"
click node_trip_view "https://github.com/aye-nyein-thaw/pinbook/blob/main/resources/views/trips/index.blade.php"
click node_dashboard_controller "https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Controllers/Userzone/DashboardController.php"
click node_dashboard_view "https://github.com/aye-nyein-thaw/pinbook/blob/main/resources/views/userzone/dashboard.blade.php"
click node_profile_controller "https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Controllers/Userzone/ProfileController.php"
click node_profile_request "https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Requests/ProfileUpdateRequest.php"
click node_profile_view "https://github.com/aye-nyein-thaw/pinbook/blob/main/resources/views/userzone/profile/edit.blade.php"
click node_auth_routes "https://github.com/aye-nyein-thaw/pinbook/blob/main/routes/auth.php"
click node_auth_handlers "https://github.com/aye-nyein-thaw/pinbook/tree/main/app/Http/Controllers/Auth"
click node_login_request "https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Requests/Auth/LoginRequest.php"
click node_register_view "https://github.com/aye-nyein-thaw/pinbook/blob/main/resources/views/auth/register.blade.php"
click node_user "https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/User.php"
click node_trip "https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/Trip.php"
click node_place "https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/Place.php"
click node_category "https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/Category.php"
click node_comment "https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/Comment.php"
click node_trip_factory "https://github.com/aye-nyein-thaw/pinbook/blob/main/database/factories/TripFactory.php"
click node_place_factory "https://github.com/aye-nyein-thaw/pinbook/blob/main/database/factories/PlaceFactory.php"
click node_user_factory "https://github.com/aye-nyein-thaw/pinbook/blob/main/database/factories/UserFactory.php"

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_bootstrap,node_web_routes,node_browser toneBlue
class node_dashboard_controller,node_dashboard_view,node_profile_controller,node_profile_request,node_profile_view,node_auth_routes,node_auth_handlers,node_login_request,node_register_view toneAmber
class node_trip_controller,node_trip_view toneMint
class node_user,node_trip,node_place,node_category,node_comment,node_trip_factory,node_place_factory,node_user_factory toneRose
```

## Components

### Web entry and views

- [Laravel bootstrap](https://github.com/aye-nyein-thaw/pinbook/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [Web routes](https://github.com/aye-nyein-thaw/pinbook/blob/main/routes/web.php): `routes/web.php`

### Accounts and profile

- [User dashboard](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Controllers/Userzone/DashboardController.php): `app/Http/Controllers/Userzone/DashboardController.php`
- [Dashboard view](https://github.com/aye-nyein-thaw/pinbook/blob/main/resources/views/userzone/dashboard.blade.php): `resources/views/userzone/dashboard.blade.php`
- [Profile management](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Controllers/Userzone/ProfileController.php): `app/Http/Controllers/Userzone/ProfileController.php`
- [Profile validation](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Requests/ProfileUpdateRequest.php): `app/Http/Requests/ProfileUpdateRequest.php`
- [Profile form](https://github.com/aye-nyein-thaw/pinbook/blob/main/resources/views/userzone/profile/edit.blade.php): `resources/views/userzone/profile/edit.blade.php`
- [Authentication routes](https://github.com/aye-nyein-thaw/pinbook/blob/main/routes/auth.php): `routes/auth.php`
- [Auth workflows](https://github.com/aye-nyein-thaw/pinbook/tree/main/app/Http/Controllers/Auth): `app/Http/Controllers/Auth`
- [Login validation](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Requests/Auth/LoginRequest.php): `app/Http/Requests/Auth/LoginRequest.php`
- [Registration form](https://github.com/aye-nyein-thaw/pinbook/blob/main/resources/views/auth/register.blade.php): `resources/views/auth/register.blade.php`

### Travel domain

- [Trip browsing](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Http/Controllers/TripController.php): `app/Http/Controllers/TripController.php`
- [Public trip view](https://github.com/aye-nyein-thaw/pinbook/blob/main/resources/views/trips/index.blade.php): `resources/views/trips/index.blade.php`

### Domain data

- [User account](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/User.php): `app/Models/User.php`
- [Trip](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/Trip.php): `app/Models/Trip.php`
- [Place](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/Place.php): `app/Models/Place.php`
- [Category](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/Category.php): `app/Models/Category.php`
- [Comment](https://github.com/aye-nyein-thaw/pinbook/blob/main/app/Models/Comment.php): `app/Models/Comment.php`
- [Trip factory](https://github.com/aye-nyein-thaw/pinbook/blob/main/database/factories/TripFactory.php): `database/factories/TripFactory.php`
- [Place factory](https://github.com/aye-nyein-thaw/pinbook/blob/main/database/factories/PlaceFactory.php): `database/factories/PlaceFactory.php`
- [User factory](https://github.com/aye-nyein-thaw/pinbook/blob/main/database/factories/UserFactory.php): `database/factories/UserFactory.php`

### Other components

- **Browser visitor**

## Connections

- Browser visitor → Laravel bootstrap: sends request
- Laravel bootstrap → Web routes: loads routes (evidence: `bootstrap/app.php`)
- Web routes → Trip browsing: dispatches to (evidence: `routes/web.php`)
- Web routes → User dashboard: dispatches to (evidence: `routes/web.php`)
- Web routes → Profile management: dispatches to (evidence: `routes/web.php`)
- Web routes → Authentication routes: includes routes (evidence: `routes/web.php`)
- Trip browsing → Trip: queries public (evidence: `app/Http/Controllers/TripController.php`)
- Trip browsing → Public trip view: renders (evidence: `app/Http/Controllers/TripController.php`)
- User dashboard → Dashboard view: renders (evidence: `app/Http/Controllers/Userzone/DashboardController.php`)
- Profile management → Profile validation: validates with (evidence: `app/Http/Controllers/Userzone/ProfileController.php`)
- Profile management → Profile form: renders (evidence: `app/Http/Controllers/Userzone/ProfileController.php`)
- Authentication routes → Auth workflows: dispatches to (evidence: `routes/auth.php`)
- Auth workflows → Login validation: authenticates with (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Auth workflows → Registration form: renders (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Auth workflows → User account: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Profile management → User account: updates account (evidence: `app/Http/Controllers/Userzone/ProfileController.php`)
- User account → Trip: has many (evidence: `app/Models/User.php`)
- User account → Comment: has many (evidence: `app/Models/User.php`)
- Trip → User account: belongs to (evidence: `app/Models/Trip.php`)
- Trip → Place: has many (evidence: `app/Models/Trip.php`)
- Trip → Comment: has many (evidence: `app/Models/Trip.php`)
- Place → Trip: belongs to (evidence: `app/Models/Place.php`)
- Place → Category: categorized by (evidence: `app/Models/Category.php`)
- Trip factory → Trip: builds (evidence: `database/factories/TripFactory.php`)
- Place factory → Place: builds (evidence: `app/Models/Place.php`)
- User factory → User account: builds (evidence: `database/factories/UserFactory.php`)
