Frontend Architecture
EstateHub includes a Next.js 16.3.3 web application in frontend/. It uses the App Router, TypeScript, Tailwind CSS v4, Base UI/shadcn components, Redux Toolkit with RTK Query, React Hook Form, Zod, Leaflet, Recharts, and Sonner.
Application Areas
| Area | Implemented routes |
|---|---|
| Public marketplace | Homepage, property search, property details, tours, purchase and lease flows, contact, and seller onboarding. |
| Customer portal | Dashboard, appointments, saved properties, collections, comparisons, saved searches, messages, deals, profile, and KYC. |
| Seller portal | Dashboard, properties, property creation/editing, appointments, messages, notifications, finance, payments, and settings. |
| Admin portal | Dashboard, users, verifications, properties, bulk listing actions, messages, notifications, payments, payouts, settings, and integrations. |
The Core frontend covers purchase and lease workflows. See Add-ons Overview for upcoming modules.
Integration Boundary
- Call the role-specific
/api/v1routes exposed by the backend. - Send Simple JWT access tokens as bearer credentials on protected requests.
- Treat Django permissions and service validation as authoritative.
- Handle the backend success envelope and structured exception responses.
- Use
NEXT_PUBLIC_API_BASE_URLfor the REST API base URL andNEXT_PUBLIC_WS_BASE_URLwhen WebSocket features are enabled. - Use the backend
/api/v1/uploads/prepare, complete, delete, and protected-content lifecycle for managed files.
The frontend presents available workflows, but authentication, permissions, validation, state transitions, and payment decisions are enforced by the Django backend. Do not infer add-on availability from frontend labels or shared enum values.
Development Commands
Run these commands from frontend/:
pnpm install
pnpm dev
pnpm lint
pnpm build
pnpm startThe repository declares pnpm@11.24.0 as its package manager. Use the lockfile and package-manager version shipped with the release for reproducible installations.