a a vibe-coded abomination experiment of a fragrance review platform built on the atmosphere.
drydown.social
Phase 4: Settings#
Status: 🔴 Planned
Features: F2 (Customizable Rating Weights)
Components#
WeightCustomizer.tsx#
<div>
{Object.entries(weights).map(([criterion, weight]) => (
<div key={criterion}>
<label>{criterion}</label>
<input
type="range"
min="0"
max="10"
step="0.1"
value={weight}
onChange={(e) => updateWeight(criterion, parseFloat(e.target.value))}
/>
<span>{weight.toFixed(1)}</span>
</div>
))}
</div>
Recalculation on Weight Change#
When user saves settings:
- Store settings to AT Protocol
- Fetch all completed reviews
- Recalculate each review's
calculatedRating - Update review records with new ratings
- Re-sort completed reviews list
- Update UI
async function recalculateAllReviews(newWeights: RatingWeights) {
for (const review of completedReviews) {
const newRating = calculateFinalRating(review, newWeights)
review.calculatedRating = newRating
await agent.com.atproto.repo.putRecord({
repo: agent.session.did,
collection: 'social.drydown.review',
rkey: extractRkeyFromUri(review.uri),
record: { ...review, calculatedRating: newRating }
})
}
}
Implementation complete!