# muhammadnadhar/news-web-ti architecture

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

- Interactive diagram: https://gitdiagram.com/muhammadnadhar/news-web-ti
- Repository: https://github.com/muhammadnadhar/news-web-ti

## Overview

News TI is a university department website paired with an administrative content-management panel. Visitors browse news and departmental information; administrators sign in, manage users and structured content, and maintain dashboard data. The sampled server routes show page-load and action calls into repositories, including news, student achievement, profile, and user flows. The README documents MySQL and Cloudinary; repository internals and most feature-specific route handlers were not sampled, so their detailed wiring is not asserted.

Main entry points: [`src/routes/(main)`](https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(main)) (Public Pages), [`src/routes/(main)/+page.server.ts`](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(main)/%2Bpage.server.ts) (Home Loader), [`src/routes/(admin)/admin/user/profil/+page.server.ts`](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(admin)/admin/user/profil/%2Bpage.server.ts) (User Profile), [`src/lib/repository/admin/userAdmin.ts`](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/userAdmin.ts) (User Repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Website"]
  node_public_pages["Public Pages"]
  node_home_load["Home Loader<br/>[+page.server.ts]"]
  node_news_load["News Loader<br/>[+page.server.ts]"]
  node_achievement_load["Achievement Loader<br/>[+page.server.ts]"]
  node_history_load["History Loader<br/>[+page.server.ts]"]
end

subgraph group_admin["Admin CMS"]
  node_signin["Sign In<br/>[+page.server.ts]"]
  node_user_admin["User Management"]
  node_user_profile["User Profile<br/>[+page.server.ts]"]
  node_admin_content["Content Admin"]
  node_admin_datasets["Dataset Admin"]
  node_admin_home["Home Admin"]
end

subgraph group_domain["Content Data"]
  node_news_repo["News Repository<br/>[berita.ts]"]
  node_achievement_repo["Achievement Repository<br/>[mapres.ts]"]
  node_gpa_repo["GPA Repository<br/>[ipkTertinggi.ts]"]
  node_profile_repo["Profile Repository<br/>[sejarah.ts]"]
  node_user_repo["User Repository<br/>[userAdmin.ts]"]
  node_home_repo["Home Data Repositories"]
  node_dataset_repo["Dataset Repositories"]
end

subgraph group_infra["Infrastructure"]
  node_db[("MySQL Database<br/>[runtimeDb.ts]")]
  node_cloudinary[("Cloudinary")]
end

node_visitor(("Visitor"))
node_admin_user(("Admin User"))

node_visitor -->|"browses"| node_public_pages
node_public_pages -->|"loads"| node_home_load
node_public_pages -->|"loads"| node_news_load
node_public_pages -->|"loads"| node_achievement_load
node_public_pages -->|"loads"| node_history_load
node_home_load -->|"requests news"| node_news_repo
node_home_load -->|"requests data"| node_home_repo
node_news_load -->|"requests news"| node_news_repo
node_achievement_load -->|"requests results"| node_achievement_repo
node_history_load -->|"requests history"| node_profile_repo
node_admin_user -->|"signs in"| node_signin
node_signin -->|"finds account"| node_user_repo
node_admin_user -->|"manages users"| node_user_admin
node_user_admin -->|"reads and writes"| node_user_repo
node_admin_user -->|"updates profile"| node_user_profile
node_user_profile -->|"updates account"| node_user_repo
node_user_profile -->|"updates avatar data"| node_dataset_repo
node_admin_user -->|"edits content"| node_admin_content
node_admin_user -->|"maintains datasets"| node_admin_datasets
node_admin_user -->|"maintains homepage"| node_admin_home
node_db -.-> node_cloudinary

click node_public_pages "https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(main)"
click node_home_load "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(main)/%2Bpage.server.ts"
click node_news_load "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(main)/berita/%2Bpage.server.ts"
click node_achievement_load "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(main)/kemahasiswaan/prestasi-akademik/%2Bpage.server.ts"
click node_history_load "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(main)/profil/sejarah/%2Bpage.server.ts"
click node_signin "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(admin)/admin/signIn/%2Bpage.server.ts"
click node_user_admin "https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(admin)/admin/user"
click node_user_profile "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(admin)/admin/user/profil/%2Bpage.server.ts"
click node_admin_content "https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(admin)/admin/article"
click node_admin_datasets "https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(admin)/admin/dataset"
click node_admin_home "https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(admin)/admin/home"
click node_news_repo "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/article/berita.ts"
click node_achievement_repo "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/article/kemahasiswaan/mapres.ts"
click node_gpa_repo "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/article/kemahasiswaan/ipkTertinggi.ts"
click node_profile_repo "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/article/profile/sejarah.ts"
click node_user_repo "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/userAdmin.ts"
click node_home_repo "https://github.com/muhammadnadhar/news-web-ti/tree/main/src/lib/repository/admin/home"
click node_dataset_repo "https://github.com/muhammadnadhar/news-web-ti/tree/main/src/lib/repository/admin/dataset"
click node_db "https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/database/runtimeDb.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_public_pages,node_home_load,node_news_load,node_achievement_load,node_history_load,node_admin_user toneBlue
class node_signin,node_user_admin,node_user_profile,node_admin_content,node_admin_datasets,node_admin_home toneAmber
class node_news_repo,node_achievement_repo,node_gpa_repo,node_profile_repo,node_user_repo,node_home_repo,node_dataset_repo toneMint
class node_db,node_cloudinary toneRose
class node_visitor toneIndigo
```

## Components

### Public Website

- [Public Pages](https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(main)): `src/routes/(main)`
- [Home Loader](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(main)/%2Bpage.server.ts): `src/routes/(main)/+page.server.ts`
- [News Loader](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(main)/berita/%2Bpage.server.ts): `src/routes/(main)/berita/+page.server.ts`
- [Achievement Loader](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(main)/kemahasiswaan/prestasi-akademik/%2Bpage.server.ts): `src/routes/(main)/kemahasiswaan/prestasi-akademik/+page.server.ts`
- [History Loader](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(main)/profil/sejarah/%2Bpage.server.ts): `src/routes/(main)/profil/sejarah/+page.server.ts`

### Admin CMS

- [Sign In](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(admin)/admin/signIn/%2Bpage.server.ts): `src/routes/(admin)/admin/signIn/+page.server.ts`
- [User Management](https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(admin)/admin/user): `src/routes/(admin)/admin/user`
- [User Profile](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/routes/(admin)/admin/user/profil/%2Bpage.server.ts): `src/routes/(admin)/admin/user/profil/+page.server.ts`
- [Content Admin](https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(admin)/admin/article): `src/routes/(admin)/admin/article`
- [Dataset Admin](https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(admin)/admin/dataset): `src/routes/(admin)/admin/dataset`
- [Home Admin](https://github.com/muhammadnadhar/news-web-ti/tree/main/src/routes/(admin)/admin/home): `src/routes/(admin)/admin/home`

### Content Data

- [News Repository](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/article/berita.ts): `src/lib/repository/admin/article/berita.ts`
- [Achievement Repository](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/article/kemahasiswaan/mapres.ts): `src/lib/repository/admin/article/kemahasiswaan/mapres.ts`
- [GPA Repository](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/article/kemahasiswaan/ipkTertinggi.ts): `src/lib/repository/admin/article/kemahasiswaan/ipkTertinggi.ts`
- [Profile Repository](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/article/profile/sejarah.ts): `src/lib/repository/admin/article/profile/sejarah.ts`
- [User Repository](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/repository/admin/userAdmin.ts): `src/lib/repository/admin/userAdmin.ts`
- [Home Data Repositories](https://github.com/muhammadnadhar/news-web-ti/tree/main/src/lib/repository/admin/home): `src/lib/repository/admin/home`
- [Dataset Repositories](https://github.com/muhammadnadhar/news-web-ti/tree/main/src/lib/repository/admin/dataset): `src/lib/repository/admin/dataset`

### Infrastructure

- [MySQL Database](https://github.com/muhammadnadhar/news-web-ti/blob/main/src/lib/database/runtimeDb.ts): `src/lib/database/runtimeDb.ts`
- **Cloudinary**

### Other components

- **Visitor**
- **Admin User**

## Connections

- Visitor → Public Pages: browses
- Public Pages → Home Loader: loads
- Public Pages → News Loader: loads
- Public Pages → Achievement Loader: loads
- Public Pages → History Loader: loads
- Home Loader → News Repository: requests news
- Home Loader → Home Data Repositories: requests data
- News Loader → News Repository: requests news
- Achievement Loader → Achievement Repository: requests results
- History Loader → Profile Repository: requests history
- Admin User → Sign In: signs in
- Sign In → User Repository: finds account
- Admin User → User Management: manages users
- User Management → User Repository: reads and writes
- Admin User → User Profile: updates profile
- User Profile → User Repository: updates account
- User Profile → Dataset Repositories: updates avatar data
- Admin User → Content Admin: edits content
- Admin User → Dataset Admin: maintains datasets
- Admin User → Home Admin: maintains homepage
- MySQL Database → Cloudinary
