feat: car-help web UI with browser view, search API, and buying guide

- FastAPI backend on port 8080 with noVNC proxy for same-origin iframe
- Split-panel UI: live browser (55%) + search/guide/saved tabs (45%)
- Car buying guide: target models, pre-purchase checklist, mechanics nearby,
  negotiation tips, budget breakdown
- Scoring/ranking engine for listings (Toyota Prius = highest)
- Docker container runs Xvfb + x11vnc + noVNC + FastAPI together
- Accessible at browser.ampbox.io via cloudflared tunnel
This commit is contained in:
Ken
2026-05-25 20:34:16 +00:00
parent f09317f95b
commit 8dfafcc63d
8 changed files with 1512 additions and 92 deletions
+205
View File
@@ -0,0 +1,205 @@
"""
Car buying guide for a 17-year-old in Woodinville WA.
Budget: $8-10K for a reliable used hybrid.
"""
def get_guide() -> dict:
return {
"target_cars": [
{
"model": "Toyota Prius (2010-2015, 3rd gen)",
"why": "Most reliable hybrid ever made. 50+ MPG. Huge parts supply. Battery lasts 150-200K miles. Dead-simple to maintain.",
"mpg": "50+",
"budget": "$6,500-$9,000",
"score": 10,
"notes": "The boring answer is the right answer. A 2012 Prius with 120K miles will run another 100K with basic maintenance.",
},
{
"model": "Toyota Camry Hybrid (2012-2017)",
"why": "More comfortable than Prius, very reliable. Bigger car, feels more solid. Great for a new driver.",
"mpg": "38-40",
"budget": "$7,000-$10,000",
"score": 9,
"notes": "Slightly harder to find in budget but worth it. More trunk space than Prius.",
},
{
"model": "Honda Insight (2010-2014, 2nd gen)",
"why": "Compact, reliable, good fuel economy. Honda build quality.",
"mpg": "41-44",
"budget": "$5,000-$7,500",
"score": 8,
"notes": "Less common than Prius but solid choice. IMA system is simpler than Toyota's.",
},
{
"model": "Hyundai Ioniq (2017-2019)",
"why": "Newer tech, excellent MPG, modern safety features. Good value depreciation curve.",
"mpg": "55+",
"budget": "$8,000-$10,000",
"score": 8,
"notes": "Best MPG in class. Newer so fewer miles typically. May be tight on budget.",
},
{
"model": "Honda Civic Hybrid (2012-2015)",
"why": "Good daily driver, Honda reliability. Watch battery health closely.",
"mpg": "44",
"budget": "$5,000-$8,000",
"score": 7,
"notes": "Only consider 2012+. Earlier models had IMA battery failures. Always get battery tested.",
},
],
"avoid": [
{
"model": "Nissan Leaf",
"reason": "Battery degrades badly in heat/cold. PNW winters + no active thermal management = range drops to 40-50 miles. Replacement battery costs $5,000+.",
},
{
"model": "Honda Civic Hybrid pre-2012",
"reason": "IMA battery failures are extremely common. Honda lost a class action over this. Replacement is $2,000-$3,000.",
},
{
"model": "Nissan Altima Hybrid",
"reason": "Rare, poor parts availability. Nissan's hybrid system was licensed from Toyota but support is minimal.",
},
{
"model": "Ford Escape Hybrid pre-2010",
"reason": "Aging hybrid system, expensive repairs. Brake actuator failures are common and cost $1,500+.",
},
],
"pre_purchase_checklist": [
{
"item": "Bring an OBD2 scanner",
"detail": "$20 on Amazon (BAFX or ELM327). Plug in, check for stored codes. Any hybrid-related codes (P0A80, P3000) = walk away.",
},
{
"item": "Check hybrid battery health",
"detail": "Ask seller for a hybrid battery scan. Or bring the Dr. Prius app (Android) or HybridAssistant. Look for cell voltage imbalance.",
},
{
"item": "Look for rust underneath",
"detail": "PNW cars are generally good for this, but check wheel wells, rocker panels, and undercarriage. Any structural rust = walk away.",
},
{
"item": "Check all electronics",
"detail": "Lights, AC, heat, power windows, door locks, radio, backup camera. Electrical gremlins are expensive.",
},
{
"item": "Test drive thoroughly",
"detail": "Listen for unusual sounds. Test brakes hard. Feel for vibrations at highway speed. Test regenerative braking (should feel smooth). Drive at least 15 minutes.",
},
{
"item": "Check tire tread depth",
"detail": "Penny test: insert penny head-first into tread. If you see all of Lincoln's head, tires need replacing ($400-$600).",
},
{
"item": "Ask for maintenance records",
"detail": "Oil changes, brake pads, coolant flushes, transmission fluid. No records = assume nothing was done.",
},
{
"item": "Check VIN for recalls",
"detail": "Go to NHTSA.gov/recalls and enter VIN. Open recalls should be fixed for free at dealer.",
},
{
"item": "Run a vehicle history report",
"detail": "Carfax or AutoCheck ($40, or ask dealer for a free one). Check for accidents, title issues, odometer rollbacks.",
},
{
"item": "Check 12V battery age",
"detail": "Separate from the hybrid battery. Look for a date sticker on the battery. If 4+ years old, budget $150-$200 for replacement.",
},
{
"item": "Check for catalytic converter",
"detail": "Theft is extremely common on Prius (contains palladium). Look under the car -- if you see a fresh weld or aftermarket cat, ask questions.",
},
],
"mechanics_nearby": [
{
"name": "Totem Lake Automotive",
"address": "12720 NE 124th St, Kirkland, WA",
"notes": "Good reviews, does hybrid inspections. Close to Woodinville.",
"distance": "~10 min",
},
{
"name": "Eastside Automotive",
"address": "12011 NE 12th St, Bellevue, WA",
"notes": "AAA approved shop. Thorough pre-purchase inspections.",
"distance": "~20 min",
},
{
"name": "Priusly Hybrid Service",
"address": "Seattle, WA",
"notes": "Prius and hybrid specialists. Worth the drive if buying a Prius. They know every failure mode.",
"distance": "~30 min",
},
{
"name": "Mastracci's Automotive",
"address": "14510 NE 91st St, Redmond, WA",
"notes": "Longstanding local shop with solid reputation.",
"distance": "~15 min",
},
],
"mechanics_note": "Budget $100-$175 for a pre-purchase inspection. NEVER skip this. Even a $5,000 car can have $3,000 in hidden problems. The $150 you spend here is the best money in the entire process.",
"mechanic_red_flags": {
"good_signs": [
"ASE certified technicians",
"Will let you watch the inspection",
"Explains findings clearly, shows you the actual parts",
"Has hybrid-specific diagnostic tools",
"Gives you a written report",
"Doesn't push you to buy or not buy -- just gives facts",
],
"red_flags": [
"Won't let you be present during inspection",
"Quotes repairs before finishing the inspection",
"Pressures you to buy the car (they might know the seller)",
"No hybrid experience or tools",
"Rushes through it in under 30 minutes",
"Only does a visual inspection (no scanner, no lift)",
],
"key_question": 'Ask: "Do you have a hybrid battery health scanner?" If no, find a mechanic who does. This is the single most expensive component.',
},
"negotiation_tips": [
"Know the KBB private party value BEFORE you go (kbb.com). This is your anchor price.",
"Point out any issues found in the pre-purchase inspection to justify a lower offer.",
"Start 15-20% below asking price. Expect to meet somewhere in the middle.",
"Be willing to walk away. There are always more cars. The moment you fall in love with a specific car, you lose negotiating power.",
"Don't mention you're paying cash until the price is agreed. Cash removes the seller's uncertainty but also removes your leverage.",
'At a dealer: the "doc fee" is negotiable in WA. State law caps it at ~$200 but dealers routinely charge $500+. Push back.',
"Private party is usually $1,000-$2,000 cheaper than dealer for the same car, but no warranty.",
"For a 17-year-old's first car: reliable > pretty. A boring Prius with 120K miles beats a cool-looking car with problems. Every time.",
"Budget $500-$1,000 on top of purchase price for registration, insurance setup, and immediate maintenance.",
],
"budget_breakdown": [
{
"item": "Car purchase",
"range": "$7,000-$9,000",
"note": "Leave room for the extras below",
},
{
"item": "Pre-purchase inspection",
"range": "$150",
"note": "Non-negotiable. Do this for every car you're serious about.",
},
{
"item": "Title transfer + registration (WA)",
"range": "$150-$300",
"note": "Depends on vehicle weight and county.",
},
{
"item": "Insurance (17-year-old, liability only)",
"range": "$150-$250/month",
"note": "On a used car, liability-only makes sense. Full coverage would be $300+/month.",
},
{
"item": "Immediate maintenance",
"range": "$100-$200",
"note": "Oil change, air filter, cabin filter, wipers. Do this day one regardless.",
},
{
"item": "Emergency fund",
"range": "$500",
"note": "Something will break or need attention in the first 3 months. Always does.",
},
],
"budget_total": "$8,000-$10,500 total needed to be fully set up and driving",
}