Skip to content

Instantly share code, notes, and snippets.

@plpxsk
Last active May 20, 2026 16:45
Show Gist options
  • Select an option

  • Save plpxsk/e0791d8566634d5a7c003e070f33b803 to your computer and use it in GitHub Desktop.

Select an option

Save plpxsk/e0791d8566634d5a7c003e070f33b803 to your computer and use it in GitHub Desktop.
Car Doctor AI Stack

Car Doctor AI Stack

CarDoctorAI.com | Car Problem? Get Answers.

AI Chat

  • Vercel AI SDK for streaming chat, tool calls, artifacts, and usage data
  • OpenAI models for chat, reasoning, artifacts, and mechanic web search
  • TokenLens for model usage enrichment

LLM Models

  • OpenAI gpt-5.2 (varied reasoning effort) - chat-model, chat-model-reasoning, artifact-model, and findMechanic search with OpenAI web search
  • OpenAI gpt-5-nano - title-model for chat title generation

AI Tools

  • findMechanic - Search for local mechanics, relevant to chat transcript
  • createDocument - Create custom, comprehensive, structured diagnostic report and other artifacts/documents
  • updateDocument - Update existing artifacts
  • requestSuggestions - Generate document suggestions
  • getWeather - Get weather data (legacy)

Free/limited users have blocked versions of gated artifact tools

Authentication and Payments

  • Auth.js / NextAuth credentials auth for registered and guest users
  • Stripe Checkout for day passes and monthly subscriptions
  • Stripe webhooks for subscription and day-pass entitlement updates

Database and Storage

UI

Core

Product Features

  • Guest and registered chat sessions
  • Automotive diagnostic Q&A
  • Diagnostic report artifacts
  • Local mechanic search by city
  • Document, code, sheet, image, and diagnostic artifact types
  • File uploads
  • Chat history, votes, suggestions, and visibility controls
  • Pricing page, dashboard, account deletion, and password changes

API Routes

  • GET /api/auth/[...nextauth] - Auth.js route handler
  • POST /api/auth/[...nextauth] - Auth.js route handler
  • GET /api/auth/guest - Create guest session and redirect
  • POST /api/chat - Stream AI chat response and save messages
  • DELETE /api/chat - Delete a chat
  • GET /api/chat/[id]/stream - Resume or fetch chat stream
  • GET /api/history - Get chat history
  • DELETE /api/history - Delete user chat history
  • GET /api/document - Get latest or historical document versions
  • POST /api/document - Save document version
  • DELETE /api/document - Delete document versions
  • GET /api/suggestions - Get document suggestions
  • GET /api/vote - Get message votes for a chat
  • PATCH /api/vote - Update message vote
  • POST /api/files/upload - Upload file to Vercel Blob
  • POST /api/checkout_sessions - Create Stripe checkout session
  • POST /api/webhooks/stripe - Handle Stripe checkout and subscription webhooks
  • POST /api/user/change-password - Change current user's password
  • DELETE /api/user/delete-account - Delete current user account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment