How shubhodeepdutta21/basics_of_builds works
BOB helps electronics hobbyists use their existing parts to find or invent buildable projects, then get project-aware assistance. Users sign in, manage an inventory, compare it with the project catalog, and can request an AI-generated project or chat about a project. Additional branches provide profiles and a community prototype. The excerpts show the inventory’s Supabase persistence and AI request/auth flow; community and several page-to-data relationships are supported by the SOURCE INDEX. The community is documented as in progress.
Main entry points: supabaseClient.ts Supabase client · page.tsx Project discovery · route.ts Project generation API · authFetch.ts Authenticated fetch
Components 28
Catalog and discovery
- Project discovery
src/app/discovery/page.tsx - Catalog state
src/lib/CatalogContext.tsx - Catalog queries
src/lib/catalog.ts - Project details
src/app/projects/[id]/page.tsx - Readiness scoring
src/lib/matching.ts
Inventory
- Parts inventory
src/app/inventory/page.tsx - Inventory state
src/lib/InventoryContext.tsx - Supabase inventory
AI assistance
- Project generation API
src/app/api/generate/route.ts - Project assistant
src/app/components/chatbot.tsx - Assistant API
src/app/api/chatbot/route.ts - Groq AI
Identity and community
- Sign-in
src/app/login/page.tsx - Account profile
src/app/account/page.tsx - Profile queries
src/lib/profile.ts - Community feed
src/app/community/page.tsx - Post detail
src/app/community/post/[id]/page.tsx - Posts and reactions
src/lib/posts.ts - Post comments
src/app/components/CommentsSection.tsx - Comment queries
src/lib/comments.ts - Supabase community data
Shared services
- Authenticated fetch
src/lib/authFetch.ts - Server token checks
src/lib/serverAuth.ts - Rate limiting
src/lib/rateLimit.ts - Supabase client
src/lib/supabaseClient.ts - Supabase Auth
- Upstash Redis
Other components
- Hobbyist
Connections 38
- Hobbyist → Parts inventory: manages parts
README.md - Parts inventory → Inventory state: updates inventory
src/app/inventory/page.tsx - Inventory state → Supabase inventory: reads and writes
src/lib/InventoryContext.tsx - Hobbyist → Project discovery: discovers projects
README.md - Project discovery → Catalog state: uses catalog
src/app/discovery/page.tsx - Catalog state → Catalog queries: loads catalog
src/lib/CatalogContext.tsx - Catalog queries → Supabase client: queries through
src/lib/catalog.ts - Project discovery → Inventory state: reads owned parts
src/app/discovery/page.tsx - Project discovery → Readiness scoring: scores projects
src/app/discovery/page.tsx - Project details → Readiness scoring: computes readiness
src/app/projects/[id]/page.tsx - Hobbyist → Project generation API: requests invention
README.md - Project discovery → Authenticated fetch: sends inventory
src/app/discovery/page.tsx - Authenticated fetch → Project generation API: posts request
- Authenticated fetch → Supabase client: gets session token
src/lib/authFetch.ts - Project generation API → Server token checks: checks user
src/app/api/generate/route.ts - Project generation API → Rate limiting: limits requests
src/app/api/generate/route.ts - Project generation API → Groq AI: requests project JSON
src/app/api/generate/route.ts - Hobbyist → Project assistant: asks project questions
README.md - Project details → Project assistant: shows assistant
src/app/projects/[id]/page.tsx - Project assistant → Authenticated fetch: sends question
src/app/components/chatbot.tsx - Authenticated fetch → Assistant API: posts question
- Assistant API → Server token checks: checks user
src/app/api/chatbot/route.ts - Assistant API → Rate limiting: limits requests
src/app/api/chatbot/route.ts - Assistant API → Groq AI: requests AI reply
README.md - Rate limiting → Upstash Redis: uses when configured
README.md - Hobbyist → Sign-in: signs in
README.md - Sign-in → Supabase client: uses auth client
src/app/login/page.tsx - Supabase client → Supabase Auth: authenticates
src/lib/supabaseClient.ts - Account profile → Profile queries: loads and saves
src/app/account/page.tsx - Profile queries → Supabase client: queries profiles
src/lib/profile.ts - Hobbyist → Community feed: browses community
README.md - Community feed → Posts and reactions: loads posts
src/app/community/page.tsx - Post detail → Posts and reactions: loads post
src/app/community/post/[id]/page.tsx - Post detail → Post comments: renders comments
src/app/community/post/[id]/page.tsx - Post comments → Comment queries: loads comments
src/app/components/CommentsSection.tsx - Posts and reactions → Supabase client: queries posts
src/lib/posts.ts - Comment queries → Supabase client: queries comments
src/lib/comments.ts - Supabase client → Supabase community data: accesses community data