WP Residence — Locations, Listing Pages, Widgets, Import & Auto-Sync (with Scraping Fallback) Context Site runs on WordPress with WP Residence (current version). Goal: • Create/manage Locations (City/Area) with GPS, images, and copy. • Build dedicated listing pages per location (right sidebar). • Add location widgets (map, “About the area”, photo strip). • Import & auto-sync listings from ceskereality.cz (feed or scraping). • Auto-assign each listing to the correct City/Area based on street/address. Project Objectives (Summary) Import Locations (City/Area) with: name, slug, GPS (lat/lng), featured/hero image, optional gallery, short description. Dedicated Property List – Sidebar Right pages per location (e.g., “Prague 4 – Podolí”), pre-filtered by City/Area. Right-sidebar location widgets: embedded map, “About the Area” box, photo strip/gallery, optional Latest Posts. Import & scheduled sync from ceskereality.cz (create/update/archive), including media. Automatic City/Area assignment from street/address (details in Section 4). Scraping fallback if no reliable feed/API is available. Scope & Deliverables 2.1 Data Import: Locations (City/Area) Create/import Property City and Property Area terms (WP Residence taxonomies). For each location: slug, lat/lng, featured/hero image, optional gallery, short description. Seed at least 10 locations (e.g., Prague 4: Podolí, Braník, Nusle…). 2.2 Dedicated Listing Pages per Location Create Property List – Sidebar Right pages for top locations. In Property List Options, pre-filter to the correct City/Area. Assign a custom right sidebar per location (e.g., “Right – Prague 4 – Podolí”). Add these pages to Menus (structure TBA). 2.3 Location Widgets/Content Map: embedded Google/Mapbox (using location GPS) or WP Residence Map widget filtered to the location. About the Area: heading + paragraph + bullet list (transport, amenities, schools, green areas). Photo strip/gallery: 4–6 optimized images with ALT text. (Optional) Latest Posts filtered to a location blog category. 2.4 Import & Auto-Sync from ceskereality.cz (Feed or Scraping) Prefer official XML/JSON feed if available. If no reliable feed/API exists, implement a scraping pipeline with the same mapping & sync logic. Field mapping (feed or scrape) to estate_property: • external_id (unique), title, HTML description, price (+currency), layout, area (m²), condition, floor, type, energy class, etc. • Address: street, city, ZIP; map to Property City/Area. • GPS lat/lng (or geocode if missing). • Images: download to Media Library, set featured + gallery; avoid duplicates (checksum). • Features → property_features. Sync logic: create new; update by external_id; archive/unpublish when removed from source. Schedule: WP-Cron (e.g., every 2–4 h) + manual Run now in admin. Resilience (scraping): tolerant selectors (CSS/XPath in config), retry/backoff, per-domain throttle, polite user-agent. Logging: errors + per-run stats (created/updated/archived), downloadable log. 2.5 Additional Required Items (Integrated) Conditional sidebars for /city/... and /area/... archives (auto-show the correct location sidebar on taxonomy archives). Geocoding fallback when a listing lacks GPS (provider chosen in Settings → Import / Geocoding). Schema.org markup for listings (Real-estate relevant schema). Unified location hero on City/Area archives (using taxonomy image). Technical Requirements & Standards No core edits to WP Residence or WP. Deliver as a custom plugin (preferred) or child theme (update-safe). Safety: de-duplication via external_id, sanitize HTML, retries for image downloads. Performance: image optimization (thumbs, WEBP if possible), lazy-load compatible with cache; 12–18 items/page. Maps: use existing Google/Mapbox keys (we provide) or Leaflet if supported. SEO: location slugs like praha-4-podoli; consistent H1/H2; optional RealEstate schema. Accessibility: proper ALT text for images. Scraping compliance: respect robots.txt and TOS, throttle requests, no aggressive bypass (CAPTCHAs, etc.) unless explicitly approved. Auto-Assign Listings from Street/Address Goal: During import/update, automatically set Property City and Property Area from the listing’s street/address. Matching Pipeline Address normalization: strip diacritics; normalize tokens (“ul.” vs “ulice”); split: Street, House No., City, ZIP. Primary — Street→Area mapping table (admin-editable CSV/JSON with CRUD & import/export). Secondary — Geocoding / Reverse-geocoding (Google/Mapbox/OSM). Point-in-Polygon (GeoJSON): polygons for districts/areas (at least Prague 1–10 sub-areas incl. Podolí, Braník, Nusle…). Fallback — heuristics (search area names in address/description; flag as uncertain). Manual override + audit: property metabox (show/reassign/override) + bulk action. Sync behavior: re-run on address/GPS change unless override is ON. Tech Notes Geocoding cache; backoff/retries; provider switchable in admin. Polygons stored as /wp-content/uploads/geo/areas.geojson or inside the plugin; admin upload. Performance: hash-map for street lookup; geocode only on misses; bbox pre-filter before polygon test. Logging & reporting: counts per match type; CSV export of not-matched. Sample CSV: city_slug,area_slug,street_name_normalized,notes → e.g., praha-4,podoli,podolska,main corridor. Admin UX (Expected in WP Admin) Settings → Import / Geocoding: feed URL/credentials; provider keys; toggles; GeoJSON upload; CRUD for street→area; Run Import button; cron frequency; logs. (Scraping tab): toggle Feed vs. Scraping; base URLs/index paths; selectors config (JSON/YAML); Test selectors tool; rate limit; preview mode (N items, no save). Tools → Reassign City/Area: global recalculation (with confirmation); bulk action in Properties list. Documentation: short PDF/Markdown (run/import, troubleshooting, mapping, polygons). Testing & Acceptance Locations: ≥10 with GPS, description, hero/gallery, clean slugs. Dedicated pages: ≥5 using Property List – Sidebar Right, correctly filtered to City/Area. Sidebars: each of those 5 pages has map, About the Area, gallery (and optional Latest Posts). Import from ceskereality.cz: creates items; updates by external_id; archives removed ones. Cron: runs per schedule; manual trigger works; logs visible. Auto-assignment: on a batch of ≥200 listings, ≥85% matched (street table or geo/polygon); remainder exported as CSV. Manual override and bulk reassign work as specified. Performance: 12-item listing page loads in ~3s (with cache). No critical/fatal errors in logs over 48h. If Scraping is used: • On ≥200 listings, ≥95% of required fields captured (title, price, address/city, area, images). • Images downloaded and attached for ≥90%; no duplicate media files. • Politeness: average RPS within configured limit; 429/403 spikes ≤1% of requests; selector change can be fixed via config (no code changes). Access We Provide WP Admin (staging + production), staging FTP/SSH if needed. Google/Mapbox API keys. Feed URL/credentials for ceskereality.cz. List of top locations to build pages for. Brand assets (logo/colors). Handover ZIP of custom plugin/child theme. Config file for field mapping (if separate). Short documentation (PDF/MD). List of created pages (URLs), sidebars used, and taxonomy slugs. Developer Qualifications (Required) Proven experience with WordPress data imports, custom plugins, and WP Residence (or similar real-estate themes). Demonstrable scraping experience (polite, robust, selector-configurable pipelines). Experience with geocoding, GeoJSON polygons, and point-in-polygon matching. Solid understanding of performance, caching, and image pipelines (Media Library, WEBP, thumbnails). Provide at least 3 references/case studies (links + brief description) for comparable projects (imports, scraping, or real-estate sites). Please include a short solution outline (chosen geocoding provider, data structures), and timeline & milestones (import → pages → widgets → sync → auto-assign). Notes for the freelancer No core edits; update-safe code; clean namespacing; comments in EN, admin UI in CZ (or EN if preferred). Any third-party libraries used must be open-source and compatible with GPL. If you want, I can also provide a Czech version of this exact brief, or export this text as a nicely formatted PDF again.