This is Next.js application designed to compare private jets based on various metrics using OpenAI's GPT-3.5. It allows users to select jets and a comparison category, then displays a ranked list of jets based on the selected metric. The project utilizes Prisma with a PostgreSQL database for data management and TailwindCSS for styling.
- Node.js (v14 or later)
- npm or yarn
- PostgreSQL database
- OpenAI API key
-
Clone the repository:
git clone https://github.com/helizaga/jet.ai.git cd jet.ai -
Install dependencies:
npm install # or yarn install -
Create a
.envfile in the root directory with the following content, replacing placeholders with your actual database URL and OpenAI API key:DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=public" OPENAI_API_KEY="your_openai_api_key" -
Run the Prisma migrations to set up your database schema:
npx prisma migrate dev
-
(Optional) Import sample jet data into your database:
npx tsx importCsv.ts
-
To start the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 in your browser to view the application.
-
To build the application for production:
npm run build # or yarn build -
To start the production server:
npm start # or yarn start
DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=public"
OPENAI_API_KEY="your_openai_api_key"
Replace USER, PASSWORD, HOST, PORT, and DATABASE with your PostgreSQL credentials and your_openai_api_key with your actual OpenAI API key.