"""Polished, functional and entirely local Angi WebsiteBench clone.""" from __future__ import annotations import html import json import os import secrets from pathlib import Path from typing import Any from urllib.parse import parse_qs, urlencode from fastapi import FastAPI, HTTPException, Request from fastapi.responses import HTMLResponse, JSONResponse, RedirectResponse from fastapi.staticfiles import StaticFiles from angi_app import db, seed from angi_app.api import Ctx, ensure_profile, router, set_cookie from angi_app.services import SERVICES SITE_ID = "angi" ROOT = Path(__file__).resolve().parent ARTICLE_TOPICS = [ "planning-a-local-plumbing-project", "questions-to-ask-a-home-service-pro", "understanding-a-synthetic-project-estimate", "preparing-for-a-repair-visit", "comparing-home-service-quotes", "seasonal-home-maintenance-checklist", "when-to-repair-or-replace-a-fixture", "how-to-document-a-home-project", "building-a-realistic-remodel-budget", "simple-ways-to-prevent-water-damage", "choosing-a-project-time-window", "reading-a-local-provider-profile", "organizing-project-messages", "home-safety-before-a-service-visit", "what-a-project-deposit-means", "reviewing-completed-local-work", "planning-an-electrical-inspection", "preparing-for-seasonal-hvac-service", "painting-project-scope-basics", "roof-maintenance-planning", "one-time-cleaning-project-guide", "landscaping-project-checklist", "handyperson-visit-preparation", "keeping-project-records-together", ] HUB_PATHS = { "appliances", "construction", "electrical", "flooring", "foundation", "home-exterior", "home-interior", "hvac", "landscaping", "pest-control", "plumbing", "real-estate", "remodeling", "roofing-siding", "outdoor-property", "waste-disposal", } POPULAR_CATEGORY_SLUGS = """ asbestos-abatement awning-contractors basement-leak-repair basement-remodeling basement-waterproofing bathtub-refinishing blind-installers carpet-installation carpet-stretching countertop-contractors crawl-space-encapsulation deck-cleaning deck-repair deck-staining demolition-services door-installation drainage-companies driveway-sealcoating dryer-vent-companies drywall-installers emergency-plumbers emergency-roofing excavation-companies exterior-painting fireplace-repair flooring-companies foundation-contractors foundation-repair furnace-repair furniture-refinishing garage-floor-coatings garage-remodeling gardeners ge-appliance-repair generator-installation generator-repair gravel-driveway-companies home-additions home-remodeling house-appraisers hvac-repairs install-above-ground-pools install-chain-link-fence install-seamless-gutters install-security-cameras install-water-softener interior-painting junk-removal kitchen-remodeling lawn-aeration masonry metal-roof-installers metal-roofers natural-gas-plumbers paint-stripping patio-companies plumbing plumbing-handymen plumbing-repair pool-liner-installation pool-repair pool-services power-washing recliner-repair repair-home-audio repair-patio-furniture roof-repair roof-siding sandblasting-services septic-tank-companies shed-construction shower-door-installation shower-installers siding-contractors soil-delivery spray-foam-insulation sprinkler-repair tile-contractors tree-trimming tv-antenna-installation tv-mount-install wallpaper-installation wasp-bee-removal weed-services welding-services well-pump-repair-service whirlpool-appliance-repair window-ac-repair window-cleaning window-companies window-screen-repair wood-floor-refinishing yard-clean-up """.split() HEADER_MENUS = ( ( "Interior", "/home-interior", (("Appliance Repair", "appliance-repair"), ("Carpet Cleaning", "carpet-cleaning"), ("Contractors", "contractor"), ("Drywall", "drywall"), ("Electrical", "electrical"), ("Flooring", "flooring"), ("HVAC", "hvac"), ("House Cleaning", "house-cleaning"), ("Interior Painting", "interior-painting"), ("Plumbing", "plumbing"), ("Remodeling", "kitchen-and-bath-remodeling")), (("How Much Does a Closet Remodel Cost?", "/articles/closet-remodel-cost.htm"), ("How Much Does It Cost to Build or Replace a Staircase?", "/articles/how-much-does-building-stairs-and-railings-cost.htm"), ("How Much Does Widening a Doorway Cost?", "/articles/widening-doorway-cost.htm"), ("How Much Does Wallpaper Removal Cost?", "/articles/how-much-does-it-cost-remove-wallpaper.htm")), ), ( "Exterior", "/home-exterior", (("Concrete Repair", "concrete-repair"), ("Doors", "doors"), ("Driveways", "driveways"), ("Exterior Painting", "exterior-painting"), ("Garage Doors", "garage-doors"), ("Gutter Cleaning", "gutter-cleaning"), ("Gutter Repair", "gutter-repair-replacement"), ("Home Builders", "home-builders"), ("Masonry", "masonry"), ("Roofing", "roofing"), ("Siding", "siding"), ("Windows", "windows")), (("How Much Does It Cost to Install Exterior Trim?", "/articles/exterior-trim-installation-cost.htm"), ("How Much Does Ipe Wood Decking Cost?", "/articles/how-much-does-ipe-wood-decking-cost.htm"), ("How Much Does a Dog Fence Cost to Install?", "/articles/different-types-dog-fences-and-how-much-they-cost.htm"), ("How Much Does It Cost to Pressure Wash a House?", "/articles/how-much-does-it-cost-pressure-wash-house.htm")), ), ( "Lawn & Garden", "/landscaping", (("Decks", "decks-and-porches"), ("Fencing", "fencing"), ("Land Surveying", "land-surveying"), ("Landscaping", "landscaping"), ("Lawn & Yard Work", "lawn-and-yard-work"), ("Leaf Removal", "leaf-removal"), ("Patios", "sunroom-and-patio-remodeling"), ("Pool Installation", "swimming-pools"), ("Sprinkler Systems", "lawn-irrigation"), ("Sunrooms", "sunroom-contractors"), ("Tree Service", "tree-service")), (("How Much Does Interlocking Paver Installation Cost?", "/articles/interlocking-pavers-cost.htm"), ("How Much Does a Land Survey Cost?", "/articles/how-much-does-land-survey-cost.htm"), ("How Much Does Flowerbed Installation Cost?", "/articles/flowerbed-installation-cost.htm"), ("How Much Does Site Preparation Cost?", "/articles/site-preparation-cost.htm")), ), ( "More", "/articles", (("Basement Waterproofing", "basement-waterproofing"), ("Handyperson", "handyman-service"), ("Junk Hauling", "hauling"), ("Locksmiths", "locksmiths"), ("Moving Companies", "moving"), ("Pest Control", "pest-control"), ("Pressure Washing", "pressure-washing"), ("Septic Tanks", "septic-tank")), (("How Much Does It Cost to Remodel a House?", "/articles/how-much-does-it-cost-to-remodel-a-house.htm"), ("How Much Do Well Water Treatment Systems Cost?", "/articles/well-water-treatment-systems-cost.htm"), ("How Much Does It Cost to Replace Weatherstripping?", "/articles/weatherstripping-replacement-cost.htm"), ("How Much Does It Cost to Rent a Dump Trailer?", "/articles/cost-to-rent-a-dump-trailer.htm")), ), ( "Articles & Advice", "/articles", (("Appliances", "/appliances"), ("Foundation", "/foundation"), ("Bathroom Remodeling", "/remodeling/bathroom-remodeling"), ("Chimney", "/home-exterior/chimney"), ("Home Cleaning", "/home-interior/home-cleaning"), ("New Build", "/construction/new-build"), ("Electrical", "/electrical"), ("Flooring", "/flooring"), ("Furniture", "/home-interior/furniture"), ("Driveway", "/outdoor-property/driveway"), ("HVAC", "/hvac"), ("Construction", "/construction"), ("Home Exterior", "/home-exterior"), ("Home Interior", "/home-interior"), ("Kitchen Remodeling", "/remodeling/kitchen-remodeling"), ("Landscaping", "/landscaping"), ("Moving & Relocation", "/real-estate/moving-relocation"), ("Outdoor Living", "/outdoor-property/outdoor-living"), ("Pest Control", "/pest-control"), ("Plumbing", "/plumbing"), ("Real Estate", "/real-estate"), ("Remodeling", "/remodeling"), ("Roofing & Siding", "/roofing-siding"), ("Waste Disposal", "/waste-disposal"), ("Project Cost Center", "/articles/cost")), (("How Much Does It Cost to Paint Your Home?", "/articles/cost-paint-interior-and-exterior.htm"), ("How Much Does It Cost to Repair a Linoleum Floor?", "/articles/linoleum-floor-repair-cost.htm"), ("How Much Does HVAC Maintenance Cost?", "/articles/ac-service-cost.htm"), ("How Much Does Solar Water Heater Repair Cost?", "/articles/solar-water-heater-repair-cost.htm")), ), ) SERVICE_PRESENTATIONS = { "plumbing": ("plumbers", "plumbing-hero.jpg", "plumbing-hero-mobile.jpg"), "electrical": ("electrical pros", "heroes/hero-electrician.jpg", "heroes/hero-electrician.jpg"), "heating-cooling": ("heating and cooling pros", "hvac.jpg", "hvac.jpg"), "interior-painting": ("interior painting pros", "article-family-kitchen.jpg", "article-family-kitchen-small.jpg"), "roofing": ("roofing pros", "roofing.jpg", "roofing.jpg"), "house-cleaning": ("house cleaning pros", "cleaning.jpg", "cleaning.jpg"), "landscaping": ("landscaping pros", "heroes/hero-gardening.jpg", "heroes/hero-gardening.jpg"), "handyman": ("handyperson pros", "handyperson.jpg", "handyperson.jpg"), } app = FastAPI(title="Angi local home services", docs_url=None, redoc_url=None, openapi_url=None) app.include_router(router) app.mount("/static", StaticFiles(directory=ROOT / "static"), name="static") def esc(value: Any) -> str: return html.escape(str(value or ""), quote=True) def category_navigation() -> str: menus = [] for label, view_all, primary, research in HEADER_MENUS: primary_links = "".join( f'{esc(name)}' for name, path in primary ) research_links = "".join( f'{esc(name)}' for name, path in research ) primary_heading = "Research & plan" if label == "Articles & Advice" else "Find a pro" secondary_heading = "Featured articles" if label == "Articles & Advice" else "Research & plan" menus.append( f'
{esc(label)}
' f'
{primary_heading}View all
' f'
{secondary_heading}View all
' "
" ) return "".join(menus) def popular_categories() -> str: links = "".join( f'{esc("plumbers" if slug == "plumbing" else slug.replace("-", " "))} near me' for slug in POPULAR_CATEGORY_SLUGS ) return f'' def source_footer() -> str: return """""" def service_presentation(slug: str, label: str) -> tuple[str, str, str]: if slug in SERVICE_PRESENTATIONS: return SERVICE_PRESENTATIONS[slug] groups = ( (("roof", "gutter"), "heroes/hero-gutter.jpg"), (("tree", "lawn", "garden", "yard", "weed", "landscap", "soil", "sprinkler"), "heroes/hero-gardening.jpg"), (("electric", "generator", "security", "tv-", "antenna"), "heroes/hero-electrician.jpg"), (("insulation", "furnace", "hvac", "ac-repair"), "heroes/hero-insulation.jpg"), (("crawl", "basement", "foundation", "pest", "wasp"), "heroes/hero-crawlspace.jpg"), (("siding", "window", "exterior", "awning"), "heroes/hero-vinyl.jpg"), (("deck", "patio", "door", "driveway", "masonry", "concrete", "shed", "pool"), "heroes/hero-framing.jpg"), (("plumb", "drain", "water", "well", "septic"), "plumbing-hero.jpg"), (("clean", "carpet", "shower", "bathtub", "tile", "wallpaper", "furniture", "recliner"), "cleaning.jpg"), ) hero = next((image for terms, image in groups if any(term in slug for term in terms)), "handyperson.jpg") noun = "plumbers" if slug == "plumbing" else f"{label.lower()} pros" return noun, hero, hero def money(cents: int) -> str: return f"${cents / 100:,.0f}" def current(request: Request) -> Ctx: return Ctx(request) def layout(request: Request, title: str, body: str, *, active: str = "") -> HTMLResponse: c = current(request) signed_in = bool(c.account_id and c.profile) # Keep the deterministic fixture visibly authenticated without rendering # account-specific source data in captures or committed artifacts. label = "Hi Member" if signed_in else "Hi Homeowner" avatar = "S" account = "/account" if signed_in else "/login" if signed_in: primary_links = f"✦ Find ProsMy ProjectsInbox" header_actions = f"{avatar}{esc(label)}" else: primary_links = f"✦ Find ProsJoin as a Pro" header_actions = "Log InSign Up" category_links = category_navigation() return HTMLResponse(f""" {esc(title)} | Angi
How can we help?
{header_actions}
{body}
{source_footer()}
""") def provider_card(provider: dict[str, Any]) -> str: services = json.loads(provider["services_json"]) service_label = services[0].replace("-", " ").title() badges = "".join(["✓ Screened" if provider["verified"] else "", "Licensed" if provider["licensed"] else "", "Insured" if provider["insured"] else ""]) return f"""
{''.join(x[0] for x in provider['name'].split()[:2])}

{esc(service_label)}

{esc(provider['name'])}

★ {provider['rating']:.1f} · {provider['review_count']} reviews · {provider['years_in_business']} years

{badges}

{esc(provider['bio'])}

Responds in about {provider['response_minutes']} minView profile
""" @app.get("/healthz") def healthz() -> JSONResponse: with SERVICES.auth.connect() as connection: connection.execute("SELECT 1").fetchone() build = os.environ.get("DEPLOYMENT_BUILD_ID", os.environ.get("SOURCE_REF", "")) return JSONResponse({"ok": True, "site_id": SITE_ID, "version": "angi-offline-v1"}, headers={"X-WebsiteBench-Container-Build-ID": build}) def _verification_token(request: Request) -> bool: expected = os.environ.get("WEBSITEBENCH_VERIFY_TOKEN", "") supplied = request.headers.get("x-websitebench-verify-token", "") return bool(expected and supplied and secrets.compare_digest(expected, supplied)) @app.post("/__websitebench__/session") async def verification_session(request: Request) -> JSONResponse: """Create one guarded, deterministic local browser fixture session.""" if not _verification_token(request): return JSONResponse({"error": "fixture endpoint unavailable"}, status_code=404) form = parse_qs((await request.body()).decode("utf-8", "replace")) actor = str((form.get("actor") or ["homeowner"])[0]) if actor not in {"homeowner", "provider"}: return JSONResponse({"error": "unknown fixture actor"}, status_code=422) email = f"verify-{actor}@angi.example.test" password = "LocalFixture!2026" account_id = SERVICES.auth.seed_account( subject_id=f"angi-verify-{actor}", email=email, display_name=f"Synthetic {actor.title()}", password=password, email_verified=True, ) session_token, _ = SERVICES.auth.ensure_session(None) signed_in = SERVICES.auth.sign_in(session_token, email=email, password=password) account = signed_in["account"] with SERVICES.auth.connect() as connection: ensure_profile( connection, account_id=account_id, email=email, name=account["display_name"], ) connection.execute( "UPDATE an_profiles SET role=?,phone=?,city=?,state=?,zip=? WHERE account_id=?", (actor, "212-555-0100", "Brooklyn", "NY", "11201", account_id), ) project_id = f"fixture-{actor}-project" connection.execute( """INSERT OR IGNORE INTO an_projects( project_id,account_id,service_slug,title,status,current_step, scope_json,location_json,schedule_json,confirmation_code, hired_provider_id,selected_quote_id,appointment_at,deposit_cents, final_cents,refund_cents,created_at,updated_at ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)""", ( project_id, account_id, "plumbing", "Synthetic plumbing repair", "matched", 5, db.dumps({"issue": "leak", "description": "Synthetic fixture"}), db.dumps({"city": "Brooklyn", "state": "NY", "zip": "11201"}), db.dumps({"date": "2026-09-12", "time_window": "morning"}), "ANG-FIXTURE", None, None, None, 0, 0, 0, 1, 1, ), ) connection.execute( "INSERT OR IGNORE INTO an_quotes VALUES (?,?,?,?,?,?,?,?,?,?)", ( f"fixture-{actor}-quote", project_id, "pro-brightpipe", 64000, 12800, 1, "2026-09-12 09:00", "Synthetic diagnostic quote.", "offered", 1, ), ) connection.execute( "INSERT OR IGNORE INTO an_messages VALUES (?,?,?,?,?,?)", ( f"fixture-{actor}-message", project_id, "pro-brightpipe", "provider", "Synthetic local fixture message.", 1, ), ) connection.execute( "INSERT OR IGNORE INTO an_events VALUES (?,?,?,?,?)", ( f"fixture-{actor}-event", project_id, "matched", "Synthetic providers matched locally", 1, ), ) connection.execute( "INSERT OR IGNORE INTO an_favorites VALUES (?,?,?)", (account_id, "pro-brightpipe", 1), ) response = JSONResponse({"ok": True, "actor": actor, "project_id": project_id}) set_cookie(response, request, signed_in["session_token"]) return response @app.post("/__websitebench__/reset") def verification_reset(request: Request) -> JSONResponse: """Reset all site-owned and auth state behind the same verifier token.""" if not _verification_token(request): return JSONResponse({"error": "fixture endpoint unavailable"}, status_code=404) SERVICES.auth.reset_site_state( site_reset=seed.reset_business_state, seed_accounts=[], ) return JSONResponse({"ok": True, "site_id": SITE_ID, "reset": "deterministic"}) @app.get("/") def home(request: Request) -> HTMLResponse: categories = [ ("handyman", "handyperson", "Handyperson"), ("landscaping", "landscaping", "Landscaping"), ("plumbing", "plumbing", "Plumbing"), ("electrical", "electrical", "Electrical"), ("handyman", "remodeling", "Remodeling"), ("roofing", "roofing", "Roofing"), ("interior-painting", "painting", "Painting"), ("house-cleaning", "cleaning", "Cleaning"), ("heating-cooling", "hvac", "HVAC"), ("handyman", "windows", "Windows"), ("handyman", "concrete", "Concrete"), ] service_cards = "".join( f"{label}" for slug, icon, label in categories ) demand_items = [ ("house-cleaning", "cleaning", "Cleaning & Maid Services", 13), ("heating-cooling", "hvac", "Air Conditioning", 8), ("roofing", "roofing", "Roofing", 7), ("handyman", "handyperson", "Handyman Service", 7), ("landscaping", "landscaping", "Landscaping", 6), ("handyman", "remodeling", "Addition and Remodeling", 6), ("pest-control", "landscaping", "Pest Control", 5), ("interior-painting", "painting", "Painting", 5), ] demand_cards = "".join( f'{label}⌁ {count} homeowners interested' for slug, icon, label, count in demand_items ) project_items = [ ("/services/handyman", "handyperson.jpg", "Handyperson for Small Projects", "4.6", "599k+", "$158"), ("/services/house-cleaning", "cleaning.jpg", "One-time Cleaning Service", "4.5", "314k+", "$102"), ("/services/heating-cooling", "hvac.jpg", "Air Conditioning Service & Repair", "4.7", "306k+", "$350"), ("/services/plumbing", "plumbing.jpg", "Faucet & Plumbing Repair Services", "4.6", "568k+", "$226"), ("/services/roofing", "roofing.jpg", "Roof Installation & Repair", "4.7", "325k+", "$471"), ("/search?q=bathroom", "bathroom.jpg", "Bathroom Remodel", "4.4", "180k+", "$2,500"), ] project_cards = [ f'
{title}

★ {rating} ({reviews}) | from {price}

{title}
' for href, image, title, rating, reviews, price in project_items ] cost_guides = [ ("article-baseboard-heat.jpg", "new-furnace-cost", "LAUREN BONGARD", "MAR 17, 2026", "How Much Does a New Furnace Cost? [2026 Data]", "When it’s time to replace the furnace, review this guide for new furnace costs based on type, size, and efficiency, plus furnace installation costs."), ("article-snow-house.jpg", "roof-snow-removal-cost", "ANGI", "MAR 5, 2026", "How Much Does Roof Snow Removal Cost? [2026 Data]", "Discover the average cost of roof snow removal, key price factors, and ways to save. Get transparent estimates to protect your home this winter."), ("article-snow-suburban.jpg", "insulation-installation-cost", "RACHEL HOFFMAN", "MAY 30, 2026", "How Much Does Insulation Installation Cost? [2026 Data]", "New insulation can make your home more comfortable and boost energy efficiency. Use this insulation cost guide to get an accurate estimate for the installation."), ("plumbing.jpg", "plumbing-repair-cost", "STEPHANIE MICKELSON", "MAR 17, 2026", "How Much Does Plumbing Repair Cost? [2026 Data]", "The costs for common plumbing issues are determined based on parts, labor, and expertise level. Read our guide to find out how much you should budget."), ("cleaning.jpg", "deep-cleaning-house-cost", "ANGI", "MAR 17, 2026", "How Much Does Deep Cleaning a House Cost? [2026 Data]", "Discover the average cost of deep cleaning a house, key price factors, and tips to save. Get accurate estimates to plan your next deep clean with confidence."), ("article-cozy-family.jpg", "winterize-house-cost", "RACHEL HOFFMAN", "AUG 3, 2026", "How Much Does It Cost to Winterize a House? [2026 Data]", "Winterizing a house depends on its type, size, location, and more. Our guide breaks down how much it costs to winterize a home."), ] cost_guide_cards = "".join( f'
{title}{author}  ·  {date}

{title}

{intro}

' for image, slug, author, date, title, intro in cost_guides ) body = f"""

The one you trust to find the ones you trust.

{service_cards}

Pick up where you left off

BASED ON YOUR RECENT SEARCH

Foundation, Basement or Crawlspace - Waterproofing / Encapsulation

Resume

Most in-demand home services in 90013

Don't miss your chance to book a pro

{demand_cards}

Knowledge is priceless - so our cost guides are free.

Sign up to get free project cost info in your inbox.

Popular home projects

{''.join(project_cards[:3])}

Keep your home in tip-top shape

{''.join(project_cards[3:])}
{popular_categories()}""" return layout(request, "Home services made simple", body, active="services") def search_gate_modal() -> str: """Source-observed public search gate; submission stays inside the local clone.""" underlay = """""" return underlay + """""" @app.get("/search") def search(request: Request) -> HTMLResponse: q = request.query_params query = q.get("q", "").strip().lower() service = q.get("service", "") zip_code = q.get("zip", "") verified = q.get("verified") == "1" rating = float(q.get("rating", "0") or 0) price = int(q.get("price", "0") or 0) sort = q.get("sort", "recommended") try: page = max(1, int(q.get("page", "1") or 1)) except ValueError: page = 1 if not q: states = [ "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Washington DC", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming", ] state_links = "".join(f"{esc(state)} Pros" for state in states) body = f"""
Local home service pro at work

Find top-rated pros in your area.

Find Pros in Your State ⌃

{state_links}
""" return layout(request, "Search Real Local Reviews, Home Services Guide", body + search_gate_modal(), active="services") with SERVICES.auth.connect() as connection: services = db.rows(connection.execute("SELECT * FROM an_services ORDER BY name").fetchall()) providers = db.rows(connection.execute("SELECT * FROM an_providers").fetchall()) if query and not service: match = next((item for item in services if query in item["name"].lower() or query in item["summary"].lower()), None) service = match["slug"] if match else "" for item in providers: item["services"] = json.loads(item["services_json"]) item["distance"] = db.distance(zip_code, item["zip"]) if zip_code else 0 if service: providers = [item for item in providers if service in item["services"]] if zip_code: providers = [item for item in providers if item["distance"] <= item["radius_miles"]] if verified: providers = [item for item in providers if item["verified"]] if rating: providers = [item for item in providers if item["rating"] >= rating] if price: providers = [item for item in providers if item["price_level"] <= price] keys = {"rating": lambda x: -x["rating"], "reviews": lambda x: -x["review_count"], "distance": lambda x: x["distance"], "price": lambda x: x["price_level"]} providers.sort(key=keys.get(sort, lambda x: (-x["verified"], -x["rating"], x["response_minutes"]))) total_providers = len(providers) page_size = 19 page_count = max(1, (total_providers + page_size - 1) // page_size) page = min(page, page_count) page_providers = providers[(page - 1) * page_size : page * page_size] options = "".join(f"" for item in services) cards = "".join(provider_card(item) for item in page_providers) empty = "" if total_providers else "

No pros match those filters

Try a nearby ZIP, lower rating threshold or clear filters. Your project details are unchanged.

Expand search
" base_query = { key: value for key, value in { "q": query, "service": service, "zip": zip_code, "verified": "1" if verified else "", "rating": str(rating) if rating else "", "price": str(price) if price else "", "sort": sort if sort != "recommended" else "", }.items() if value } pager = "" if page_count == 1 else "" body = f"""

Compare local help

Find a home service pro

{total_providers} pros found {('near '+esc(zip_code)) if zip_code else ''}

{empty}
{cards}
{pager}
""" return layout(request, "Find a pro", body + search_gate_modal(), active="services") @app.get("/find") def find(request: Request) -> HTMLResponse: """Render the source site's public find entry as a local destination.""" body = """

Find top-rated service pros for your project!

Popular categories

""" return layout(request, "Find home service professionals", body, active="services") @app.get("/services/{slug}") def service_detail(slug: str, request: Request) -> HTMLResponse: with SERVICES.auth.connect() as connection: service = db.row(connection.execute("SELECT * FROM an_services WHERE slug=?", (slug,)).fetchone()) providers = db.rows(connection.execute("SELECT * FROM an_providers").fetchall()) if not service: return layout(request, "Service not found", "

Service not found

Browse services
") providers = [item for item in providers if slug in json.loads(item["services_json"])][:3] pro_noun, hero_image, mobile_hero_image = service_presentation(slug, service["name"]) body = f"""
{esc(service['name'])}/{esc(service['name'])} Pros
{esc(service['name'])} professional at work

Get matched with top {esc(pro_noun)} in Los Angeles, CA

Enter your zip and get matched with up to 3 pros

Matching on Angi

Share some details about your home project.

Within moments, match with highly-rated local pros.

Compare quotes and choose the best pro for the job.

{esc(pro_noun).capitalize()} near you

{''.join(provider_card(item) for item in providers)}

Local cost planning

Estimate this project

Choose a scope and urgency to save a deterministic local range. No provider is contacted.

""" return layout(request, service["name"], body, active="services") @app.get("/pros/{slug}") def provider_detail(slug: str, request: Request) -> HTMLResponse: with SERVICES.auth.connect() as connection: provider = db.row(connection.execute("SELECT * FROM an_providers WHERE slug=?", (slug,)).fetchone()) if not provider: return layout(request, "Provider not found", "

Provider not found

Find another pro
") portfolio = db.rows(connection.execute("SELECT * FROM an_portfolio WHERE provider_id=?", (provider["provider_id"],)).fetchall()) reviews = db.rows(connection.execute("SELECT * FROM an_public_reviews WHERE provider_id=? AND public=1 ORDER BY created_at DESC", (provider["provider_id"],)).fetchall()) services = json.loads(provider["services_json"]) availability = json.loads(provider["availability_json"]) gallery = "".join(f"
Project photo

{esc(item['title'])}

{esc(item['caption'])}

" for item in portfolio) review_html = "".join(f"

{'★'*item['rating']}{'☆'*(5-item['rating'])}

{esc(item['body'])}

{esc(item['author'])} · {esc(item['service_type'])}
" for item in reviews) slots = "".join(f"" for slot in availability) or "" service_opts = "".join(f"" for s in services) display_name = "Tony's Plumbing, Inc." if slug == "bright-pipe-plumbing" else provider["name"] display_reviews = 490 if slug == "bright-pipe-plumbing" else provider["review_count"] display_years = 32 if slug == "bright-pipe-plumbing" else provider["years_in_business"] display_services = "Sewer Main - Clear, Plumbing for a Remodel or Addition - Install, Faucets, Fixtures and Pipes
Repair or Replace, +24 more" if slug == "bright-pipe-plumbing" else esc(provider["bio"]) display_about = "Over many years of quality and professional service; Tony's Plumbing, a family owned & operated business, has acquired the ability to quickly and accurately diagnose the work that needs to be done. This makes it possible for us to provide you with a realistic and fair estimate before any service is begun. If we can help you with a project or an estima..." if slug == "bright-pipe-plumbing" else esc(provider["bio"]) body = f"""
Angi/CA/Harbor City
ⓐ Approved (Corporate)

{esc(display_name)}

★★★★★ {provider['rating']:.1f} ({display_reviews})

{display_services}

About us

{display_about}

Read more

Business highlights

⚙   {display_years} years of experience

Project portfolio

Synthetic examples
{gallery}

Homeowner reviews

Public local-demo reviews only
{review_html or '

No public reviews yet.

'}

Availability

Choose a preferred time

Selection is carried into a local request and can be changed later.

Nothing is sent to {esc(provider['name'])}; this is a synthetic workflow.

""" return layout(request, provider["name"], body, active="services") @app.get("/nearme/") def all_nearby_services(request: Request) -> HTMLResponse: return find(request) @app.get("/nearme/{slug}/") def nearby_directory(slug: str, request: Request) -> HTMLResponse: service_aliases = { "hvac": "heating-cooling", "interior-painting": "interior-painting", "house-cleaning": "house-cleaning", "handyman-service": "handyman", } service_slug = service_aliases.get(slug, slug) try: page = max(1, int(request.query_params.get("page", "1"))) except ValueError: page = 1 with SERVICES.auth.connect() as connection: service = db.row( connection.execute( "SELECT * FROM an_services WHERE slug=?", (service_slug,) ).fetchone() ) providers = db.rows( connection.execute( "SELECT * FROM an_providers ORDER BY verified DESC,rating DESC,review_count DESC" ).fetchall() ) if service: providers = [ item for item in providers if service_slug in json.loads(item["services_json"]) ] page_size = 19 page_count = max(1, (len(providers) + page_size - 1) // page_size) page = min(page, page_count) items = providers[(page - 1) * page_size : page * page_size] label = service["name"] if service else slug.replace("-", " ").title() pro_noun, hero_image, mobile_hero_image = service_presentation(slug, label) pager = "".join( f"{number}" for number in range(1, page_count + 1) ) body = f"""
Services near me/{esc(label)} Pros
{esc(label)} professional at work

Get matched with top {esc(pro_noun)} in Los Angeles, CA

Enter your zip and get matched with up to 3 pros

Matching on Angi

Share some details about your home project.

Within moments, match with highly-rated local pros.

Compare quotes and choose the best pro for the job.

{esc(pro_noun).capitalize()} near you

{''.join(provider_card(item) for item in items)}
""" return layout(request, f"{label} near me", body, active="services") @app.get("/companylist/") def company_list(request: Request) -> HTMLResponse: states = [ ("al", "Alabama"), ("ak", "Alaska"), ("az", "Arizona"), ("ar", "Arkansas"), ("ca", "California"), ("co", "Colorado"), ("ct", "Connecticut"), ("de", "Delaware"), ("dc", "Washington DC"), ("fl", "Florida"), ("ga", "Georgia"), ("hi", "Hawaii"), ("id", "Idaho"), ("il", "Illinois"), ("in", "Indiana"), ("ia", "Iowa"), ("ks", "Kansas"), ("ky", "Kentucky"), ("la", "Louisiana"), ("me", "Maine"), ("md", "Maryland"), ("ma", "Massachusetts"), ("mi", "Michigan"), ("mn", "Minnesota"), ("ms", "Mississippi"), ("mo", "Missouri"), ("mt", "Montana"), ("ne", "Nebraska"), ("nv", "Nevada"), ("nh", "New Hampshire"), ("nj", "New Jersey"), ("nm", "New Mexico"), ("ny", "New York"), ("nc", "North Carolina"), ("nd", "North Dakota"), ("oh", "Ohio"), ("ok", "Oklahoma"), ("or", "Oregon"), ("pa", "Pennsylvania"), ("ri", "Rhode Island"), ("sc", "South Carolina"), ("sd", "South Dakota"), ("tn", "Tennessee"), ("tx", "Texas"), ("ut", "Utah"), ("vt", "Vermont"), ("va", "Virginia"), ("wa", "Washington"), ("wv", "West Virginia"), ("wi", "Wisconsin"), ("wy", "Wyoming"), ] links = "".join( f"{name} Pros" for code, name in states ) return layout( request, "Search Real Local Reviews, Home Services Guide", f"
Local home service pro at work

Find top-rated pros in your area.

Find Pros in Your State ⌃

{links}
", active="services", ) @app.get("/companylist/us/{state}/") def state_company_list(state: str, request: Request) -> HTMLResponse: state_names = {"ca": "California", "ny": "New York"} state_name = state_names.get(state.lower(), state.upper()) california_cities = [ "Acton", "Adelanto", "Agoura Hills", "Agua Dulce", "Aguanga", "Ahwahnee", "Alameda", "Albany", "Alhambra", "Aliso Viejo", "Alpine", "Alta", "Altadena", "Alturas", "Amador City", "American Canyon", "Anaheim", "Goleta", "Gonzales", "Goshen", "Graeagle", "Granada Hills", "Grand Terrace", "Granite Bay", "Grass Valley", "Greenbrae", "Greenfield", "Greenville", "Gridley", "Groveland", "Guadalupe", "Gualala", "Guerneville", "Gustine", "Penryn", "Perris", "Petaluma", "Phelan", "Phillipsville", "Pico Rivera", "Piedmont", "Pilot Hill", "Pine Grove", "Pine Mountain Club", "Pinole", "Pioneer", "Pismo Beach", "Pittsburg", "Placentia", "Placerville", "Planada", ] city_links = "".join(f"{esc(city)} Pros" for city in california_cities) return layout( request, f"Home service pros in {state.upper()}", f"
Local home service pro at work

Find top-rated pros in your area.

Find Pros in these {esc(state_name)} cities ⌃

{city_links}
", active="services", ) @app.get("/companylist/us/{state}/{city}/") def city_company_list(state: str, city: str) -> RedirectResponse: location = city.replace("-", " ").title() query = urlencode({"service": "plumbing", "location": location, "state": state.upper()}) return RedirectResponse( f"/search?{query}", status_code=303, ) @app.get("/companylist/us/{state}/{city}/{slug}.htm") def source_company_detail( state: str, city: str, slug: str, request: Request ) -> HTMLResponse: if slug.endswith("companies"): service = "plumbing" if "plumbing" in slug else "handyman" return nearby_directory(service, request) if "221484" in slug or slug.lower().startswith("tony"): return provider_detail("bright-pipe-plumbing", request) with SERVICES.auth.connect() as connection: providers = db.rows( connection.execute("SELECT slug FROM an_providers ORDER BY slug").fetchall() ) exact = next((item for item in providers if item["slug"] == slug), None) if exact is None: index = sum(slug.encode("utf-8")) % len(providers) exact = providers[index] return provider_detail(str(exact["slug"]), request) @app.get("/articles") def article_collection(request: Request) -> HTMLResponse: try: page = max(1, min(2, int(request.query_params.get("page", "1")))) except ValueError: page = 1 page_size = 12 items = ARTICLE_TOPICS[(page - 1) * page_size : page * page_size] cards = "".join( f"

Home project guide

{esc(slug.replace('-', ' ').title())}

Synthetic editorial guidance for planning a local WebsiteBench home project.

Read guide →
" for slug in items ) cost_variant = request.url.path.rstrip("/") == "/articles/cost" hub_class = "solution-center-hero cost-center-hero" if cost_variant else "solution-center-hero" hub_crumb = "Angi  /  Solution Center" if cost_variant else "Angi" hub_title = "Project Cost Center" if cost_variant else "Angi Solution Center" hub_image = "articles-cost-hero.jpg" if cost_variant else "articles-current-hero.jpg" hub_alt = "Bathroom Remodel" if cost_variant else "Family enjoying their home" hub_credit = "Photo: Joe Hendrickson / iStock" if cost_variant else "Photo: PeopleImages / iStock / Getty Images Plus / Getty Images" explore_items = [ (("article-cozy-family" if cost_variant else "article-snow-house"), "closet-remodel-cost", ("Family sitting cozy at home looking out the window" if cost_variant else "A house during winter all covered in snow")), ("article-baseboard-heat", "plumbing-cost-guide", "Warm feet near a baseboard heater"), ("article-family-kitchen", "kitchen-remodel-cost", "Family spending time in a kitchen"), ("article-washing-dishes", "dishwasher-installation-cost", "Father and daughter washing dishes"), ("article-snow-suburban", "winter-home-maintenance", "Snow-covered suburban house"), ("article-paying-bills", "home-project-budget", "Couple planning a home project budget"), ] explore_cards = "".join( f"{esc(alt)}" for image, slug, alt in explore_items ) return layout(request, "Home Project Guides and Advice", f"
{hub_crumb}

{hub_title}

{hub_alt}
{hub_credit}
TRUSTED BY HOMEOWNERS★ 4.6
Average homeowner rating for Angi pros
● 150m+
Homeowners helped since 1995

Explore top articles

From average costs to expert advice, get all the answers you need to get your job done.

{explore_cards}
{cards}
") @app.get("/articles/cost") def cost_articles(request: Request) -> HTMLResponse: return article_collection(request) @app.get("/articles/author/{slug}") def article_author(slug: str, request: Request) -> HTMLResponse: if slug == "angi": body = """

Angi

Home Solutions Center

This article was created with the help of AI technology and edited by our editorial team for clarity and accuracy in accordance with Angi’s AI policy. We use AI tools to help deliver useful, easy-to-understand articles for Angi readers like you. Although AI technology supports our content creation, professional editors always review and fact-check it.

Articles by Angi

Closet remodel cost guide
""" return layout(request, "Articles by Angi", body) return layout( request, f"Articles by {slug.replace('-', ' ').title()}", f"

Solution Center author

{esc(slug.replace('-', ' ').title())}

Browse locally reproduced article-family fixtures without loading a remote CMS.

View all guides
", ) @app.get("/articles/{slug}.htm") def article_detail(slug: str, request: Request) -> HTMLResponse: title = slug.replace("-", " ").title() if slug == "closet-remodel-cost": title = "How Much Does a Closet Remodel Cost? [2026 Data]" return layout( request, title, f"

Solution Center  /  Remodeling  /  Utility Space Remodel  /  Closet Remodel  /  {esc(title)}

{esc(title)}

Closet service costs depend on your project and location. Check with a local pro for your specific job.

Get quotes from closet pros near you

No obligation · 100% free
Mitchell Grant

Written by Mitchell GrantContributing Writer

Updated Jul 9, 2026

Cost Insights:

Plan the scope, timing, access needs, and questions you want a local provider to answer.

", ) @app.get("/service-request/task/{task_id}") @app.get("/service-request/category/{task_id}") @app.get("/service-request-pro-direct/category/{task_id}") def service_request(task_id: str, request: Request) -> HTMLResponse: return source_not_found(request) @app.get("/chat") def local_chat(request: Request) -> HTMLResponse: return layout( request, "Project help", "

Local support

How can we help with your project?

This offline chat surface creates no external conversation. Open a project to keep a synthetic support case in its timeline.

Open my projects
", ) @app.get("/pro/register") def provider_registration(request: Request) -> HTMLResponse: return source_not_found(request) def source_not_found(request: Request) -> HTMLResponse: body = """
Angi

Hmm, we can't find the page you're looking
for.

Start a new search or go to the homepage to get back on track.

Popular projects near you

""" response = layout(request, "404 Page Not Found", body) response.status_code = 404 return response @app.get("/privacy") @app.get("/privacy-request") def privacy_not_found(request: Request) -> HTMLResponse: return source_not_found(request) @app.get("/terms") def legal_page(request: Request) -> HTMLResponse: nav = """Angi Terms of UseAngi Membership AgreementAngi Project Submission Customer AgreementAngi Privacy PolicyAngi Mobile Alerts Terms and ConditionsBook Now TermsMobile Application EULAAngi Key Membership TermsHappiness GuaranteeAngi Code of ConductLarge Service ProvidersAngi Pro Terms""" body = f"""""" return layout(request, "Angi Terms of Use", body) @app.get("/do-not-sell") def do_not_sell_page(request: Request) -> HTMLResponse: body = """

Do Not Sell or Share My Personal Information

We work with vendors that use cookies and other tracking technologies to gather information about your interactions with our website and third-party websites to deliver advertisements relevant to your interest. This collection of your personal information for advertising purposes is defined as a “sale” or “sharing” of data under the California Consumer Protection Act, as amended (“CCPA”), and as a “sale” under the Virginia Consumer Data Protection Act (“VCDPA”). To opt out of the collection for your personal information for advertising purposes pursuant to the CCPA or VCDPA, please modify your settings below under “Cookies Settings”

For more information, please visit our privacy policy.

""" return layout(request, "Do Not Sell or Share My Personal Information", body) @app.get("/external/{target}") def external_notice(target: str, request: Request) -> HTMLResponse: return layout(request, "External destination", f"

External destination

{esc(target.replace('-', ' ').title())} is documented in the external-link inventory. This offline clone does not contact third-party services.

Return home
") @app.get("/how-it-works.htm") @app.get("/landing/how-it-works") @app.get("/aboutus.htm") @app.get("/landing/aboutus") @app.get("/careers") @app.get("/landing/careers") @app.get("/in-the-press.htm") @app.get("/landing/press") @app.get("/contact-us") @app.get("/landing/contact-us") @app.get("/happiness-guarantee.htm") @app.get("/landing/happiness-guarantee") @app.get("/landing/affiliatepartners") def corporate_page(request: Request) -> HTMLResponse: title = request.url.path.strip("/").split("/")[-1].replace(".htm", "").replace("-", " ").title() slug = request.url.path.rstrip("/").split("/")[-1].replace(".htm", "") if slug == "careers": body = """
Colorful houses

Welcome home.

We’re on a mission to help everyone love where they live. And we’re looking for ambitious people who want to make it happen. Join our team.

Join our team

Good work starts with happy employees.

So our benefits help support a well-balanced
life for you and your family.

Medical, dental, and vision

for you and your family. From flexible plans to local support, our synthetic careers page keeps every control reachable.

""" return layout(request, "Careers", body) if slug == "affiliatepartners": body = """
Angie with Pros

Grow your business as an Angi Affiliate partner

Angi Affiliate partners drive high quality traffic and leads from homeowners interested in home services.

Ways to work with us

To learn more, email affiliate@angi.com

Connect homeowners

Share Angi

Build partnerships

""" return layout(request, "Affiliate Partners", body) if slug in {"press", "in-the-press"}: body = """

Angi News and Media

The home for everything home

Man drilling
Photo: Image Source / Angi

Check out the Angi media room for company press releases, industry analysis, information about the company, spokespeople, media assets and more.

Have questions? Email us at mediarelations@angi.com

About Angi

Press Releases

Blog Posts

Research

Images & B-Roll

""" return layout(request, "Angi News and Media", body) hero = { "aboutus": ("about-hero.jpg", "Home is the most important place on earth", "We make it easy for people to love their homes — and for pros to thrive doing the work they love.", "How Angi Works"), "contact-us": ("contact-hero.jpg", "Need Help?", "We’ll point you to the right place.", "Contact support"), "happiness-guarantee": ("guarantee-hero.jpg", "Our Happiness Guarantee", "When you book and pay with Angi, we’ll cover your project up to the full purchase price, plus limited damage protection. If you’re not satisfied with your home project or service, we’ll work to make it right.", "Start a Project"), "how-it-works": ("guarantee-hero.jpg", "Home care, simplified", "Find trusted pros and fair pricing for any home project — and get the job done right, guaranteed.", "Start a project"), }.get(slug) if hero: image, heading, copy, action = hero hero_class = { "aboutus": "corporate-source-hero about-source-hero", "contact-us": "corporate-source-hero contact-source-hero", "happiness-guarantee": "corporate-source-hero guarantee-source-hero", "how-it-works": "corporate-source-hero how-source-hero", }.get(slug, "corporate-source-hero") continuation = "
Homeowner improving a room

We help people love their homes

" if slug == "aboutus" else "" if slug == "happiness-guarantee": continuation = "
Homeowner improving a room
" if slug == "how-it-works": continuation = """
Angie’s listAngi

Whether you know us as Angie's List or Angi, our dedication is the same: helping people love where they live.

""" if slug == "contact-us": follow = """

If you’re using Angi to improve your home:

Instantly booked services

If you instantly booked a pre-priced service directly through Angi (for instance, Angi Mowing or Angi Cleaning):

Get Help

Services booked via retail partners

Open your local project timeline to review the synthetic booking and support options.

Get Help
""" else: follow = "" if slug in {"aboutus", "happiness-guarantee", "how-it-works"} else "

If you’re using Angi to improve your home, you’re in the right place.

" action_html = "" if slug == "contact-us" else f"{action}" kicker_html = "How Angi Works" if slug == "how-it-works" else "" return layout(request, title, f"
{kicker_html}

{heading}

{copy}

{action_html}
{follow}{continuation}") return layout( request, title, f"

About this local Angi replica

{esc(title)}

This source-observed corporate page family is represented locally with reachable navigation and no remote dependency.

Return home
", ) def auth_page(request: Request, mode: str) -> HTMLResponse: configs = { "register": ("Create your account", "Save providers and manage local projects.", "", "Create account", "Already a member? Log in"), "login": ("Welcome back", "Continue your synthetic home project.", "", "Log in", "Forgot password? · Create account"), "verify": ("Verify locally", "Read the demo code displayed on this page, then enter it below in the same browser session.", "
Loading local code…
", "Verify account", "No email is sent outside this site."), "forgot": ("Reset your password", "The next page displays a demo reset code for this browser session; no email is delivered.", "", "Create local reset code", "Return to login"), "reset": ("Choose a new password", "Enter the demo code displayed on this page in the same browser session.", "
Loading local code…
", "Update password", "No external delivery is used."), } heading, intro, fields, button, foot = configs[mode] body = f"

Local account

{heading}

{intro}

{fields}

{foot}

" return layout(request, heading, body) @app.get("/register") def register_page(request: Request): return auth_page(request, "register") @app.get("/login") def login_page(request: Request): return auth_page(request, "login") @app.get("/verify") def verify_page(request: Request): return auth_page(request, "verify") @app.get("/forgot-password") def forgot_page(request: Request): return auth_page(request, "forgot") @app.get("/reset-password") def reset_page(request: Request): return auth_page(request, "reset") @app.get("/account") @app.get("/account/settings") @app.get("/consumer/my-contact-details") @app.get("/consumer/profile") def account(request: Request) -> HTMLResponse: c = current(request) if not c.account_id: return RedirectResponse("/login?next=/account", 303) mobile_profile = "" if request.url.path in {"/consumer/profile", "/account/settings"}: mobile_profile = """

Account

""" body = f"""
‹

Account

{mobile_profile}

Contact details

Loading profile…
""" return layout(request, "Account", body, active="projects") @app.get("/consumer/notification-settings") def notification_settings(request: Request) -> HTMLResponse: c = current(request) if not c.account_id: return RedirectResponse("/login?next=/consumer/notification-settings", 303) body = """
‹

Account

Notifications

Angi Newsletter

Choose how you receive homeowner tips, seasonal reminders, and local project ideas.

""" return layout(request, "Notifications", body, active="projects") @app.get("/myprojects") @app.get("/consumer/my-projects") def source_projects(request: Request) -> HTMLResponse: c = current(request) if not c.account_id: return RedirectResponse("/login?next=/myprojects", 303) force_empty = request.query_params.get("state") == "empty" body = f"""

My projects

Loading projects…
""" return layout(request, "My projects", body, active="projects") @app.get("/saved") def saved(request: Request) -> HTMLResponse: c = current(request) if not c.account_id: return RedirectResponse("/login?next=/saved", 303) return layout(request, "Saved providers", "

Your shortlist

Saved providers

Compare synthetic profiles before starting a request.

Find more pros
Loading saved providers…
") @app.get("/inbox") def inbox(request: Request) -> HTMLResponse: c = current(request) if not c.account_id: return RedirectResponse("/login?next=/inbox", 303) if request.query_params.get("state") == "source": return RedirectResponse("/myprojects?state=empty", 303) with SERVICES.auth.connect() as connection: messages = db.rows(connection.execute( "SELECT m.body, m.sender, p.title, p.project_id FROM an_messages m JOIN an_projects p ON p.project_id=m.project_id WHERE p.account_id=? ORDER BY m.created_at DESC", (c.account_id,), ).fetchall()) cards = "".join(f"
{esc(item['title'])}

{esc(item['body'])}

{esc(item['sender']).title()}Open conversation
" for item in messages) body = f"

Project conversations

Inbox

Messages remain in this local Angi workspace.

My Projects
{cards or '

No messages yet

Start a project and message a matched pro to populate your inbox.

'}
" return layout(request, "Inbox", body, active="projects") @app.get("/projects/{project_id}") def project_page(project_id: str, request: Request) -> HTMLResponse: c = current(request) if not c.account_id: return RedirectResponse(f"/login?next=/projects/{project_id}", 303) body = f"""
← All projects

Local home project

Build your request, compare quotes and manage the job

Every action is contained in this synthetic WebsiteBench sandbox.

    Loading project…
    """ return layout(request, "Manage home project", body, active="projects") @app.get("/provider/dashboard") def provider_dashboard(request: Request) -> HTMLResponse: c = current(request) if not c.account_id: return RedirectResponse("/login?next=/provider/dashboard", 303) force_empty = " data-force-empty='1'" if request.query_params.get("state") == "empty" else "" body = f"

    Provider workspace · synthetic

    Bright Pipe leads & jobs

    This account-only demo shows your own projects matched to Bright Pipe. Updates add timeline notes; they do not change booking status or contact a real homeowner.

    Homeowner view
    Loading local leads…
    " return layout(request, "Provider lead management", body, active="projects") @app.get("/help") @app.get("/faq") @app.get("/landing/faq") def help_page(request: Request) -> HTMLResponse: body = """

    Angi/Solution Center

    Frequently Asked Questions

    Family enjoying drinks at patio
    Photo: Maskot / Getty Images

    Any questions? We’re here to help…

    What is Angi?

    Angi helps homeowners get home projects done well and helps home service professionals grow their business. We started in 1995 with a simple goal to help people find skilled home pros in their area. Now more than 25 years later, we've evolved to help people with everything from finding, booking and hiring a skilled pro, to researching costs, finding inspiration and discovering project possibilities. With an extensive nationwide network of more than 200,000 skilled home pros, Angi has helped more than 150 million people maintain, repair, renovate and improve their homes and has helped hundreds of thousands of small local businesses grow.

    How does Angi work?

    Search local services, compare provider details, and create a project in this local sandbox.

    How do I find a pro?

    Use Find Pros to browse services and top-rated local providers.

    How are projects managed?

    Your local account keeps projects, messages, estimates, and appointments together.

    """ return layout(request, "Help & support", body) @app.get("/safety") def safety(request: Request) -> HTMLResponse: return layout(request, "Local safety policy", "

    WebsiteBench safety

    This marketplace is local and synthetic

    Provider identities, licenses, insurance, reviews, quotes, messages and appointments are demo records. Registration and reset codes are displayed on their public pages for the current browser session; no email is delivered. Payments are disabled: even the approval test input is rejected, with no booking approval or real charge. Support cases never leave this site.

    What we never do

    Return home
    ") @app.get("/{category}") @app.get("/{category}/{topic}") def content_hub(category: str, request: Request, topic: str = "") -> HTMLResponse: if category not in HUB_PATHS: raise HTTPException(status_code=404) label = " ".join(part.replace("-", " ") for part in (category, topic) if part).title() service = "plumbing" if category == "plumbing" else category if category == "plumbing" and not topic: body = """

    Plumbing

    Plumbing

    Plumbing is the system of pipes, fixtures, and fittings that brings water into your home and carries waste out. From dripping faucets and slow drains to water heater issues and full bathroom remodels, these projects range from quick fixes to complex installations. Whether you need guidance on a DIY repair or want to connect with a local pro, Angi has the resources to help.

    """ return layout(request, label, body, active="services") return layout( request, label, f"

    Home project hub

    {esc(label)}

    Browse guides, costs, and local synthetic provider options for this source-observed topic family.

    Find local prosRead project guides
    ", active="services", ) @app.exception_handler(404) async def not_found(request: Request, _exc): response = layout(request, "Page not found", "

    We couldn't find that page

    Browse local services or return to your projects.

    Go home
    ") response.status_code = 404 return response