How kwxky9p5cy-alt/campus_market works
Campus Market is a student-to-student used-goods marketplace. Users browse or search listings, inspect details, then authenticate to publish, favorite, request trades, message, or manage their profile. The frontend calls a marketplace service backed by Supabase or browser-local demo mode; AI search and listing autofill use a separate Edge Function with rule-based fallback. README documents database-backed trade-state transitions, image storage, and message Realtime. Some page-to-service wiring is inferred from documented capabilities; unsampled implementation details are not expanded.
Main entry points: App.tsx App routing · marketplace.ts Marketplace service · SearchPage.tsx Search and filters · ProductForm.tsx Listing editor
Components 22
Web experience
- App routing
src/App.tsx - App shell
src/layouts/AppShell.tsx - Auth provider
src/features/auth/AuthProvider.tsx
Listings and discovery
- Home browsing
src/pages/HomePage.tsx - Search and filters
src/pages/SearchPage.tsx - Product details
src/pages/ProductDetailPage.tsx - Listing editor
src/features/products/ProductForm.tsx - Favorites
src/features/favorites/FavoritesProvider.tsx
Transactions and people
- Trade requests
src/pages/TradesPage.tsx - Conversations
src/pages/MessagesPage.tsx - Chat
src/pages/ConversationPage.tsx - Profile management
src/pages/ProfilePage.tsx
Services and integrations
- Marketplace service
src/services/marketplace.ts - Supabase adapter
src/services/supabase-service.ts - Demo data store
src/services/demo-store.ts - Search parser
src/services/ai/searchParser.ts - Listing autofill
src/services/ai/autofill.ts - AI assistant
supabase/functions/ai-assistant/index.ts
Other components
- Student
- Supabase
- Image storage
- AI provider
Connections 31
- Student → App routing: uses
- App routing → App shell: routes through
- App routing → Home browsing: routes to
- App routing → Search and filters: routes to
- App routing → Product details: routes to
- App routing → Listing editor: routes to
- App routing → Favorites: routes to
- App routing → Trade requests: routes to
- App routing → Conversations: routes to
- App routing → Chat: routes to
- App routing → Profile management: routes to
- Auth provider → Marketplace service: authenticates via
- Home browsing → Marketplace service: loads listings
- Search and filters → Marketplace service: filters listings
- Search and filters → Search parser: parses query
- Product details → Marketplace service: loads product
- Listing editor → Marketplace service: saves listing
- Listing editor → Listing autofill: requests draft
- Favorites → Marketplace service: manages favorites
- Trade requests → Marketplace service: manages requests
- Conversations → Marketplace service: loads conversations
- Chat → Marketplace service: sends messages
- Profile management → Marketplace service: manages profile
- Marketplace service → Supabase adapter: uses backend
- Marketplace service → Demo data store: uses demo mode
- Supabase adapter → Supabase: reads and writes
- Supabase adapter → Image storage: uploads images
- Search parser → AI assistant: requests parsing
- Search parser → Search and filters: returns fallback
- Listing autofill → AI assistant: requests completion
- AI assistant → AI provider: sends prompt