A modern, responsive real estate landing page built with React, TypeScript, and Vite. Features property listings, interactive search, video tours, and beautiful animations.
🌍 Live Demo: https://dream-ho.netlify.app/
- Frontend: React 18 + React Router 6 (SPA) + TypeScript + Vite + TailwindCSS 3
- Animations: Framer Motion for smooth transitions and interactions
- Testing: Vitest
- UI: Radix UI + TailwindCSS 3 + Lucide React icons
client/ # React SPA frontend
├── pages/ # Route components (Index.tsx = home)
├── components/ # React components including real estate features
│ ├── ui/ # Pre-built UI component library
│ ├── Hero.tsx # Hero section with search and video modal
│ ├── FeaturedListings.tsx # Property listings with details modal
│ ├── PropertyCard.tsx # Individual property card component
│ ├── PropertyDetails.tsx # Property details modal
│ ├── SearchBar.tsx # Interactive property search
│ ├── VideoModal.tsx # Video tour modal
│ └── ... # Other components
├── App.tsx # App entry point and SPA routing setup
└── global.css # TailwindCSS 3 theming and global styles
The routing system is powered by React Router 6:
client/pages/Index.tsxrepresents the home page.- Routes are defined in
client/App.tsxusing thereact-router-domimport - Route files are located in the
client/pages/directory
For example, routes can be defined with:
import { BrowserRouter, Routes, Route } from "react-router-dom";
<Routes>
<Route path="/" element={<Index />} />
<Route path="*" element={<NotFound />} />
</Routes>;- Primary: TailwindCSS 3 utility classes
- Theme and design tokens: Configure in
client/global.css - UI components: Pre-built library in
client/components/ui/ - Utility:
cn()function combinesclsx+tailwind-mergefor conditional classes
className={cn(
"base-classes",
{ "conditional-class": condition },
)}- Property Search: Interactive search with location suggestions and filters
- Property Listings: Grid of featured properties with detailed information
- Property Details: Modal with image gallery, full details, and agent contact
- Video Tours: Interactive video modal with custom controls
- Agent Contact: Direct phone and email contact for each property
Path aliases:
@/*- Client folder
npm run dev # Start Vite dev server
npm run build # Production build
npm run preview # Preview production build
npm run typecheck # TypeScript validation
npm test # Run Vitest testsOpen client/global.css and tailwind.config.ts and add new tailwind colors.
- Add new property types: Update the property interface in
PropertyCard.tsxandPropertyDetails.tsx - Enhance search filters: Add new filter options in
SearchBar.tsx - Add new property data: Update the mock data in
FeaturedListings.tsx
- Create component in
client/pages/MyPage.tsx - Add route in
client/App.tsx:
<Route path="/my-page" element={<MyPage />} />- Update the video source in
VideoModal.tsx - Add multiple video options for different property types
- Customize video poster images
- Standard:
npm run build+npm run preview - Static Hosting: Deploy to Netlify, Vercel, or GitHub Pages
- CDN: All assets optimized for CDN delivery
- Pure frontend application with Vite for development
- TypeScript throughout for type safety
- Framer Motion for smooth animations
- Responsive design with mobile-first approach
- Comprehensive UI component library with Radix UI
- Mock API integration ready for real estate APIs