> For the complete documentation index, see [llms.txt](https://tyrix.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tyrix.gitbook.io/docs/script-resources/tyrix-droply/reviews.md).

# Reviews

Customers rate a business after a delivery. Ratings aggregate into a store score shown across the app.

## Leaving a review

A review carries a **star rating** and an optional **body** of up to `reviewBodyMaxLen` characters (default 500).

Reviews are gated to genuine transactions:

* Only **delivered** orders are reviewable. Cancelled and expired orders are not.
* Only the **customer who placed the order** may review it.
* **One review per order**, enforced by a unique constraint on `order_id` at the database level — not just in application code.

The app surfaces reviewable orders directly, so customers are prompted for the deliveries they have not yet rated. The delivery notification also nudges them to leave one.

## Where ratings appear

| Surface              | Shows                                                       |
| -------------------- | ----------------------------------------------------------- |
| Browse list          | Average stars + review count per store. Sortable by rating. |
| Store page           | Average stars + review count in the header.                 |
| Store reviews screen | The full review list for that business.                     |
| Customer profile     | The customer's own reviews, via **My Reviews**.             |

A store with no reviews yet shows no rating rather than a misleading zero.

## Owner view

Bosses read every review left for their business from the owner panel. Reviews are **not** editable or deletable by the business — a storefront cannot curate its own score.

## Moderation

There is no in-app moderation surface. If you need to remove a review, delete the row directly:

```sql
DELETE FROM tyrix_droply_reviews WHERE id = ?;
```

The store's aggregate recalculates automatically on the next read.

## Logging

Every posted review is written to the `review` Discord channel with its star count, so staff can spot abuse patterns without querying the database. See [Discord Logging](/docs/script-resources/tyrix-droply/discord-logging.md).
