How hey-anant/terravilla works
TerraVilla is a broker-free land marketplace prototype. A user enters through the React app, authenticates, then discovers verified plots, reviews market insights, or manages a seller listing; profile flows cover identity and account details. The sampled frontend uses InsForge for authentication/profile operations and plot utilities for listing reads and writes, while the README describes mock persistence and simulated fees. A separate Express/MongoDB backend is present, but the excerpts do not establish that the frontend calls it; its route internals and utility wiring are therefore left unspecified.
Main entry points: App.jsx App view router · AuthContext.jsx Auth state and flows · plotUtils.js Plot utilities · server.js Express server
Components 18
Marketplace UI
- App view router
src/App.jsx - Landing page
src/components/Home/LandingPage.jsx
Identity and Profiles
- Login and signup
src/components/Auth/LoginForm.jsx - Auth state and flows
src/context/AuthContext.jsx - InsForge service
src/lib/insforge.js - InsForge users
- Profile and KYC
src/components/Profile/ProfilePage.jsx
Property Marketplace
- Property search
src/components/Search/SearchPage.jsx - Seller dashboard
src/components/Seller/SellerDashboard.jsx - Listing fee
src/components/Payment/ListingFeePayment.jsx - Plot utilities
src/utils/plotUtils.js - Mock plot data
src/data/mockData.js - Market insights
src/components/Market/MarketData.jsx
Backend API
- Express server
backend/server.js - Plot API routes
backend/routes/plots.js - Market API routes
backend/routes/market.js - MongoDB
Other components
- User
Connections 19
- User → App view router: uses
- App view router → Login and signup: shows signed-out
- App view router → Landing page: routes home
- App view router → Property search: routes search
- App view router → Seller dashboard: routes seller
- App view router → Market insights: routes market
- App view router → Profile and KYC: routes profile
- Login and signup → Auth state and flows: calls auth flows
- Auth state and flows → InsForge service: calls auth API
- Auth state and flows → InsForge users: reads and writes
- Profile and KYC → Auth state and flows: calls profile flows
- Property search → Plot utilities: fetches plots
- Seller dashboard → Plot utilities: reads and adds
- Market insights → Plot utilities: fetches listings
- Plot utilities → Mock plot data: uses mock data
- Seller dashboard → Listing fee: opens fee flow
- Express server → Plot API routes: mounts routes
- Express server → Market API routes: mounts routes
- Express server → MongoDB: connects