Skip to content

freecryptonet/usaparts

Repository files navigation

usaparts.eu

A free, SEO-driven catalog where European owners of American cars find the right part — by vehicle or by OEM / interchange number — see live in-stock eBay listings with prices, and buy via eBay Partner Network (EPN) affiliate links. No inventory, no fulfillment. Revenue is the affiliate click.

Status: Phase 0 + Phase 1 MVP. Code complete (build + tests green). Not yet deployed — awaiting EPN approval, eBay production API keys, and DNS. See Roadmap.

Why

Europeans who own US-brand cars (Dodge, Jeep, RAM, Ford, Chevrolet, etc.) struggle to source parts — local dealers don't stock them, and buyers routinely turn to eBay. A brand-new site can't outrank RockAuto / PartSouq / eBay for generic OEM searches, but this niche is underserved and rankable. The catalog + eBay + affiliate engine is the reusable asset; once validated here it can roll onto a broad all-makes OEM-search site.

How it works

  1. Catalog (vehicles, parts taxonomy, OEM cross-references, fitment) lives in MariaDB, built from eBay's own compatibility data plus free open interchange sources — facts only.
  2. Listing cache — a cron job (scripts/refresh-listings.ts) calls the eBay Browse API and stores normalized listings in ebay_listings_cache. The Browse API is capped at 5,000 calls/day, so pages never call eBay live; they read only from the cache.
  3. Pages (ISR/SSG) render from MariaDB. Every "View on eBay" link is an EPN affiliate link built via the Browse API itemAffiliateWebUrl (fallback: lib/affiliate.ts), routed to the visitor's local marketplace.

Tech stack

  • Next.js 16 (App Router, TypeScript)
  • MariaDB via mysql2
  • Vitest for unit tests
  • Deploy: pm2 + nginx + Let's Encrypt on a VPS (same pattern as sibling sites)

Project layout

app/                      Next.js routes
  page.tsx                homepage (browse by vehicle)
  [vehicle]/page.tsx      vehicle hub          /{years}-{make}-{model}
  [vehicle]/[category]/   vehicle + category   /{years}-{make}-{model}/{category}
  part/[oem]/page.tsx     part-number page     /part/{oem-number}
  parts/[category]/       category hub         /parts/{category}
  sitemap.ts, robots.ts   SEO
lib/
  db.ts                   MariaDB pool + query<T>()
  env.ts                  validated env access
  slug.ts                 slug + OEM-number normalization
  affiliate.ts            EPN affiliate link builder
  catalog.ts              vehicle / category reads
  listings.ts             listing cache read + refresh
  ebay/{auth,browse,normalize}.ts   eBay OAuth, Browse API, item normalizer
scripts/
  seed-catalog.ts         seed 5 launch model families + categories
  refresh-listings.ts     cron: refresh the listing cache (~35 calls/run)
db/schema.sql             MariaDB schema (8 tables)
docs/superpowers/         design spec + implementation plan

Local development

npm install
cp .env.example .env.local   # fill in DB + eBay credentials
npm run test                 # vitest
npm run build
npm run dev

Database (on the server / a local MariaDB):

mysql -u usaparts -p usaparts < db/schema.sql
node --experimental-strip-types scripts/seed-catalog.ts
node --experimental-strip-types scripts/refresh-listings.ts   # needs eBay keys

Configuration

See .env.example. Key variables: DATABASE_URL, EBAY_CLIENT_ID, EBAY_CLIENT_SECRET, EBAY_CAMPAIGN_ID_US / _DE / _UK, EBAY_MARKETPLACE_DEFAULT. .env.local is gitignored.

Roadmap

  • Phase 0 — Foundations: EPN account + eBay production keys, DNS, VPS deploy, SSL, GA4 + Search Console.
  • Phase 1 — MVP / revenue: 5 launch model families (Charger/Challenger, Wrangler/Grand Cherokee, Mustang, F-150, Camaro), live eBay listings, affiliate links. (code complete)
  • Phase 2 — Moat: expand OEM cross-reference / fitment data, editorial guides, cluster cross-links.
  • Phase 3 — Scale: roll the engine onto a broad all-makes OEM-search site; more marketplaces.

Legal

Facts only — OEM part numbers, interchange numbers, and fitment are facts (Feist v. Rural). Never verbatim catalog text, scanned diagrams, or wholesale table organization. ≥2 sources per fact. eBay listing data is fetched via the official Browse API under EPN terms.

About

usaparts.eu - OEM/used car-parts aggregator for US-brand cars in Europe; eBay Partner Network affiliate

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors