The Testimonials app borrows the visual language of e-commerce product reviews to present peer recommendations in a format visitors immediately recognise. A teal banner at the top mimics the aggregate-rating hero found on Amazon product pages, complete with gold stars and a global-ratings count. Below it, each testimonial appears as a review card with an avatar, role, star row, serif quote, date, and a thumbs-up “Helpful” button — all rendered from a single static data array.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dev-os/llms.txt
Use this file to discover all available pages before exploring further.
Header
The header section is a full-widthbg-os-teal text-white banner with p-6 padding. It contains:
- Title —
"Developer Reviews & Ratings"intext-2xl font-bold - Star row — five
Staricons fromlucide-react, eachsize={20}withfill="currentColor"intext-yellow-400 - Rating label —
"5.0 out of 5"intext-lg font-medium - Count badge —
"(3 global ratings)"intext-sm text-white/80; the number is derived fromtestimonials.lengthso it updates automatically as you add or remove entries
Sort Bar
A slimbg-white border-b border-gray-200 row below the header holds a label ("Top reviews from the internet") and a <select> dropdown on the right. The dropdown tracks selection in a sortBy state variable:
value | Display label |
|---|---|
flattering | Sort by: Most flattering |
cringey | Sort by: Least cringey |
recent | Sort by: Recent |
sortBy state is tracked but no sort logic is applied to the testimonials array in the current implementation. The dropdown is decorative. To implement sorting, add a useMemo that returns a reordered copy of the array based on sortBy before mapping over it.Testimonials Data
All reviews live in a static array at the top ofTestimonialsApp.js:
| Field | Type | Rendered as |
|---|---|---|
id | number | React list key |
name | string | Reviewer name + avatar initial |
role | string | Sub-label beneath the name |
text | string | Serif block quote |
date | string | "Reviewed on [date]" footer label |
Review Card Anatomy
Each entry intestimonials renders as a bg-white p-4 rounded-lg shadow-sm border border-gray-100 card:
- Avatar — an
8×8circle (bg-gray-200 rounded-full) containing the first character ofname(name.charAt(0)) intext-gray-500 font-bold. No image upload or external URL needed. - Star row — five
Staricons (size={14},fill="currentColor",text-yellow-400), identical in structure to the header stars but smaller. - Quote —
text-sm text-gray-800 font-serif, wrapped with curly quotation marks in the JSX. - Footer — flexbox row with
justify-between; left side shows the reviewed-on date, right side has aThumbsUpicon button (hover:text-os-teal transition-colors). The Helpful button is currently stateless — no click handler is attached.
Customising the Testimonials App
Add a real testimonial — append a new object to thetestimonials array. The rating count in the header updates automatically:
helpfulCounts state object keyed by id and increment on click: