this is ChatGPT clone application with React / TypeScript / Next.js / Recoil / Firestore.
- React: 18.2.0
- TypeScript: 5.0.2
- Recoil: 0.7.7
- Next.js: 13.2.4
- Firebase JavaScript SDK: v9
to launch application locally,
yarn install
yarn dev
- register and get API key to use ChatGPT to get chat response
- register your application with Firebase to add Firebase Authentication to the app, and store chat messages history in Firestore
then $ touch .env
file and fill it below.
OPENAI_ENDPOINT=https://api.openai.com/v1/chat/completions
OPENAI_APIKEY=
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGE_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
not covered, so choose your favorite service.