This project is a full-stack Node.js application that uses OpenAI to analyze and summarize car owner reviews. It provides a web interface for users to ask questions about specific car models or generate pros and cons lists based on real owner feedback.
- Ask specific questions about a car make and model and get AI-generated answers based on owner reviews.
- Generate a list of pros and cons for any car make and model.
- Simple web frontend and REST API backend.
- Node.js (v20 or newer recommended)
- npm
- An OpenAI API key (get one here)
- Clone this repository:
git clone git@github.com:tashaharrison/car-review-generator.git cd car-review-generator - Install dependencies:
npm install
- Create a
.envfile or set the environment variableOPENAI_API_KEYwith your OpenAI API key:export OPENAI_API_KEY=your_openai_api_key
- To start the server:
npm start
- For development with auto-reload:
npm run dev
- Open your browser and go to http://localhost:3000
POST /api/ask— Ask a question about a car- Body:
{ "carModel": "Audi A1", "question": "How reliable is this car?" }
- Body:
POST /api/proscons— Get pros and cons for a car- Body:
{ "carModel": "Audi A1" }
- Body:
server.js— Express backendpublic/— Frontend HTML, JS, and CSSsrc/— Backend logic and OpenAI integrationdata/owner_reviews.json— Owner review data
MIT