# danishalfarisy/mandalaswara architecture

> Architecture diagram of the GitHub repository danishalfarisy/mandalaswara, 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/danishalfarisy/mandalaswara
- Repository: https://github.com/danishalfarisy/mandalaswara

## Overview

Mandalaswara is a Laravel news and opinion portal. Visitors browse, search, filter, and read news; users can register or sign in, while admins manage news and categories and members submit opinions. The controllers show these workflows using Eloquent models and Blade views, with persistence configured for MySQL. The route file and several views are listed but were not sampled, so specific route-to-action mappings and some presentation details are not asserted.

Main entry points: [`routes/web.php`](https://github.com/danishalfarisy/mandalaswara/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/BeritaController.php`](https://github.com/danishalfarisy/mandalaswara/blob/main/app/Http/Controllers/BeritaController.php) (News workflow), [`config/database.php`](https://github.com/danishalfarisy/mandalaswara/blob/main/config/database.php) (MySQL database), [`app/Http/Controllers/AuthController.php`](https://github.com/danishalfarisy/mandalaswara/blob/main/app/Http/Controllers/AuthController.php) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_web_routes["Web routes<br/>[web.php]"]
end

subgraph group_identity["Accounts"]
  node_auth_controller["Authentication<br/>[AuthController.php]"]
  node_user_model["User model<br/>[User.php]"]
  node_auth_views["Auth pages<br/>[login.blade.php]"]
end

subgraph group_news["News publishing"]
  node_news_controller["News workflow"]
  node_category_controller["Category management"]
  node_news_model["News model<br/>[Berita.php]"]
  node_category_model["Category model<br/>[Kategori.php]"]
  node_public_news_views["News pages<br/>[index.blade.php]"]
  node_admin_news_views["Admin news pages<br/>[index.blade.php]"]
  node_category_views["Category pages<br/>[index.blade.php]"]
end

subgraph group_opinions["Member opinions"]
  node_opinion_controller["Opinion workflow"]
  node_opinion_model["Opinion model<br/>[Opini.php]"]
  node_opinion_views["Member opinion pages<br/>[index.blade.php]"]
end

subgraph group_data["Persistence"]
  node_database[("MySQL database<br/>[database.php]")]
end

node_visitor(("Visitor"))
node_member(("Member"))
node_admin(("Admin"))

node_visitor -->|"requests pages"| node_web_routes
node_member -->|"requests actions"| node_web_routes
node_admin -->|"requests actions"| node_web_routes
node_web_routes -->|"dispatches"| node_auth_controller
node_web_routes -->|"dispatches"| node_news_controller
node_web_routes -->|"dispatches"| node_category_controller
node_web_routes -->|"dispatches"| node_opinion_controller
node_auth_controller -->|"reads and writes"| node_user_model
node_auth_controller -->|"renders"| node_auth_views
node_news_controller -->|"queries and writes"| node_news_model
node_news_controller -->|"queries"| node_category_model
node_news_controller -->|"renders"| node_public_news_views
node_news_controller -->|"renders"| node_admin_news_views
node_category_controller -->|"queries and writes"| node_category_model
node_category_controller -->|"renders"| node_category_views
node_opinion_controller -->|"queries and writes"| node_opinion_model
node_opinion_controller -->|"renders"| node_opinion_views
node_user_model -->|"persists data"| node_database
node_news_model -->|"persists data"| node_database
node_category_model -->|"persists data"| node_database
node_opinion_model -->|"persists data"| node_database

click node_web_routes "https://github.com/danishalfarisy/mandalaswara/blob/main/routes/web.php"
click node_auth_controller "https://github.com/danishalfarisy/mandalaswara/blob/main/app/Http/Controllers/AuthController.php"
click node_user_model "https://github.com/danishalfarisy/mandalaswara/blob/main/app/Models/User.php"
click node_auth_views "https://github.com/danishalfarisy/mandalaswara/blob/main/resources/views/auth/login.blade.php"
click node_news_controller "https://github.com/danishalfarisy/mandalaswara/blob/main/app/Http/Controllers/BeritaController.php"
click node_category_controller "https://github.com/danishalfarisy/mandalaswara/blob/main/app/Http/Controllers/KategoriController.php"
click node_news_model "https://github.com/danishalfarisy/mandalaswara/blob/main/app/Models/Berita.php"
click node_category_model "https://github.com/danishalfarisy/mandalaswara/blob/main/app/Models/Kategori.php"
click node_public_news_views "https://github.com/danishalfarisy/mandalaswara/blob/main/resources/views/berita/index.blade.php"
click node_admin_news_views "https://github.com/danishalfarisy/mandalaswara/blob/main/resources/views/admin/berita/index.blade.php"
click node_category_views "https://github.com/danishalfarisy/mandalaswara/blob/main/resources/views/admin/kategori/index.blade.php"
click node_opinion_controller "https://github.com/danishalfarisy/mandalaswara/blob/main/app/Http/Controllers/OpiniController.php"
click node_opinion_model "https://github.com/danishalfarisy/mandalaswara/blob/main/app/Models/Opini.php"
click node_opinion_views "https://github.com/danishalfarisy/mandalaswara/blob/main/resources/views/member/opini/index.blade.php"
click node_database "https://github.com/danishalfarisy/mandalaswara/blob/main/config/database.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_web_routes toneBlue
class node_auth_controller,node_user_model,node_auth_views toneAmber
class node_news_controller,node_category_controller,node_news_model,node_category_model,node_public_news_views,node_admin_news_views,node_category_views toneMint
class node_opinion_controller,node_opinion_model,node_opinion_views toneRose
class node_database,node_visitor,node_member,node_admin toneIndigo
```

## Components

### Web entry

- [Web routes](https://github.com/danishalfarisy/mandalaswara/blob/main/routes/web.php): `routes/web.php`

### Accounts

- [Authentication](https://github.com/danishalfarisy/mandalaswara/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [User model](https://github.com/danishalfarisy/mandalaswara/blob/main/app/Models/User.php): `app/Models/User.php`
- [Auth pages](https://github.com/danishalfarisy/mandalaswara/blob/main/resources/views/auth/login.blade.php): `resources/views/auth/login.blade.php`

### News publishing

- [News workflow](https://github.com/danishalfarisy/mandalaswara/blob/main/app/Http/Controllers/BeritaController.php): `app/Http/Controllers/BeritaController.php`
- [Category management](https://github.com/danishalfarisy/mandalaswara/blob/main/app/Http/Controllers/KategoriController.php): `app/Http/Controllers/KategoriController.php`
- [News model](https://github.com/danishalfarisy/mandalaswara/blob/main/app/Models/Berita.php): `app/Models/Berita.php`
- [Category model](https://github.com/danishalfarisy/mandalaswara/blob/main/app/Models/Kategori.php): `app/Models/Kategori.php`
- [News pages](https://github.com/danishalfarisy/mandalaswara/blob/main/resources/views/berita/index.blade.php): `resources/views/berita/index.blade.php`
- [Admin news pages](https://github.com/danishalfarisy/mandalaswara/blob/main/resources/views/admin/berita/index.blade.php): `resources/views/admin/berita/index.blade.php`
- [Category pages](https://github.com/danishalfarisy/mandalaswara/blob/main/resources/views/admin/kategori/index.blade.php): `resources/views/admin/kategori/index.blade.php`

### Member opinions

- [Opinion workflow](https://github.com/danishalfarisy/mandalaswara/blob/main/app/Http/Controllers/OpiniController.php): `app/Http/Controllers/OpiniController.php`
- [Opinion model](https://github.com/danishalfarisy/mandalaswara/blob/main/app/Models/Opini.php): `app/Models/Opini.php`
- [Member opinion pages](https://github.com/danishalfarisy/mandalaswara/blob/main/resources/views/member/opini/index.blade.php): `resources/views/member/opini/index.blade.php`

### Persistence

- [MySQL database](https://github.com/danishalfarisy/mandalaswara/blob/main/config/database.php): `config/database.php`

### Other components

- **Visitor**
- **Member**
- **Admin**

## Connections

- Visitor → Web routes: requests pages
- Member → Web routes: requests actions
- Admin → Web routes: requests actions
- Web routes → Authentication: dispatches
- Web routes → News workflow: dispatches
- Web routes → Category management: dispatches
- Web routes → Opinion workflow: dispatches
- Authentication → User model: reads and writes
- Authentication → Auth pages: renders
- News workflow → News model: queries and writes
- News workflow → Category model: queries
- News workflow → News pages: renders
- News workflow → Admin news pages: renders
- Category management → Category model: queries and writes
- Category management → Category pages: renders
- Opinion workflow → Opinion model: queries and writes
- Opinion workflow → Member opinion pages: renders
- User model → MySQL database: persists data
- News model → MySQL database: persists data
- Category model → MySQL database: persists data
- Opinion model → MySQL database: persists data
