Add public homepage discovery aggregates
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 103
- Forks
- 18
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 555
Description
Context
The updated signed-out homepage in #87 needs server-owned discovery facts that the current cursor list routes cannot supply honestly.
Needed contract
Add a public, cacheable homepage discovery read that supplies:
- popular bottle links based on a real recent-interest signal;
- the highest-rated bottles for the current year, using the new point-rating aggregate and a server-owned minimum sample;
- the total number of bottles that meet that score sample;
- the number of public critic sources represented in recent reviews;
- the highest-rated qualifying bottle for each most-recorded distillery shown on the homepage.
Each bottle result should use the normal serialized bottle identity and include the point median, point count, and five rating-band counts needed by the existing Score and BandStack components. Each distillery result should keep its normal identity and bottle count, then include the same rating fields for its highest-rated qualifying bottle.
Constraints
- Do not derive popularity or sample-qualified rankings from one cursor page.
- Do not convert critic scores from their native scales.
- Keep this endpoint public and safe to cache.
- Existing recent-review, region, recent-bottle, and global stats endpoints can continue to own the other homepage sections.
Frontend behavior
Until this lands, the redesign will omit the popular and annual-ranking modules and will show the distillery directory without highest-rated bottle details instead of rendering invented values.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the current cursor list routes and the existing recent-review, region, recent-bottle, and global stats endpoints. Define the public cacheable read so it owns the required popularity, annual ranking, critic-source, and distillery aggregates without using one cursor page or converting native scores; done means its bottle and distillery results include the specified identities, rating fields, counts, and sample-qualified totals.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend, data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100