HomeAI -- Israel Investment Finder

June 13, 2026 ยท View on GitHub

Powered by JustAIit

A real-time investment analysis platform for Israeli cities. HomeAI scores 200+ cities based on government open data, combining demographic trends, development activity, pricing signals, infrastructure quality, municipal finances, and environmental factors into a single composite investment score.


Features

  • Investment Scoring Engine -- 6 weighted sub-scores computed from 10 government datasets, producing a 0-100 composite score for every city
  • Interactive City Map -- Leaflet-based map with marker clustering, color-coded by investment score
  • City Detail View -- Deep-dive into any city with neighborhood-level data, score breakdowns, and demographic charts
  • Side-by-Side City Comparison -- Compare two or more cities across all scoring dimensions
  • Market Summary Charts -- Recharts-powered visualizations of national trends, district distributions, and score histograms
  • Responsive Design -- Optimized layouts for mobile, tablet, and desktop
  • Real-Time Data -- All metrics derived from 10 government datasets fetched via the CKAN API, with in-memory and disk caching
  • Mobile-Optimized Dashboard -- Compact 3-column stat row, city rankings as scrollable list on mobile and bar chart on desktop
  • Full City Map Coverage -- 200+ cities including the ~92 previously missing coordinates, resolved via district/subdistrict fallback

Tech Stack

LayerTechnology
FrameworkNext.js 16 (App Router)
UI LibraryReact 19
LanguageTypeScript
StylingTailwind CSS v4
Componentsshadcn/ui
MapsLeaflet / react-leaflet
ChartsRecharts
Data FetchingAxios, TanStack React Query
ValidationZod
Data SourceCKAN API (data.gov.il)

Investment Scoring Algorithm

Every city receives a composite investment score (0-100) calculated as the weighted sum of six sub-scores. Each sub-score uses percentile ranking across all cities, with per-capita normalization where appropriate.

Sub-ScoreWeightWhat It MeasuresData Sources
Development Momentum25%Urban renewal projects, construction activity, housing pipelineUrban Renewal, Construction Sites, Housing Inventory
Demand Signal20%Subscriber-to-winner ratio in subsidized housing, young adult share, demographic growth proxyMechir LaMishtaken, Population Demographics
Price Attractiveness20%Affordability relative to other cities (lower price = higher score)Mechir LaMishtaken (avg price per m2)
Infrastructure15%Public transit coverage, banking access, green building density (all per capita)Bus Stops, Bank Branches, Green Buildings
Municipal Health10%Budget surplus ratio, debt ratio, per-capita municipal incomeMunicipal Finances, Population Demographics
Environment10%Contaminated site density (fewer = better)Contaminated Land

Data Sources

All data is sourced from Israel's national open data portal (data.gov.il) via the CKAN API. No API keys are required.

DatasetSource Ministry / AgencyResource ID
Population DemographicsCentral Bureau of Statistics (CBS)64edd0ee-3d5d-43ce-8562-c336c24dbc1f
Urban Renewal ProjectsMinistry of Housingf65a0daf-f737-49c5-9424-d378d52104f5
Construction SitesMinistry of Housingb072e36c-a53b-49e1-be08-4a608fcf4638
Housing Inventory (Pipeline)Ministry of Housing99aad98f-2b54-4eea-834d-650b56389bf3
Mechir LaMishtaken (Subsidized Housing)Ministry of Housing7c8255d0-49ef-49db-8904-4cf917586031
Public HousingMinistry of Housingece87d7d-d79f-4278-8559-921218bc2b6a
Municipal FinancesMinistry of Interiore5ff9ad0-6db2-4660-a94e-4499fce9475d
Bank BranchesBank of Israel2202bada-4baf-45f5-aa61-8c5bad9646d3
Green BuildingsMinistry of Environmental Protection7f467a30-58cd-44b5-86f0-d570cc7d25ad
Bus StopsMinistry of Transporte873e6a2-66c1-494f-a677-f5e77348edb0
Contaminated LandMinistry of Environmental Protection54aa9ff1-2d89-4899-bb57-bf2a749ff4b3

Getting Started

git clone https://github.com/your-org/home-investment-app.git
cd home-investment-app
npm install
npm run dev

Open http://localhost:3000 in your browser.

No API keys are needed -- all data is publicly available via data.gov.il.

Available Scripts

CommandDescription
npm run devStart the development server
npm run buildCreate a production build
npm run startServe the production build
npm run lintRun ESLint

Project Structure

src/
  app/                  Pages and API routes (Next.js App Router)
    api/                Server-side API endpoints
    city-view/          City detail page
    compare/            Side-by-side comparison page
    explore/            Explore / browse cities
    methodology/        Scoring methodology explainer
    projects/           Project-level views
  components/           UI components
    brand/              Logo, branding elements
    city/               City card, city list
    city-view/          City detail view components
    compare/            Comparison view components
    dashboard/          Dashboard widgets and summary cards
    layout/             Header, footer, navigation
    map/                Leaflet map and marker components
    shared/             Reusable shared components
    ui/                 shadcn/ui primitives (Button, Card, etc.)
  config/               Dataset configuration and CKAN resource IDs
  data/                 Static data and seed files
  hooks/                Custom React hooks
  lib/                  Core logic
    ckan/               CKAN API client
    data/               Data aggregation and caching
    scoring/            Investment scoring engine (calculator, percentiles)
    utils/              Utility functions
  types/                TypeScript interfaces (CityProfile, ScoreBreakdown, etc.)
docs/                   Documentation

Architecture

data.gov.il (CKAN API)
        |
        v
  Next.js API Routes
  (fetch 11 datasets in parallel)
        |
        v
  Aggregator + Cache Layer
  (server-lifetime in-memory cache + disk fallback)
        |
        v
  Scoring Engine
  (percentile ranking, weighted composite)
        |
        v
  React UI
  (Dashboard, Map, City View, Compare)
  1. Data Ingestion -- The aggregator (src/lib/data/) fetches all datasets from data.gov.il via the CKAN datastore_search API in parallel. Hebrew field names are mapped to English using the field maps in src/config/datasets.ts.

  2. Caching -- Data is fetched once on server startup and held in memory for the server's lifetime (CACHE_TTL = Infinity). A warm-up call (warmCacheFromAPI()) fires on module load so data is hot before the first user request. If the startup fetch is still in progress when an SSR request arrives, the server waits up to 20 s then falls back to the persistent disk cache (.data-cache/raw-datasets.json), ensuring SSR is never blocked indefinitely. Each dataset fails gracefully and independently.

  3. Scoring -- The scoring engine (src/lib/scoring/calculator.ts) computes percentile ranks across all cities for each metric, normalizes per capita where relevant, and produces six sub-scores that are combined into a weighted composite.

  4. Presentation -- The React frontend consumes scored city profiles via TanStack React Query and renders them across the dashboard, interactive map, city detail pages, and comparison views.


License

MIT