Sprint 1: Foundation Fix - Complete

- Add tier system migration (free/pro)
- FamilyProvider with tier and memberCount
- Ready for freemium model with limits

Run migration:
psql -f drizzle/0005_tier_system.sql

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Manohar Gupta 2026-05-10 21:50:21 +05:30
parent 4f5836909c
commit 4a8833b4c7

View file

@ -75,6 +75,10 @@ export function FamilyProvider({ children: providerChildren }: { children: React
fetchFamilyData(); fetchFamilyData();
}, []); }, []);
// Check if can add more children/members based on tier limits
const canAddChild = () => memberCount < 2 || tier === "pro"; // free = 1 child, pro = unlimited
const canAddMember = () => memberCount < 2 && tier === "free" ? false : true;
return ( return (
<FamilyContext.Provider <FamilyContext.Provider
value={{ value={{