A powerful web application that automates Carfax vehicle history report retrieval using Apify web scraping and Manus cloud infrastructure.
- Instant VIN Search - Get Carfax reports instantly by entering a VIN
- Automated Data Extraction - Apify Actor automatically logs into Carfax and extracts vehicle data
- Real-time Dashboard - Beautiful, responsive dashboard built with React 19 and Tailwind CSS 4
- User Authentication - Secure Manus OAuth integration
- Database Storage - Store search history and results using Drizzle ORM
- tRPC API - Type-safe backend procedures with full TypeScript support
- Responsive Design - Works seamlessly on desktop, tablet, and mobile
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (React 19) β
β Tailwind CSS 4 + shadcn/ui β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ
β tRPC API Layer β
β Type-safe RPC Procedures β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ
β Backend (Express 4) β
β βββββββββββββββββββ¬βββββββββββββββββββ¬βββββββββββββββββββ β
β β Apify Client β Database Ops β Auth Handler β β
β βββββββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββΌβββββββββββββ
β β β
ββββββΌβββ βββββββΌβββ βββββββΌβββ
β Apify β βDatabaseβ β Manus β
β Cloud β β (MySQL)β β OAuth β
βββββββββ ββββββββββ ββββββββββ
- Node.js 22+
- npm or pnpm
- Manus account
- Apify account
- Carfax credentials
# Clone the repository
git clone https://github.com/mayo3030/carfax-manus.git
cd carfax-manus
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env.local
# Configure your secrets in .env.local:
# - DATABASE_URL
# - APIFY_ACTOR_ID
# - APIFY_API_KEY
# - CARFAX_EMAIL
# - CARFAX_PASSWORD
# - JWT_SECRET
# - OAUTH_SERVER_URL
# - VITE_APP_ID
# - VITE_OAUTH_PORTAL_URL
# Run database migrations
pnpm db:push
# Start development server
pnpm devThe application will be available at http://localhost:3000
carfax-manus/
βββ client/ # React frontend
β βββ src/
β β βββ pages/ # Page components
β β βββ components/ # Reusable UI components
β β βββ lib/trpc.ts # tRPC client configuration
β β βββ App.tsx # Main app component
β β βββ index.css # Global styles
β βββ public/ # Static assets
βββ server/ # Express backend
β βββ db.ts # Database queries
β βββ routers.ts # tRPC procedures
β βββ apify-client.ts # Apify integration
β βββ _core/ # Framework internals
βββ drizzle/ # Database schema & migrations
β βββ schema.ts # Table definitions
βββ storage/ # S3 file storage helpers
βββ shared/ # Shared types & constants
| Technology | Purpose |
|---|---|
| React 19 | Frontend UI framework |
| Tailwind CSS 4 | Utility-first CSS framework |
| Express 4 | Backend server |
| tRPC 11 | Type-safe RPC framework |
| Drizzle ORM | Database ORM |
| Apify | Web scraping automation |
| Manus | Cloud hosting & OAuth |
| shadcn/ui | Component library |
- Environment Variables - Sensitive data stored in
.env.local(never committed) - OAuth Authentication - Secure Manus OAuth integration
- Database Encryption - Credentials encrypted at rest
- API Rate Limiting - Apify API calls are rate-limited
- CORS Protection - Cross-origin requests validated
CREATE TABLE users (
id VARCHAR(255) PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL,
name VARCHAR(255),
role ENUM('admin', 'user') DEFAULT 'user',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE search_history (
id INT PRIMARY KEY AUTO_INCREMENT,
user_id VARCHAR(255) NOT NULL,
vin VARCHAR(17) NOT NULL,
results JSON,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id)
);The project includes a custom Apify Actor for automated Carfax scraping:
- Type: PuppeteerCrawler (JavaScript-capable)
- Features:
- Automatic Carfax login
- VIN search automation
- Data extraction from results
- Error handling & retries
- Timeout configuration
{
"vin": "17-character VIN",
"email": "carfax_email@example.com",
"password": "carfax_password"
}{
"vin": "string",
"make": "string",
"model": "string",
"year": "number",
"mileage": "number",
"title_status": "string",
"accident_history": "object",
"service_records": "array"
}// Frontend
const { data } = trpc.carfax.searchVin.useQuery({ vin: "17CHAR_VIN" });
// Backend procedure
export const searchVin = protectedProcedure
.input(z.object({ vin: z.string().length(17) }))
.query(async ({ input, ctx }) => {
// Calls Apify Actor and returns results
});const { data } = trpc.carfax.getHistory.useQuery();const mutation = trpc.carfax.saveSearch.useMutation();
mutation.mutate({ vin, results });# Run unit tests
pnpm test
# Run integration tests
pnpm test:integration
# Generate coverage report
pnpm test:coverage# Database
DATABASE_URL=mysql://user:password@localhost:3306/carfax_db
# Apify
APIFY_ACTOR_ID=your_actor_id
APIFY_API_KEY=your_api_key
# Carfax Credentials
CARFAX_EMAIL=your_carfax_email@example.com
CARFAX_PASSWORD=your_carfax_password
# Authentication
JWT_SECRET=your_jwt_secret_key
OAUTH_SERVER_URL=https://api.manus.im
VITE_OAUTH_PORTAL_URL=https://portal.manus.im
# Manus
VITE_APP_ID=your_app_id
OWNER_NAME=Your Name
OWNER_OPEN_ID=your_open_id
# Storage
BUILT_IN_FORGE_API_URL=https://api.manus.im
BUILT_IN_FORGE_API_KEY=your_forge_api_key# Create a checkpoint
pnpm webdev:checkpoint
# Push to production
pnpm webdev:publishThe application can be deployed to any Node.js hosting platform:
- Vercel - Recommended for frontend
- Railway - Full-stack deployment
- Render - Backend hosting
- AWS - Enterprise deployment
- Code Splitting - Lazy-loaded routes with React.lazy
- Image Optimization - Compressed assets with content hashing
- Database Indexing - Optimized queries on VIN and user_id
- API Caching - tRPC query caching with stale-while-revalidate
- CDN - Static assets served via Manus CDN
- Check Carfax credentials are correct
- Verify VIN format (17 characters)
- Review Actor logs in Apify console
- Check rate limiting - wait before retrying
- Verify DATABASE_URL is correct
- Check MySQL server is running
- Ensure database exists and is accessible
- Run migrations:
pnpm db:push
- Verify OAUTH_SERVER_URL is correct
- Check VITE_APP_ID matches Manus settings
- Clear browser cookies and retry
- Check JWT_SECRET is set
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Mayo - GitHub Profile
- Apify - Web scraping platform
- Manus - Cloud infrastructure
- Carfax - Vehicle history data
- React - UI framework
- Tailwind CSS - CSS framework
For support, email: support@carfax-manus.com or open an issue on GitHub.
Last Updated: December 28, 2025
Version: 1.0.0
Status: β
Production Ready