MotorScope is a Chrome extension that helps you collect and track data from car listing platforms. It uses Google Gemini AI to extract vehicle information and monitor price changes over time.
For infrastructure deployment and setup instructions, see terraform/DEPLOYMENT.md.
This is the single source of truth for deploying the MotorScope infrastructure to Google Cloud Platform.
| Marketplace | Country | Status |
|---|---|---|
| OTOMOTO | Poland π΅π± | β Fully tested |
| Autoplac | Poland π΅π± | β Supported |
| Facebook Marketplace | Global π | β Supported |
| Facebook Groups (buy/sell) | Global π | β Supported |
π Note: Some features may require you to be logged in to the marketplace platform. Facebook listings require you to be logged into Facebook.
MotorScope supports two types of Facebook car listings:
-
Marketplace Items: Standard Facebook Marketplace listings
- URLs like:
facebook.com/marketplace/item/{id} - URLs like:
facebook.com/commerce/listing/{id}
- URLs like:
-
Group Posts: Car listings posted in Facebook buy/sell groups
- URLs like:
facebook.com/groups/{groupId}/permalink/{postId} - URLs like:
facebook.com/groups/{groupId}/posts/{postId}
- URLs like:
Important: Facebook requires authentication and blocks server-side fetch requests. MotorScope opens Facebook listings in background tabs for refresh operations, which requires you to be logged into Facebook in your browser.
Tracking car prices manually is tedious. MotorScope automates the process:
- Collect historical price data automatically - no more manual spreadsheets
- Track multiple listings from a single dashboard
- Get notified when prices change
- Archive listings to keep a record of expired or sold vehicles
- π±οΈ One-click Tracking: Open the extension popup on any car listing to start tracking
- π€ AI-Powered Extraction: Uses Gemini 2.5 Flash to parse page content into structured data (VIN, mileage, engine specs, seller info)
- π Automated Price History: Builds historical price data over time with interactive charts - track price drops and increases
- π Background Refresh: Periodically checks for price updates on tracked listings
- π Grid & Compact Views: Switch between detailed grid cards and compact list view
- π Advanced Filtering: Filter by status (Active/Sold/Expired), archive status, make, model, and marketplace source
- π Listing Details: Click on any listing to view comprehensive details in an overlay modal
- π·οΈ Source Tags: See which marketplace each listing comes from at a glance
- π Price Comparison: Compact view shows total price change since first tracked
- ποΈ Archive System: Archive listings to exclude them from auto-refresh while keeping the data
- π΄ ENDED Listing Handling: ENDED listings (sold/expired) are visually highlighted, price history is frozen, and they're excluded from auto-refresh after a configurable grace period (1-30 days)
- πΎ Cloud Sync: Data synchronized with backend (when logged in with Google)
- π Google Authentication: Secure sign-in to sync data across devices
Car listings are stored using a normalized JSON structure. See the full schema documentation:
| Category | Fields |
|---|---|
| Vehicle | VIN, make, model, generation, trim, body type, year, mileage, engine specs, drivetrain |
| Pricing | Current price, original price, price history with dates, currency, negotiable flag |
| Origin | Import country, registration country, seller location (city, region, postal code) |
| Condition | New/used status, accident-free declaration, service history |
| Seller | Type (private/dealer), name, phone number, company status |
| Tracking | Posted date, first seen, last checked, status (active/sold/expired) |
- Node.js: v18 or higher
- Google Gemini API Key: Required for AI-powered data extraction
- Get your free API key from: https://ai.google.dev/
- Add it in the extension settings after installation
-
Clone the repository
git clone https://github.com/pbuchman/motorscope.git cd motorscope -
Install dependencies
npm install
-
Build the extension
npm run build
-
Load in Chrome
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
distfolder
- Open
# Install dependencies
npm install
# Run extension in development mode with hot reload
npm run dev:extension
# Run API in development mode
npm run dev:api
# Build everything for production
npm run build
# Build extension only
npm run build:extension
# Build API only
npm run build:api
# Run all tests
npm test
# Run linting
npm run lint
# Type check
npm run typecheck
# Clean build artifacts
npm run clean- Frontend: React 19.2, TypeScript 5.9, Tailwind CSS 4.1
- Build Tool: Vite 5.1
- AI: Google Gemini API (@google/genai 1.31)
- Charts: Recharts 3.5
- Icons: Lucide React
- i18n: i18next (English & Polish)
- Testing: Jest 29, React Testing Library
- Extension: Chrome Manifest V3
- Backend: Node.js 20, Express, Firestore
After installing the extension:
- Click the MotorScope icon in Chrome toolbar
- Go to Settings
- Enter your Gemini API key
- Set the refresh frequency (how often to check for price updates)
motorscope/
βββ extension/ # Chrome extension source
β βββ src/
β β βββ components/ # React UI components
β β β βββ ui/ # Reusable UI primitives
β β β βββ popup/ # Extension popup components
β β β βββ CarCard.tsx # Grid view car card
β β β βββ CarCardCompact.tsx # Compact list view card
β β β βββ Dashboard.tsx # Main dashboard view
β β β βββ SettingsPage.tsx # Extension settings
β β βββ config/
β β β βββ marketplaces.ts # Supported marketplace configs
β β βββ services/ # Business logic
β β β βββ gemini/ # AI data extraction
β β β βββ refresh/ # Background refresh logic
β β β βββ settings/ # Settings management
β β βββ hooks/ # Custom React hooks
β β β βββ useCurrentTab.ts # Tab information
β β β βββ usePageContent.ts # Page scraping
β β β βββ useChromeMessaging.ts # Extension messaging
β β βββ i18n/ # Internationalization (EN/PL)
β β β βββ locales/ # Translation files
β β βββ context/ # React context providers
β β βββ auth/ # Authentication
β β βββ api/ # API client
β β βββ utils/ # Helper functions
β β βββ background.ts # Service worker
β β βββ App.tsx # Main React app
β βββ manifest.json # Chrome extension manifest
β βββ docs/ # Extension documentation
βββ api/ # Backend API server
β βββ src/
β βββ index.ts # Express server entry
β βββ routes.ts # API routes
β βββ auth.ts # Authentication handlers
β βββ db.ts # Firestore database layer
β βββ migrations/ # Database migrations
βββ docs/ # Project documentation
βββ .github/
β βββ workflows/
β βββ ci.yml # CI/CD pipeline
βββ scripts/ # Utility scripts
- β API calls to Gemini are made directly from your browser
- β No third-party tracking or analytics
- β Google Sign-in uses secure OAuth 2.0 flow
- β Backend only stores listing data you choose to track
- β All communication with backend is over HTTPS
- β Listing images are stored in Google Cloud Storage with automatic expiration
The MotorScope backend runs on Google Cloud Platform (GCP). Infrastructure is managed using Terraform.
| Environment | Project ID | Region |
|---|---|---|
| Development | motorscope-dev |
europe-west1 |
| Production | TBD | europe-west1 |
| Service | Description |
|---|---|
| Firestore | NoSQL database (users, listings, settings) |
| Cloud Storage | Listing image storage with lifecycle management |
| Cloud Run | Containerized API service |
| Artifact Registry | Docker image repository |
| Secret Manager | Secure credential storage |
π Complete deployment guide: terraform/DEPLOYMENT.md
Quick start:
cd terraform/environments/dev
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with motorscope-dev project details
terraform init
terraform applyAfter deployment, configure secrets and deploy the API container. See full instructions in terraform/DEPLOYMENT.md.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
| Document | Purpose |
|---|---|
| This README | Complete project overview (functional + technical) |
terraform/DEPLOYMENT.md |
Infrastructure deployment guide (single source of truth) |
extension/docs/architecture.md |
Extension architecture details |
docs/auth-flow.md |
Backend authentication flow |
Note: Documentation is intentionally minimal. Each document has a single purpose. Do not duplicate content across documents β reference other files instead.
Made with β€οΈ for car enthusiasts