ProperView is a modern real estate platform that connects property agents with potential buyers and renters. The platform provides a seamless experience for both agents and visitors, with features for property management, analytics, inquiry handling, and an interactive map view for property search.
| Feature/Requirement | Requested in Challenge | Delivered in ProperView |
|---|---|---|
| Agent Dashboard (CRUD) | ✔️ | ✔️ |
| Simulated Agent Login | ✔️ | ✔️ |
| Public Listings Page | ✔️ | ✔️ |
| Filtering (price, bedrooms, loc.) | ✔️ | ✔️ |
| Property Details | ✔️ | ✔️ |
| Inquiry Submission | ✔️ | ✔️ |
| REST API Endpoints | ✔️ | ✔️ |
| Database Seeding | ✔️ | ✔️ |
| Accessibility (WCAG 2.1) | ❌ | ✔️ |
| Comprehensive Testing | ❌ | ✔️ |
| Performance Optimizations | ❌ | ✔️ |
| Extensive Documentation | ❌ | ✔️ |
| Error Handling & Validation | ❌ | ✔️ |
| Developer Experience Enhancements | ❌ | ✔️ |
| Map View (Zillow-style) | ❌ | ✔️ |
- Browse property listings with advanced filtering options
- View detailed property information
- Submit inquiries about properties
- Filter properties by location, price range, and bedrooms
- Dark Mode Support: The platform automatically adapts to your system's color scheme, providing a visually comfortable experience in both light and dark environments. All major components and UI elements are styled for optimal contrast and accessibility using Tailwind CSS's dark mode utilities.
- Interactive Map View: Search by location (e.g., "Chicago") to see a split view with a Mapbox-powered map on the left and property cards on the right, similar to Zillow. Click markers to view property details.
- Manage property listings (create, edit, delete)
- View property analytics (views, inquiries, days on market)
- Track property performance
- Handle incoming inquiries
- Frontend: Next.js 14 with React and TypeScript
- Styling: Tailwind CSS
- Database: PostgreSQL with Prisma ORM
- Mapping: Mapbox GL JS for interactive map view
- Testing: Jest and React Testing Library
- Authentication: NextAuth.js
- Node.js 18+ and npm
- PostgreSQL database
- Git
- Mapbox Access Token (for map view): Get a free token from Mapbox
- Clone the repository:
git clone https://github.com/yourusername/proper-view.git cd proper-view - Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env.local # Edit .env.local with your configuration, including NEXT_PUBLIC_MAPBOX_TOKEN - Set up the database:
npx prisma migrate dev npx prisma db seed
- Start the development server:
npm run dev
To access the Agent Dashboard, log in using one of the following agent names:
- John Doe
- Jane Smith
(These are seeded users for demo purposes.)
- Map View Integration: When a user searches for a location, the listings page displays a split view with a Mapbox map and property cards, allowing for an intuitive, modern property search experience.
| Task | Command |
|---|---|
| Start dev server | npm run dev |
| Run all tests | npm test |
| Test (watch mode) | npm test -- --watch |
| Test (coverage) | npm test -- --coverage |
| Build for prod | npm run build |
| Lint code | npm run lint |
| Format code | npm run format |
- Add a property: Use the Agent Dashboard, click "Add Property"
- Edit/delete property: Use the Agent Dashboard, select a property
- Filter listings: Use the filter bar on the public listings page
- Submit inquiry: Click "Inquire" on a property detail page
- Run tests:
npm test - Check coverage:
npm test -- --coverage - Update docs: Edit README.md, CONTRIBUTING.md, or PROJECT_SUMMARY.md
- Executive Summary
- Project Summary
- Contributing Guide
- Version & Release Notes
- BDD Scenarios
- Testing Guidelines
For more details, see the full documentation in each file above.
The project follows a Test-Driven Development (TDD) approach with Behavior-Driven Development (BDD) scenarios. Tests are written using Jest and React Testing Library.
# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run tests with coverage
npm test -- --coverage- Unit tests for components and utilities
- Integration tests for API routes
- End-to-end tests for critical user flows
- Accessibility tests for UI components
.
├── app/ # Next.js app directory
│ ├── agent/ # Agent-specific pages
│ ├── api/ # API routes
│ └── properties/ # Property-related pages
├── components/ # React components
│ ├── agent/ # Agent-specific components
│ ├── properties/ # Property-related components
│ └── ui/ # Shared UI components
├── lib/ # Utility functions and configurations
├── prisma/ # Database schema and migrations
└── public/ # Static assets
- Follow TypeScript best practices
- Use ESLint and Prettier for code formatting
- Write meaningful commit messages
- Document components with JSDoc
- Write failing tests first (Red)
- Implement the feature to make tests pass (Green)
- Refactor the code while keeping tests passing (Refactor)
The project follows BDD scenarios defined in bdd.mdc. Each feature should:
- Have corresponding BDD scenarios
- Include test coverage for all scenarios
- Document edge cases and error handling
The platform is built with accessibility as a core requirement, following WCAG 2.1 guidelines:
ProperView supports dark mode out of the box. The UI automatically switches between light and dark themes based on your device or browser preference, using Tailwind CSS's dark: classes. This ensures:
- Comfortable viewing in low-light environments
- High contrast and readability for all users
- Consistent experience across all pages and components
All interactive elements, backgrounds, and text colors are carefully designed for both light and dark modes, improving accessibility and reducing eye strain.
- ARIA live regions for dynamic content updates
- Descriptive labels for all interactive elements
- Proper heading hierarchy and document structure
- Status announcements for form submissions and filter changes
- Full keyboard support for all interactive elements
- Logical tab order through forms and navigation
- Keyboard shortcuts for common actions
- Focus management for modals and dropdowns
- High contrast color schemes meeting WCAG AA standards
- Clear visual hierarchy and spacing
- Responsive design for all screen sizes
- Support for reduced motion preferences
- Clear error messages and validation feedback
- Proper labeling of form controls
- Required field indicators
- Error recovery suggestions
The application implements a comprehensive error handling strategy:
- Form validation with immediate feedback
- Graceful degradation for API failures
- User-friendly error messages
- Clear recovery paths
- Structured error responses
- Proper HTTP status codes
- Detailed error logging
- Security-focused error messages
- Loading states for async operations
- Error state management
- Optimistic UI updates
- Proper error recovery
All components follow a standardized JSDoc documentation pattern:
/**
* Component Name
*
* Detailed description of the component's purpose and functionality.
*
* @component
* @param {ComponentProps} props - Component props
* @returns {JSX.Element} Description of the rendered output
*
* @example
* ```tsx
* // Example usage of the component
* ```
*//**
* Props for the Component
* @interface ComponentProps
* @property {Type} propName - Description of the prop
*//**
* Function description
* @param {Type} paramName - Parameter description
* @returns {Type} Return value description
*/Please see CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
The codebase implements several performance optimizations to ensure smooth user experience:
-
Component Memoization
ListingsClientandFilterBarcomponents are wrapped withReact.memoto prevent unnecessary re-renders- Filtered properties are memoized using
useMemoto avoid recalculations on every render - Event handlers are memoized using
useCallbackto maintain referential equality
-
Efficient State Management
- URL-based filter state to enable bookmarking and sharing
- Optimized filter updates with debounced search
- Efficient property filtering with memoized results
-
Rendering Optimizations
- Virtualized lists for large property collections
- Lazy loading of images with proper sizing
- Conditional rendering of UI elements
The platform follows WCAG 2.1 guidelines for accessibility:
-
Semantic HTML
- Proper use of HTML5 elements (
article,section,nav) - ARIA labels and roles for interactive elements
- Keyboard navigation support
- Proper use of HTML5 elements (
-
Screen Reader Support
- Descriptive alt text for images
- Status announcements for dynamic content
- Proper heading hierarchy
-
Color & Contrast
- WCAG AA compliant color contrast ratios
- Clear visual hierarchy
- Support for reduced motion preferences
Robust error handling throughout the application:
-
Form Validation
- Client-side validation with immediate feedback
- Server-side validation for data integrity
- Clear error messages and recovery paths
-
API Error Handling
- Graceful degradation on API failures
- User-friendly error messages
- Automatic retry mechanisms for transient failures
-
Loading States
- Skeleton loaders for content
- Progress indicators for long operations
- Optimistic UI updates
The codebase follows strict TypeScript and React best practices:
-
TypeScript Usage
- Strict type checking enabled
- Comprehensive interface definitions
- Proper type inference and generics
-
React Patterns
- Functional components with hooks
- Custom hooks for reusable logic
- Proper dependency management
-
Code Organization
- Feature-based directory structure
- Consistent naming conventions
- Comprehensive JSDoc documentation