Personal project exploring T3 stack (NextJS, tRPC, TypeScript, Tailwind, Drizzle, NextAuth) with Open AI integration to recreate a Chat GPT-like experience
- PostgreSQL instance (start-database.sh is available for convenience to run a docker instance of PostgreSQL)
- Obtain OAuth 2.0 credentials (follow docs provided by NextJS for more information/setup)
- OpenAI API Key (https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key)
- Create
.env
based on .env.example - Create database name as configured in
.env
in step 1 - Instantiate database tables by running
npm run db:push
- Start development server with
npm run dev
and access viahttp://localhost:3000
by default
build
: Generates an optimized version of the application for productiondb:generate
: Create migration script for most recent changes to the database (schema updates)db:migrate
: Run migration scripts (running migrations)db:push
: Directly push schema changes to the DB skipping migrations (Prototype / Push)db:studio
: Runs a web interface for viewing and managing the database (Studio)dev
: Start NextJS in development modelint
: Runs ESLint with NextJS' build in configurationstart
: Starts NextJS production server