# danielcahya/movie-website architecture

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

- Interactive diagram: https://gitdiagram.com/danielcahya/movie-website
- Repository: https://github.com/danielcahya/movie-website

## Overview

Galiwe is a Laravel media-discovery site for movies, TV and anime, backed by TMDB, with user accounts and community features. A typical visit enters through Laravel’s web routing, reaches a controller, and returns a page; the sampled AdminController explicitly fetches and caches TMDB listings before rendering catalog pages. The tree also documents search, media details, profiles, watchlists, forums and administration. Their individual wiring is not sampled, so those branches are represented without speculative call chains.

Main entry points: [`routes/web.php`](https://github.com/danielcahya/movie-website/blob/master/routes/web.php) (Web routes), [`app/Http/Controllers/AdminController.php`](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/AdminController.php) (Catalog controller), [`app/Http/Controllers/MediaCommentController.php`](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/MediaCommentController.php) (Media comments), [`app/Http/Controllers/LoginController.php`](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/LoginController.php) (Login and users)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Media discovery"]
  node_admin_controller["Catalog controller"]
  node_search["Live search<br/>[Search.php]"]
  node_show_controller["Media details<br/>[ShowController.php]"]
  node_catalog_views["Catalog pages<br/>[index.blade.php]"]
  node_animation_view["Anime page"]
  node_detail_view["Details page<br/>[show.blade.php]"]
  node_search_view["Search page<br/>[search.blade.php]"]
end

subgraph group_community["Community features"]
  node_profile_controller["Profile controller"]
  node_follow_controller["Follow controller"]
  node_watchlist_controller["Watchlist controller"]
  node_forum_controller["Forum controller"]
  node_comment_controller["Media comments"]
  node_profile_views["Profile pages<br/>[show.blade.php]"]
  node_forum_views["Forum pages<br/>[index.blade.php]"]
  node_comment_view["Comment section<br/>[comments.blade.php]"]
end

subgraph group_accounts["Accounts and admin"]
  node_login_controller["Login and users"]
  node_admin_view["Admin dashboard<br/>[admin.blade.php]"]
end

subgraph group_runtime["Application runtime"]
  node_routes["Web routes<br/>[web.php]"]
  node_router["Route provider"]
  node_user_model["User model<br/>[User.php]"]
  node_media_comment_model["Comment model<br/>[MediaComment.php]"]
  node_comment_like_model["Reaction model<br/>[CommentLike.php]"]
end

node_visitor(("Visitor"))
node_tmdb{{"TMDB API"}}
node_cache[("Redis cache")]
node_mysql[("Application database")]

node_visitor -->|"sends request"| node_router
node_router -->|"loads routes"| node_routes
node_routes -->|"dispatches"| node_admin_controller
node_routes -->|"dispatches"| node_search
node_routes -->|"dispatches"| node_show_controller
node_routes -->|"dispatches"| node_profile_controller
node_routes -->|"dispatches"| node_follow_controller
node_routes -->|"dispatches"| node_watchlist_controller
node_routes -->|"dispatches"| node_forum_controller
node_routes -->|"dispatches"| node_comment_controller
node_routes -->|"dispatches"| node_login_controller
node_admin_controller -->|"requests listings"| node_tmdb
node_admin_controller -->|"reads and writes"| node_cache
node_admin_controller -->|"renders catalog"| node_catalog_views
node_admin_controller -->|"renders anime"| node_animation_view
node_search -->|"renders results"| node_search_view
node_show_controller -->|"renders details"| node_detail_view
node_profile_controller -->|"renders profile"| node_profile_views
node_forum_controller -->|"renders forum"| node_forum_views
node_comment_controller -->|"renders comments"| node_comment_view
node_comment_controller -->|"creates and updates"| node_media_comment_model
node_comment_controller -->|"manages reactions"| node_comment_like_model
node_login_controller -->|"reads and writes"| node_user_model
node_login_controller -->|"renders user list"| node_admin_view
node_media_comment_model -->|"persists comments"| node_mysql
node_comment_like_model -->|"persists reactions"| node_mysql
node_user_model -->|"persists users"| node_mysql

click node_routes "https://github.com/danielcahya/movie-website/blob/master/routes/web.php"
click node_router "https://github.com/danielcahya/movie-website/blob/master/app/Providers/RouteServiceProvider.php"
click node_admin_controller "https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/AdminController.php"
click node_search "https://github.com/danielcahya/movie-website/blob/master/app/Http/Livewire/Search.php"
click node_show_controller "https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/ShowController.php"
click node_catalog_views "https://github.com/danielcahya/movie-website/blob/master/resources/views/movies/index.blade.php"
click node_animation_view "https://github.com/danielcahya/movie-website/blob/master/resources/views/Animation/animation.blade.php"
click node_detail_view "https://github.com/danielcahya/movie-website/blob/master/resources/views/details/show.blade.php"
click node_search_view "https://github.com/danielcahya/movie-website/blob/master/resources/views/livewire/search.blade.php"
click node_profile_controller "https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/ProfileController.php"
click node_follow_controller "https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/FollowController.php"
click node_watchlist_controller "https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/WatchlistController.php"
click node_forum_controller "https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/ForumController.php"
click node_comment_controller "https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/MediaCommentController.php"
click node_profile_views "https://github.com/danielcahya/movie-website/blob/master/resources/views/profile/show.blade.php"
click node_forum_views "https://github.com/danielcahya/movie-website/blob/master/resources/views/forum/index.blade.php"
click node_comment_view "https://github.com/danielcahya/movie-website/blob/master/resources/views/details/partials/comments.blade.php"
click node_login_controller "https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/LoginController.php"
click node_admin_view "https://github.com/danielcahya/movie-website/blob/master/resources/views/Admin/admin.blade.php"
click node_user_model "https://github.com/danielcahya/movie-website/blob/master/app/Models/User.php"
click node_media_comment_model "https://github.com/danielcahya/movie-website/blob/master/app/Models/MediaComment.php"
click node_comment_like_model "https://github.com/danielcahya/movie-website/blob/master/app/Models/CommentLike.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_admin_controller,node_search,node_show_controller,node_catalog_views,node_animation_view,node_detail_view,node_search_view toneBlue
class node_profile_controller,node_follow_controller,node_watchlist_controller,node_forum_controller,node_comment_controller,node_profile_views,node_forum_views,node_comment_view,node_cache,node_mysql toneAmber
class node_login_controller,node_admin_view,node_tmdb toneMint
class node_routes,node_router,node_user_model,node_media_comment_model,node_comment_like_model toneRose
class node_visitor toneIndigo
```

## Components

### Media discovery

- [Catalog controller](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/AdminController.php): `app/Http/Controllers/AdminController.php`
- [Live search](https://github.com/danielcahya/movie-website/blob/master/app/Http/Livewire/Search.php): `app/Http/Livewire/Search.php`
- [Media details](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/ShowController.php): `app/Http/Controllers/ShowController.php`
- [Catalog pages](https://github.com/danielcahya/movie-website/blob/master/resources/views/movies/index.blade.php): `resources/views/movies/index.blade.php`
- [Anime page](https://github.com/danielcahya/movie-website/blob/master/resources/views/Animation/animation.blade.php): `resources/views/Animation/animation.blade.php`
- [Details page](https://github.com/danielcahya/movie-website/blob/master/resources/views/details/show.blade.php): `resources/views/details/show.blade.php`
- [Search page](https://github.com/danielcahya/movie-website/blob/master/resources/views/livewire/search.blade.php): `resources/views/livewire/search.blade.php`

### Community features

- [Profile controller](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/ProfileController.php): `app/Http/Controllers/ProfileController.php`
- [Follow controller](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/FollowController.php): `app/Http/Controllers/FollowController.php`
- [Watchlist controller](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/WatchlistController.php): `app/Http/Controllers/WatchlistController.php`
- [Forum controller](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/ForumController.php): `app/Http/Controllers/ForumController.php`
- [Media comments](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/MediaCommentController.php): `app/Http/Controllers/MediaCommentController.php`
- [Profile pages](https://github.com/danielcahya/movie-website/blob/master/resources/views/profile/show.blade.php): `resources/views/profile/show.blade.php`
- [Forum pages](https://github.com/danielcahya/movie-website/blob/master/resources/views/forum/index.blade.php): `resources/views/forum/index.blade.php`
- [Comment section](https://github.com/danielcahya/movie-website/blob/master/resources/views/details/partials/comments.blade.php): `resources/views/details/partials/comments.blade.php`

### Accounts and admin

- [Login and users](https://github.com/danielcahya/movie-website/blob/master/app/Http/Controllers/LoginController.php): `app/Http/Controllers/LoginController.php`
- [Admin dashboard](https://github.com/danielcahya/movie-website/blob/master/resources/views/Admin/admin.blade.php): `resources/views/Admin/admin.blade.php`

### Application runtime

- [Web routes](https://github.com/danielcahya/movie-website/blob/master/routes/web.php): `routes/web.php`
- [Route provider](https://github.com/danielcahya/movie-website/blob/master/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [User model](https://github.com/danielcahya/movie-website/blob/master/app/Models/User.php): `app/Models/User.php`
- [Comment model](https://github.com/danielcahya/movie-website/blob/master/app/Models/MediaComment.php): `app/Models/MediaComment.php`
- [Reaction model](https://github.com/danielcahya/movie-website/blob/master/app/Models/CommentLike.php): `app/Models/CommentLike.php`

### Other components

- **Visitor**
- **TMDB API**
- **Redis cache**
- **Application database**

## Connections

- Visitor → Route provider: sends request
- Route provider → Web routes: loads routes
- Web routes → Catalog controller: dispatches
- Web routes → Live search: dispatches
- Web routes → Media details: dispatches
- Web routes → Profile controller: dispatches
- Web routes → Follow controller: dispatches
- Web routes → Watchlist controller: dispatches
- Web routes → Forum controller: dispatches
- Web routes → Media comments: dispatches
- Web routes → Login and users: dispatches
- Catalog controller → TMDB API: requests listings
- Catalog controller → Redis cache: reads and writes
- Catalog controller → Catalog pages: renders catalog
- Catalog controller → Anime page: renders anime
- Live search → Search page: renders results
- Media details → Details page: renders details
- Profile controller → Profile pages: renders profile
- Forum controller → Forum pages: renders forum
- Media comments → Comment section: renders comments
- Media comments → Comment model: creates and updates
- Media comments → Reaction model: manages reactions
- Login and users → User model: reads and writes
- Login and users → Admin dashboard: renders user list
- Comment model → Application database: persists comments
- Reaction model → Application database: persists reactions
- User model → Application database: persists users
