How griff1n-afk/kainprends works
KainPrends is a React recipe-discovery and sharing application. Visitors browse and filter recipes, open recipe details, and can sign in to save favorites or manage a profile and recipes. App.tsx routes the principal pages and provides shared authentication and modal contexts. Supabase supplies authentication, PostgreSQL-backed recipe/profile/favorite data, and notification updates. The README documents search, category filtering, sorting, password recovery, responsive layouts, and Row Level Security; unsampled page implementations are represented by their exact tree paths, with only documented or indexed relationships shown.
Main entry points: App.tsx App routes · supabaseClient.ts Supabase client · ProfilePage.tsx User profile · useFavorites.ts Favorites state
Components 23
App and navigation
- App routes
src/App.tsx - Navigation bar
src/NavBar.tsx
Recipe discovery
- Home feed
src/HomePage.tsx - Recipe search
src/RecipesPage.tsx - Recipe details
src/RecipeDetails.tsx - Recipe card
src/components/ExploreRecipeCard.tsx - Favorite control
src/components/FavoriteButton.tsx - Recipe editor
src/components/RecipeFormModal/RecipeFormModal.tsx - Recipe form sections
src/components/RecipeFormModal/sections
Identity and profiles
- Sign-in page
src/Auth.tsx - Sign-in and signup
src/components/Auth/AuthCard.tsx - Auth modal
src/components/Auth/AuthModal.tsx - Auth state
src/context/AuthContext.tsx - Auth modal state
src/context/AuthModalContext.tsx - Recovery guard
src/components/ProtectedRoute.tsx - Password recovery
src/ResetPasswordPage.tsx - User profile
src/ProfilePage.tsx - Profile editor
src/EditProfileModal.tsx
Data and shared services
- Favorites state
src/hooks/useFavorites.ts - Notification state
src/hooks/useNotifications.ts - Supabase client
src/supabaseClient.ts
Other components
- Visitor
- Supabase backend
Connections 37
- Visitor → App routes: opens app
README.md - App routes → Navigation bar: renders
src/App.tsx - App routes → Home feed: routes to
src/App.tsx - App routes → Recipe search: routes to
src/App.tsx - App routes → Recipe details: routes to
src/App.tsx - App routes → User profile: routes to
src/App.tsx - App routes → Sign-in page: routes to
src/App.tsx - App routes → Password recovery: routes to
src/App.tsx - App routes → Recovery guard: guards recovery
src/App.tsx - App routes → Auth state: provides auth
src/App.tsx - App routes → Auth modal state: provides modal state
src/App.tsx - App routes → Auth modal: renders
src/App.tsx - Sign-in page → Sign-in and signup: renders
src/Auth.tsx - Auth modal → Sign-in and signup: renders
src/components/Auth/AuthModal.tsx - Auth modal → Auth modal state: reads state
src/components/Auth/AuthModal.tsx - Sign-in and signup → Supabase client: authenticates with
src/components/Auth/AuthCard.tsx - Auth state → Supabase client: reads session
src/context/AuthContext.tsx - Recovery guard → Auth state: checks state
src/components/ProtectedRoute.tsx - Home feed → Supabase client: loads recipes
src/HomePage.tsx - Recipe search → Supabase client: queries recipes
src/RecipesPage.tsx - Recipe details → Supabase client: loads recipe
src/RecipeDetails.tsx - User profile → Supabase client: loads profile data
src/ProfilePage.tsx - User profile → Profile editor: opens editor
src/ProfilePage.tsx - User profile → Recipe editor: opens recipe editor
src/ProfilePage.tsx - Recipe editor → Recipe form sections: renders sections
src/components/RecipeFormModal/RecipeFormModal.tsx - Recipe editor → Supabase client: saves recipes
src/components/RecipeFormModal/RecipeFormModal.tsx - Home feed → Favorites state: uses favorites
src/HomePage.tsx - Recipe search → Favorites state: uses favorites
src/RecipesPage.tsx - Recipe details → Favorites state: uses favorites
src/RecipeDetails.tsx - User profile → Favorites state: uses favorites
src/ProfilePage.tsx - Favorites state → Supabase client: reads and writes
src/hooks/useFavorites.ts - Notification state → Supabase client: syncs notifications
src/hooks/useNotifications.ts - Navigation bar → Notification state: uses notifications
src/NavBar.tsx - Favorite control → Auth modal state: requests login
src/components/FavoriteButton.tsx - Home feed → Recipe card: displays recipes
src/HomePage.tsx - Recipe card → Favorite control: renders control
src/components/ExploreRecipeCard.tsx - Supabase client → Supabase backend: connects
src/supabaseClient.ts