Domapus is an interactive dashboard for visualizing U.S. housing market data at the ZIP code level. Built with React, TypeScript, and MapLibre GL JS, it visualizes real estate trends across 24,000+ ZIP codes using data sourced from Redfin.
- Real-time ZIP code data for 24,000+ locations across the United States
- Multiple housing metrics including median sale price, inventory, days on market, and more
- Smooth zoom and pan with hardware-accelerated MapLibre GL JS rendering
- Hover tooltips displaying detailed information for each ZIP code
- Search functionality to quickly locate specific ZIP codes
- Dynamic color scaling based on data distribution
- Quintile-based legend showing actual data ranges
- Regional filtering by state and metropolitan area
- Real-time metric switching without data reloading
- High-quality map exports in PNG and PDF formats
- Dynamic legend scaling based on selected data
- Customizable export options including title, legend, and attribution
- Professional branding with Domapus logo integration
- Web Workers for data processing to improve responsiveness
- Hardware-accelerated rendering with MapLibre GL JS
- Optimized INP (Interaction to Next Paint) for better user experience
- Resource preconnection and prefetching for faster loading
- Debounced interactions to reduce main thread blocking
- Efficient memory management with proper cleanup
- Node.js 18+
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/Jasperc2024/Domapus.git cd Domapus
-
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:8080/Domapus/
npm run build
npm run preview
src/
βββ components/
β βββ dashboard/ # Main dashboard components
β β βββ map/ # Map-related utilities and hooks
β β βββ MapLibreMap.tsx # Main MapLibre GL JS component
β β βββ ExportRenderer.tsx # Export functionality
β β βββ ExportLegend.tsx # Dynamic legend component
β β βββ ...
β βββ ui/ # Reusable UI components (shadcn/ui)
β βββ ...
βββ hooks/ # Custom React hooks
βββ workers/ # Web workers for performance
βββ utils/ # Utility functions
βββ pages/ # Page components
- Median Sale Price - Middle price point of recently sold homes
- Median List Price - Middle asking price of homes for sale
- Median Days on Market - Average time homes spend listed before sale
- Inventory - Number of homes currently available for sale
- New Listings - Recently added properties to the market
- Homes Sold - Number of completed transactions
- Sale to List Ratio - Percentage of asking price achieved in sales
- Homes Sold Above List - Properties selling above asking price
- Off Market in 2 Weeks - Quick-selling properties
- React 18 - Modern React with hooks and concurrent features
- TypeScript - Type-safe development with enhanced IDE support
- Vite - Fast build tool with hot module replacement
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - High-quality, accessible component library
- MapLibre GL JS - Open-source vector map rendering with hardware acceleration
- D3-Scale - Data-driven color scaling and interpolation
- Canvas Rendering - High-performance GPU-accelerated rendering
- Pako - Fast zlib implementation for data decompression
- Web Workers - Background processing for better performance
- CSV Parsing - Efficient client-side data processing
- html2canvas - High-quality screenshot generation
- jsPDF - Client-side PDF generation
- Custom Export Engine - Professional map export system
- LCP (Largest Contentful Paint) - Optimized with resource preloading
- FID (First Input Delay) - Web workers prevent main thread blocking
- CLS (Cumulative Layout Shift) - Fixed dimensions and skeleton loading
- INP (Interaction to Next Paint) - Hardware acceleration and efficient event handling
- Resource preconnection to CDN domains
- Critical asset prefetching
- Lazy loading for non-critical components
- Efficient data compression (gzip)
- Hardware-accelerated map rendering with MapLibre GL JS
- Web worker data processing
- Efficient event handling with throttling
- Optimized memory management
# Base URL for the application (set in vite.config.ts)
VITE_BASE_URL=/Domapus/
# Data source URLs (configured in components)
VITE_DATA_CDN=https://cdn.jsdelivr.net/gh/Jasperc2024/Domapus@main/public/data/
The project uses Vite with custom configuration for:
- Base path configuration for GitHub Pages
- Asset optimization and chunking
- TypeScript compilation with strict mode
- Tailwind CSS with custom design system
- Mobile-first approach with adaptive layouts
- Touch-optimized interactions for mobile devices
- Responsive map controls that adapt to screen size
- Mobile-specific UI patterns for better usability
- Primary Data: Redfin real estate market data
- Geographic Data: U.S. Census ZIP Code Tabulation Areas (ZCTA)
- City/County Mapping: Custom aggregated geographic data
- Update Frequency: Data refreshed monthly from Redfin sources
- No user tracking - All analytics are aggregated and anonymous
- Client-side processing - No personal data sent to servers
- Secure data sources - All external resources served over HTTPS
- Content Security Policy - Strict CSP headers for security
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes with proper TypeScript types
- Test your changes:
npm run build && npm run preview
- Run linting:
npm run lint
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to your branch:
git push origin feature/amazing-feature
- Open a Pull Request
- TypeScript strict mode enabled
- ESLint configuration with React and accessibility rules
- Prettier code formatting
- Component-based architecture with clear separation of concerns
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Available in this README and inline code comments
- Issues: Report bugs and request features via GitHub Issues
- Discussions: Join the conversation in GitHub Discussions
- Email: Contact the maintainer at jasperc.wk@gmail.com
If you find Domapus useful, consider supporting its development:
- Redfin for providing comprehensive real estate data
- U.S. Census Bureau for ZIP code boundary data
- MapLibre GL JS Community for the excellent mapping library
- React & Vite Teams for the modern development experience
- shadcn for the beautiful component library
Making housing data accessible and actionable for everyone