# rml1812/terserah-food-recommender architecture

> Architecture diagram of the GitHub repository rml1812/terserah-food-recommender, 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/rml1812/terserah-food-recommender
- Repository: https://github.com/rml1812/terserah-food-recommender

## Overview

Terserah is a food-discovery and restaurant-management web application. Diners browse/search restaurants, explore recommendations, then view restaurant details, reserve, review, and manage wishlists; the tree also identifies a “Terserahin” flow, articles, and payment completion. Restaurant accounts register for review and manage their listing and reservations, while administrators review restaurant accounts. The graph reflects the documented route and sampled review/admin/dashboard behavior; links among unsampled feature handlers and their models are omitted where wiring cannot be verified.

Main entry points: [`src/router/index.js`](https://github.com/rml1812/terserah-food-recommender/blob/main/src/router/index.js) (Page routing), [`server.js`](https://github.com/rml1812/terserah-food-recommender/blob/main/server.js) (Express server), [`routes/ReviewRoutes.js`](https://github.com/rml1812/terserah-food-recommender/blob/main/routes/ReviewRoutes.js) (Review routes), [`routes/adminDashboardRoutes.js`](https://github.com/rml1812/terserah-food-recommender/blob/main/routes/adminDashboardRoutes.js) (Admin routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_diners["Diner experience"]
  node_webapp["Vue application<br/>[App.vue]"]
  node_navigation["Page routing<br/>[index.js]"]
  node_discovery["Browse and search<br/>[Searching.vue]"]
  node_recommendations["Recommendations<br/>[Recommendation.vue]"]
  node_terserahin["Terserahin<br/>[Terserahin.vue]"]
  node_restaurantpage["Restaurant details<br/>[Restaurant.vue]"]
  node_reservations["Reservations<br/>[Reservasi.vue]"]
  node_reviews["Reviews<br/>[RestReview.vue]"]
  node_wishlist["Wishlist<br/>[Wishlist.vue]"]
  node_content["Articles and blog<br/>[Blog.vue]"]
  node_payment["Payment completion<br/>[PaymentFinish.vue]"]
end

subgraph group_accounts["Account operations"]
  node_restaurantaccounts["Restaurant accounts"]
  node_restaurantportal["Restaurant portal"]
  node_adminportal["Admin portal<br/>[AdminReview.vue]"]
  node_adminreviewui["Account review UI<br/>[AdminReview.vue]"]
end

subgraph group_backend["Application backend"]
  node_server["Express server<br/>[server.js]"]
  node_reviewapi["Review routes<br/>[ReviewRoutes.js]"]
  node_adminapi["Admin routes"]
  node_restaurantapi["Restaurant dashboard routes"]
  node_signupapi["Restaurant signup routes"]
end

subgraph group_data["Persistent data"]
  node_mongodb[("MongoDB")]
  node_reviewsdata[("Review records<br/>[review.js]")]
  node_ratingsdata[("Rating records<br/>[rating.js]")]
  node_restaurantsdata[("Restaurant records<br/>[restaurant.js]")]
  node_pendingdata[("Restaurant account states")]
  node_approveddata[("Approved accounts<br/>[restaurantACC.js]")]
  node_rejecteddata[("Rejected accounts")]
  node_reservationdata[("Reservation records<br/>[reservation.js]")]
end

node_diner(("Diner"))

node_diner -->|"uses"| node_webapp
node_webapp -->|"renders routes"| node_navigation
node_navigation -->|"routes to"| node_discovery
node_navigation -->|"routes to"| node_recommendations
node_navigation -->|"routes to"| node_terserahin
node_navigation -->|"routes to"| node_restaurantpage
node_navigation -->|"routes to"| node_reservations
node_navigation -->|"routes to"| node_wishlist
node_navigation -->|"routes to"| node_content
node_navigation -->|"routes to"| node_payment
node_navigation -->|"routes to"| node_restaurantaccounts
node_navigation -->|"routes to"| node_restaurantportal
node_navigation -->|"routes to"| node_adminportal
node_adminportal -->|"renders"| node_adminreviewui
node_adminreviewui -->|"requests accounts"| node_adminapi
node_reviews -->|"fetches and submits"| node_reviewapi
node_server -->|"mounts"| node_reviewapi
node_server -->|"mounts"| node_adminapi
node_server -->|"mounts"| node_restaurantapi
node_server -->|"mounts"| node_signupapi
node_server -->|"connects"| node_mongodb
node_reviewapi -->|"reads and writes"| node_reviewsdata
node_reviewapi -->|"reads and writes"| node_ratingsdata
node_reviewapi -->|"updates rating"| node_restaurantsdata
node_adminapi -->|"reads and updates"| node_pendingdata
node_adminapi -->|"creates"| node_approveddata
node_adminapi -->|"creates"| node_rejecteddata
node_restaurantapi -->|"reads and updates"| node_restaurantsdata
node_restaurantapi -->|"reads and updates"| node_reservationdata
node_signupapi -->|"checks accounts"| node_approveddata
node_signupapi -->|"checks and creates"| node_pendingdata
node_signupapi -->|"checks and updates"| node_rejecteddata

click node_webapp "https://github.com/rml1812/terserah-food-recommender/blob/main/src/App.vue"
click node_navigation "https://github.com/rml1812/terserah-food-recommender/blob/main/src/router/index.js"
click node_discovery "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Searching.vue"
click node_recommendations "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Recommendation.vue"
click node_terserahin "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Terserahin.vue"
click node_restaurantpage "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Restaurant.vue"
click node_reservations "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Reservasi.vue"
click node_reviews "https://github.com/rml1812/terserah-food-recommender/blob/main/src/components/RestComp/RestReview.vue"
click node_wishlist "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Wishlist.vue"
click node_content "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Blog.vue"
click node_payment "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/PaymentFinish.vue"
click node_restaurantaccounts "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/RestaurantRegister.vue"
click node_restaurantportal "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/RestaurantDashboard.vue"
click node_adminportal "https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/AdminReview.vue"
click node_adminreviewui "https://github.com/rml1812/terserah-food-recommender/blob/main/src/components/AdminReview/AdminReview.vue"
click node_server "https://github.com/rml1812/terserah-food-recommender/blob/main/server.js"
click node_reviewapi "https://github.com/rml1812/terserah-food-recommender/blob/main/routes/ReviewRoutes.js"
click node_adminapi "https://github.com/rml1812/terserah-food-recommender/blob/main/routes/adminDashboardRoutes.js"
click node_restaurantapi "https://github.com/rml1812/terserah-food-recommender/blob/main/routes/restaurantDashboardRoutes.js"
click node_signupapi "https://github.com/rml1812/terserah-food-recommender/blob/main/routes/signupRestaurantRoutes.js"
click node_reviewsdata "https://github.com/rml1812/terserah-food-recommender/blob/main/model/review.js"
click node_ratingsdata "https://github.com/rml1812/terserah-food-recommender/blob/main/model/rating.js"
click node_restaurantsdata "https://github.com/rml1812/terserah-food-recommender/blob/main/model/restaurant.js"
click node_pendingdata "https://github.com/rml1812/terserah-food-recommender/blob/main/model/tempRestaurantACC.js"
click node_approveddata "https://github.com/rml1812/terserah-food-recommender/blob/main/model/restaurantACC.js"
click node_rejecteddata "https://github.com/rml1812/terserah-food-recommender/blob/main/model/tempRejectedRestaurant.js"
click node_reservationdata "https://github.com/rml1812/terserah-food-recommender/blob/main/model/reservation.js"

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_webapp,node_navigation,node_discovery,node_recommendations,node_terserahin,node_restaurantpage,node_reservations,node_reviews,node_wishlist,node_content,node_payment toneBlue
class node_restaurantaccounts,node_restaurantportal,node_adminportal,node_adminreviewui toneAmber
class node_server,node_reviewapi,node_adminapi,node_restaurantapi,node_signupapi toneMint
class node_mongodb,node_reviewsdata,node_ratingsdata,node_restaurantsdata,node_pendingdata,node_approveddata,node_rejecteddata,node_reservationdata toneRose
class node_diner toneIndigo
```

## Components

### Diner experience

- [Vue application](https://github.com/rml1812/terserah-food-recommender/blob/main/src/App.vue): `src/App.vue`
- [Page routing](https://github.com/rml1812/terserah-food-recommender/blob/main/src/router/index.js): `src/router/index.js`
- [Browse and search](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Searching.vue): `src/views/Searching.vue`
- [Recommendations](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Recommendation.vue): `src/views/Recommendation.vue`
- [Terserahin](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Terserahin.vue): `src/views/Terserahin.vue`
- [Restaurant details](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Restaurant.vue): `src/views/Restaurant.vue`
- [Reservations](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Reservasi.vue): `src/views/Reservasi.vue`
- [Reviews](https://github.com/rml1812/terserah-food-recommender/blob/main/src/components/RestComp/RestReview.vue): `src/components/RestComp/RestReview.vue`
- [Wishlist](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Wishlist.vue): `src/views/Wishlist.vue`
- [Articles and blog](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/Blog.vue): `src/views/Blog.vue`
- [Payment completion](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/PaymentFinish.vue): `src/views/PaymentFinish.vue`

### Account operations

- [Restaurant accounts](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/RestaurantRegister.vue): `src/views/RestaurantRegister.vue`
- [Restaurant portal](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/RestaurantDashboard.vue): `src/views/RestaurantDashboard.vue`
- [Admin portal](https://github.com/rml1812/terserah-food-recommender/blob/main/src/views/AdminReview.vue): `src/views/AdminReview.vue`
- [Account review UI](https://github.com/rml1812/terserah-food-recommender/blob/main/src/components/AdminReview/AdminReview.vue): `src/components/AdminReview/AdminReview.vue`

### Application backend

- [Express server](https://github.com/rml1812/terserah-food-recommender/blob/main/server.js): `server.js`
- [Review routes](https://github.com/rml1812/terserah-food-recommender/blob/main/routes/ReviewRoutes.js): `routes/ReviewRoutes.js`
- [Admin routes](https://github.com/rml1812/terserah-food-recommender/blob/main/routes/adminDashboardRoutes.js): `routes/adminDashboardRoutes.js`
- [Restaurant dashboard routes](https://github.com/rml1812/terserah-food-recommender/blob/main/routes/restaurantDashboardRoutes.js): `routes/restaurantDashboardRoutes.js`
- [Restaurant signup routes](https://github.com/rml1812/terserah-food-recommender/blob/main/routes/signupRestaurantRoutes.js): `routes/signupRestaurantRoutes.js`

### Persistent data

- **MongoDB**
- [Review records](https://github.com/rml1812/terserah-food-recommender/blob/main/model/review.js): `model/review.js`
- [Rating records](https://github.com/rml1812/terserah-food-recommender/blob/main/model/rating.js): `model/rating.js`
- [Restaurant records](https://github.com/rml1812/terserah-food-recommender/blob/main/model/restaurant.js): `model/restaurant.js`
- [Restaurant account states](https://github.com/rml1812/terserah-food-recommender/blob/main/model/tempRestaurantACC.js): `model/tempRestaurantACC.js`
- [Approved accounts](https://github.com/rml1812/terserah-food-recommender/blob/main/model/restaurantACC.js): `model/restaurantACC.js`
- [Rejected accounts](https://github.com/rml1812/terserah-food-recommender/blob/main/model/tempRejectedRestaurant.js): `model/tempRejectedRestaurant.js`
- [Reservation records](https://github.com/rml1812/terserah-food-recommender/blob/main/model/reservation.js): `model/reservation.js`

### Other components

- **Diner**

## Connections

- Diner → Vue application: uses
- Vue application → Page routing: renders routes
- Page routing → Browse and search: routes to
- Page routing → Recommendations: routes to
- Page routing → Terserahin: routes to
- Page routing → Restaurant details: routes to
- Page routing → Reservations: routes to
- Page routing → Wishlist: routes to
- Page routing → Articles and blog: routes to
- Page routing → Payment completion: routes to
- Page routing → Restaurant accounts: routes to
- Page routing → Restaurant portal: routes to
- Page routing → Admin portal: routes to
- Admin portal → Account review UI: renders
- Account review UI → Admin routes: requests accounts
- Reviews → Review routes: fetches and submits
- Express server → Review routes: mounts
- Express server → Admin routes: mounts
- Express server → Restaurant dashboard routes: mounts
- Express server → Restaurant signup routes: mounts
- Express server → MongoDB: connects
- Review routes → Review records: reads and writes
- Review routes → Rating records: reads and writes
- Review routes → Restaurant records: updates rating
- Admin routes → Restaurant account states: reads and updates
- Admin routes → Approved accounts: creates
- Admin routes → Rejected accounts: creates
- Restaurant dashboard routes → Restaurant records: reads and updates
- Restaurant dashboard routes → Reservation records: reads and updates
- Restaurant signup routes → Approved accounts: checks accounts
- Restaurant signup routes → Restaurant account states: checks and creates
- Restaurant signup routes → Rejected accounts: checks and updates
