export type Tier = { key: string; name: string; threshold: number; perk: string; sharesPerWeek: number; color: string; }; export const TIERS: Tier[] = [ { key: 'seedling', name: 'Seedling', threshold: 0, perk: 'Your own profile and portfolio page', sharesPerWeek: 3, color: '#93B87A' }, { key: 'grower', name: 'Grower', threshold: 100, perk: 'Tier badge on every one of your skill cards', sharesPerWeek: 5, color: '#5A8A4A' }, { key: 'farmer', name: 'Farmer', threshold: 400, perk: 'Listed in the Growers directory', sharesPerWeek: 8, color: '#E9A23B' }, { key: 'harvester', name: 'Harvester', threshold: 1000, perk: 'Eligible for the weekly Fresh Harvest homepage feature', sharesPerWeek: 12, color: '#D9673F' }, { key: 'homesteader', name: 'Homesteader', threshold: 2500, perk: 'Joins the homepage portfolio spotlight rotation', sharesPerWeek: 20, color: '#8C4A2F' }, { key: 'blue-ribbon', name: 'Blue Ribbon', threshold: 6000, perk: 'Permanent hall of fame spot', sharesPerWeek: 30, color: '#3F74B5' }, ]; export function tierFor(seeds: number): Tier { let t = TIERS[0]; for (const tier of TIERS) if (seeds >= tier.threshold) t = tier; return t; } export function tierIndex(seeds: number): number { return TIERS.indexOf(tierFor(seeds)); } export function nextTier(seeds: number): Tier | null { return TIERS[tierIndex(seeds) + 1] ?? null; } export function tierProgress(seeds: number): number { const cur = tierFor(seeds); const nxt = nextTier(seeds); if (!nxt) return 100; return Math.max(0, Math.min(100, Math.round(((seeds - cur.threshold) / (nxt.threshold - cur.threshold)) * 100))); } export const SEEDS = { share: 50, install: 2, replant: 10, review: 5, like: 1, } as const; export const LIMITS = { likeSeedsPerSkillPerDay: 20, installSeedsPerSkillPerDay: 50, minAccountAgeDays: 3, minReviewLength: 40, likeActionsPerHour: 60, reviewsPerDay: 10, reportsPerDay: 10, versionsPerDay: 10, } as const;