How my-hackathon-projects/nestai-agent works
NestAI is a voice- and text-driven real-estate discovery assistant. Users choose a location and rent/buy preference, search for listings, review nearby amenities and AI-explained matches, then refine, compare, chat, or revisit saved sessions. The README documents the Dify workflow’s listing, amenity, distance, analysis, and aggregation stages; those workflow internals are external to this repository. The graph includes UI and internal data-handling layers. Some component details are based on the README or source index rather than inspected implementation, so uncertain connections are omitted.
Main entry points: MainLayout.tsx Discovery layout · useDify.ts AI request handling · LocationPicker.tsx Location selection · useSession.ts Session persistence
Components 31
Search experience
- Location selection
src/components/LocationPicker.tsx - Map picker
src/components/MapPickerModal.tsx - Voice and chat
src/components/ChatBar.tsx - Discovery layout
src/components/MainLayout.tsx - Search settings
src/components/SettingsModal.tsx
Listings and insights
- Listings map
src/components/MainMap.tsx - Listing results
src/components/ListingsPanel.tsx - Offer details
src/components/OfferDetailsPanel.tsx - Nearby amenities
src/components/AmenitiesPanel.tsx - Property comparison
src/components/CompareModal.tsx - Session history
src/components/HistoryDrawer.tsx
Discovery services
- Geocoding
src/hooks/useNominatim.ts - Nominatim
- Device location
src/hooks/useGeolocation.ts - Listing retrieval
src/hooks/useListings.ts - Amenity lookup
src/hooks/useAmenities.ts - Overpass proxy
api/overpass.js - OpenStreetMap Overpass
- AI request handling
src/hooks/useDify.ts - Dify proxy
api/dify.js - Response normalization
src/lib/dify-normalizers.ts
State and persistence
- Application state
src/store/appStore.ts - Session persistence
src/hooks/useSession.ts - Browser IndexedDB
AI workflow
- Dify workflow
- Stream Estate listings
- Amenity search
- Distance calculation
src/lib/geo.ts - Match analysis
- Result aggregation
Other components
- Home seeker
Connections 33
- Home seeker → Location selection: chooses location
README.md - Home seeker → Voice and chat: describes needs
README.md - Location selection → Geocoding: searches places
src/components/LocationPicker.tsx - Geocoding → Nominatim: geocodes
src/hooks/useNominatim.ts - Map picker → Geocoding: reverse geocodes
src/components/MapPickerModal.tsx - Location selection → Device location: uses location
src/components/LocationPicker.tsx - Discovery layout → Listings map: renders
src/components/MainLayout.tsx - Discovery layout → Listing results: renders
src/components/MainLayout.tsx - Discovery layout → Offer details: renders
src/components/MainLayout.tsx - Discovery layout → Nearby amenities: renders
src/components/MainLayout.tsx - Discovery layout → Voice and chat: renders
src/components/MainLayout.tsx - Listing results → Property comparison: compares listings
README.md - Home seeker → Listing retrieval: requests listings
README.md - Listing retrieval → AI request handling: requests AI search
- AI request handling → Dify proxy: posts request
README.md - Dify proxy → Dify workflow: forwards request
README.md - Dify workflow → Stream Estate listings: retrieves listings
README.md - Dify workflow → Amenity search: searches nearby
README.md - Amenity search → Distance calculation: calculates walking distance
README.md - Distance calculation → Match analysis: provides distances
README.md - Match analysis → Result aggregation: provides scored matches
README.md - Result aggregation → Dify workflow: returns results
README.md - AI request handling → Response normalization: normalizes responses
src/hooks/useDify.ts - AI request handling → Application state: updates results
src/hooks/useDify.ts - Home seeker → Amenity lookup: checks neighbourhood
README.md - Amenity lookup → Overpass proxy: queries amenities
- Overpass proxy → OpenStreetMap Overpass: proxies query
README.md - Home seeker → Session history: reopens session
README.md - Session history → Session persistence: loads saved session
src/components/HistoryDrawer.tsx - Session persistence → Browser IndexedDB: reads and writes
src/hooks/useSession.ts - Session persistence → Application state: restores state
src/hooks/useSession.ts - Home seeker → Search settings: refines preferences
README.md - Search settings → Application state: updates preferences
src/components/SettingsModal.tsx