# si4809-ppl-timb/main_reloop architecture

> Architecture diagram of the GitHub repository si4809-ppl-timb/main_reloop, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/si4809-ppl-timb/main_reloop
- Repository: https://github.com/si4809-ppl-timb/main_reloop

## Overview

ReLoop is a Laravel marketplace for reusable goods, with a parallel recycling-collection workflow connecting users to verified collectors. The main path runs from browsing and listing goods through checkout, payment, order completion, and reviews; separate branches cover collector pickup/drop-off orders, chat, location discovery, and moderation. The graph groups those product stages with their core data models. Source excerpts and the index support the checkout/payment, listing, moderation, and review links; other documented or indexed features are represented without asserting unverified internal calls.

Main entry points: [`routes/web.php`](https://github.com/si4809-ppl-timb/main_reloop/blob/main/routes/web.php) (Web Routes), [`app/Models/Order.php`](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Order.php) (Order Records), [`app/Http/Controllers/OrderController.php`](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/OrderController.php) (Checkout and Orders), [`app/Services/MidtransService.php`](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Services/MidtransService.php) (Payment Gateway)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_market["Reuse Marketplace"]
  node_catalog["Browse and Search<br/>[CariController.php]"]
  node_listing["Goods Listings"]
end

subgraph group_trade["Trade and Payments"]
  node_checkout["Checkout and Orders"]
  node_midtrans["Payment Gateway"]
  node_webhook["Payment Webhook"]
  node_auto_status["Order Status Automation"]
end

subgraph group_recycle["Collector Network"]
  node_collector_discovery["Find Collectors"]
  node_dropoff["Recycling Orders"]
  node_collector_ops["Collector Fulfillment"]
end

subgraph group_community["Trust and Community"]
  node_reviews["Ratings and Reviews"]
  node_chat["Buyer-Seller Chat<br/>[ChatRoom.php]"]
  node_reports["Reports and Moderation"]
end

subgraph group_foundation["Domain Data"]
  node_web["Web Routes<br/>[web.php]"]
  node_listing_model[("Listing Model<br/>[Listing.php]")]
  node_category[("Categories<br/>[Category.php]")]
  node_account[("Accounts and Profiles<br/>[User.php]")]
  node_wilayah[("Region Data")]
  node_order_model[("Order Records<br/>[Order.php]")]
  node_payment_model[("Payment Records<br/>[Payment.php]")]
  node_review_model[("Review Records<br/>[Review.php]")]
  node_conversation_model[("Conversation Data<br/>[Conversation.php]")]
  node_report_model[("Report Records<br/>[Report.php]")]
  node_collector_model[("Collector Profiles<br/>[MitraPengepul.php]")]
  node_dropoff_model[("Recycling Order Data<br/>[OrderSetor.php]")]
end

node_buyer(("Buyer / Seller"))
node_midtrans_api["Midtrans API<br/>external system"]

node_buyer -->|"requests"| node_web
node_web -->|"routes search"| node_catalog
node_web -->|"routes listings"| node_listing
node_web -->|"routes checkout"| node_checkout
node_web -->|"routes chat"| node_chat
node_web -->|"routes reviews"| node_reviews
node_web -->|"routes moderation"| node_reports
node_web -->|"routes discovery"| node_collector_discovery
node_web -->|"routes recycling"| node_dropoff
node_web -->|"routes fulfillment"| node_collector_ops
node_catalog -->|"queries listings"| node_listing_model
node_catalog -->|"queries categories"| node_category
node_catalog -->|"queries regions"| node_wilayah
node_listing -->|"creates listings"| node_listing_model
node_listing -->|"loads categories"| node_category
node_checkout -->|"locks listing"| node_listing_model
node_checkout -->|"creates order"| node_order_model
node_checkout -->|"requests token"| node_midtrans
node_checkout -->|"loads regions"| node_wilayah
node_midtrans -->|"updates payment"| node_payment_model
node_midtrans -->|"synchronizes status"| node_order_model
node_midtrans -.->|"calls gateway"| node_midtrans_api
node_webhook -->|"verifies signature"| node_midtrans
node_webhook -->|"updates order"| node_order_model
node_webhook -->|"updates payment"| node_payment_model
node_auto_status -->|"updates statuses"| node_order_model
node_auto_status -->|"updates listings"| node_listing_model
node_reviews -->|"checks completion"| node_order_model
node_reviews -->|"creates review"| node_review_model
node_reviews -->|"updates rating"| node_account
node_chat -.->|"manages conversations"| node_conversation_model
node_reports -->|"resolves reports"| node_report_model
node_reports -->|"deactivates listing"| node_listing_model
node_reports -->|"deactivates account"| node_account
node_collector_discovery -.->|"finds collectors"| node_collector_model
node_dropoff -.->|"creates requests"| node_dropoff_model
node_collector_ops -->|"manages fulfillment"| node_dropoff_model
node_collector_ops -->|"checks collector"| node_collector_model
node_collector_ops -->|"updates linked order"| node_order_model

click node_web "https://github.com/si4809-ppl-timb/main_reloop/blob/main/routes/web.php"
click node_catalog "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/CariController.php"
click node_listing "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/BarangController.php"
click node_listing_model "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Listing.php"
click node_category "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Category.php"
click node_account "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/User.php"
click node_wilayah "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/WilayahKelurahan.php"
click node_checkout "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/OrderController.php"
click node_order_model "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Order.php"
click node_payment_model "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Payment.php"
click node_midtrans "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Services/MidtransService.php"
click node_webhook "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/MidtransWebhookController.php"
click node_auto_status "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Console/Commands/ProcessOrdersAutoStatus.php"
click node_reviews "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/ReviewController.php"
click node_review_model "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Review.php"
click node_chat "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Livewire/ChatRoom.php"
click node_conversation_model "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Conversation.php"
click node_reports "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/Admin/ModerasiController.php"
click node_report_model "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Report.php"
click node_collector_discovery "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/PengepulController.php"
click node_collector_model "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/MitraPengepul.php"
click node_dropoff "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/OrderSetorController.php"
click node_collector_ops "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/MitraOrderSetorController.php"
click node_dropoff_model "https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/OrderSetor.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_catalog,node_listing toneBlue
class node_checkout,node_midtrans,node_webhook,node_auto_status toneAmber
class node_collector_discovery,node_dropoff,node_collector_ops,node_midtrans_api toneMint
class node_reviews,node_chat,node_reports toneRose
class node_web,node_listing_model,node_category,node_account,node_wilayah,node_order_model,node_payment_model,node_review_model,node_conversation_model,node_report_model,node_collector_model,node_dropoff_model,node_buyer toneIndigo
```

## Components

### Reuse Marketplace

- [Browse and Search](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/CariController.php): `app/Http/Controllers/CariController.php`
- [Goods Listings](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/BarangController.php): `app/Http/Controllers/BarangController.php`

### Trade and Payments

- [Checkout and Orders](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/OrderController.php): `app/Http/Controllers/OrderController.php`
- [Payment Gateway](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Services/MidtransService.php): `app/Services/MidtransService.php`
- [Payment Webhook](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/MidtransWebhookController.php): `app/Http/Controllers/MidtransWebhookController.php`
- [Order Status Automation](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Console/Commands/ProcessOrdersAutoStatus.php): `app/Console/Commands/ProcessOrdersAutoStatus.php`

### Collector Network

- [Find Collectors](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/PengepulController.php): `app/Http/Controllers/PengepulController.php`
- [Recycling Orders](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/OrderSetorController.php): `app/Http/Controllers/OrderSetorController.php`
- [Collector Fulfillment](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/MitraOrderSetorController.php): `app/Http/Controllers/MitraOrderSetorController.php`

### Trust and Community

- [Ratings and Reviews](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/ReviewController.php): `app/Http/Controllers/ReviewController.php`
- [Buyer-Seller Chat](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Livewire/ChatRoom.php): `app/Livewire/ChatRoom.php`
- [Reports and Moderation](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Http/Controllers/Admin/ModerasiController.php): `app/Http/Controllers/Admin/ModerasiController.php`

### Domain Data

- [Web Routes](https://github.com/si4809-ppl-timb/main_reloop/blob/main/routes/web.php): `routes/web.php`
- [Listing Model](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Listing.php): `app/Models/Listing.php`
- [Categories](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Category.php): `app/Models/Category.php`
- [Accounts and Profiles](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/User.php): `app/Models/User.php`
- [Region Data](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/WilayahKelurahan.php): `app/Models/WilayahKelurahan.php`
- [Order Records](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Payment Records](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Payment.php): `app/Models/Payment.php`
- [Review Records](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Review.php): `app/Models/Review.php`
- [Conversation Data](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Conversation.php): `app/Models/Conversation.php`
- [Report Records](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/Report.php): `app/Models/Report.php`
- [Collector Profiles](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/MitraPengepul.php): `app/Models/MitraPengepul.php`
- [Recycling Order Data](https://github.com/si4809-ppl-timb/main_reloop/blob/main/app/Models/OrderSetor.php): `app/Models/OrderSetor.php`

### Other components

- **Buyer / Seller**
- **Midtrans API**: external system

## Connections

- Buyer / Seller → Web Routes: requests (evidence: `routes/web.php`)
- Web Routes → Browse and Search: routes search (evidence: `routes/web.php`)
- Web Routes → Goods Listings: routes listings (evidence: `routes/web.php`)
- Web Routes → Checkout and Orders: routes checkout (evidence: `routes/web.php`)
- Web Routes → Buyer-Seller Chat: routes chat (evidence: `routes/web.php`)
- Web Routes → Ratings and Reviews: routes reviews (evidence: `routes/web.php`)
- Web Routes → Reports and Moderation: routes moderation (evidence: `routes/web.php`)
- Web Routes → Find Collectors: routes discovery (evidence: `routes/web.php`)
- Web Routes → Recycling Orders: routes recycling (evidence: `routes/web.php`)
- Web Routes → Collector Fulfillment: routes fulfillment (evidence: `routes/web.php`)
- Browse and Search → Listing Model: queries listings (evidence: `app/Http/Controllers/CariController.php`)
- Browse and Search → Categories: queries categories (evidence: `app/Http/Controllers/CariController.php`)
- Browse and Search → Region Data: queries regions (evidence: `app/Http/Controllers/CariController.php`)
- Goods Listings → Listing Model: creates listings (evidence: `app/Http/Controllers/BarangController.php`)
- Goods Listings → Categories: loads categories (evidence: `app/Http/Controllers/BarangController.php`)
- Checkout and Orders → Listing Model: locks listing (evidence: `app/Http/Controllers/OrderController.php`)
- Checkout and Orders → Order Records: creates order (evidence: `app/Http/Controllers/OrderController.php`)
- Checkout and Orders → Payment Gateway: requests token (evidence: `app/Http/Controllers/OrderController.php`)
- Checkout and Orders → Region Data: loads regions (evidence: `app/Http/Controllers/OrderController.php`)
- Payment Gateway → Payment Records: updates payment (evidence: `app/Services/MidtransService.php`)
- Payment Gateway → Order Records: synchronizes status (evidence: `app/Services/MidtransService.php`)
- Payment Gateway → Midtrans API: calls gateway
- Payment Webhook → Payment Gateway: verifies signature (evidence: `app/Http/Controllers/MidtransWebhookController.php`)
- Payment Webhook → Order Records: updates order (evidence: `app/Http/Controllers/MidtransWebhookController.php`)
- Payment Webhook → Payment Records: updates payment (evidence: `app/Http/Controllers/MidtransWebhookController.php`)
- Order Status Automation → Order Records: updates statuses (evidence: `app/Console/Commands/ProcessOrdersAutoStatus.php`)
- Order Status Automation → Listing Model: updates listings (evidence: `app/Console/Commands/ProcessOrdersAutoStatus.php`)
- Ratings and Reviews → Order Records: checks completion (evidence: `app/Http/Controllers/ReviewController.php`)
- Ratings and Reviews → Review Records: creates review (evidence: `app/Http/Controllers/ReviewController.php`)
- Ratings and Reviews → Accounts and Profiles: updates rating (evidence: `app/Http/Controllers/ReviewController.php`)
- Buyer-Seller Chat → Conversation Data: manages conversations
- Reports and Moderation → Report Records: resolves reports (evidence: `app/Http/Controllers/Admin/ModerasiController.php`)
- Reports and Moderation → Listing Model: deactivates listing (evidence: `app/Http/Controllers/Admin/ModerasiController.php`)
- Reports and Moderation → Accounts and Profiles: deactivates account (evidence: `app/Http/Controllers/Admin/ModerasiController.php`)
- Find Collectors → Collector Profiles: finds collectors
- Recycling Orders → Recycling Order Data: creates requests
- Collector Fulfillment → Recycling Order Data: manages fulfillment (evidence: `app/Http/Controllers/MitraOrderSetorController.php`)
- Collector Fulfillment → Collector Profiles: checks collector (evidence: `app/Http/Controllers/MitraOrderSetorController.php`)
- Collector Fulfillment → Order Records: updates linked order (evidence: `app/Http/Controllers/MitraOrderSetorController.php`)
