ErnestoR / Chatty-bot

Nextjs, trcp, primsa, nextauth example

Home Page:https://chatty-bot.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chatty bot

OpenAI chat app

This is a T3 Stack project bootstrapped with create-t3-app.

Additional libraries

Getting Started

  1. First, clone the repo:

    git clone git@github.com:ErnestoR/Chatty-bot.git
    
    cd Chatty-bot
  2. Then, install the dependencies:

    yarn
  3. Create a .env.local file and add the following:

    NEXTAUTH_SECRET="YOUR_SECRET"
    CHATGPT3_API_KEY="YOUR_API_KEY"

    CHATGPT3_API_KEY needs to be obtained from OpenAI

  4. Generate the Prisma client:

    yarn prisma generate
  5. Optionally, you can seed the database with some dummy data:

    yarn prisma db seed
  6. Finally, run the development server:

    yarn dev
  7. Open http://localhost:3000 with your browser to see the result.

  8. Log in with the following credentials: (these are the credentials for the seeded user)

     email: john@mail.com
     password: adminadmin
    
     yeah I know, not very secure 😅
     note to self: use a hash/crypto library to hash the password before storing it in the db

About

Nextjs, trcp, primsa, nextauth example

https://chatty-bot.vercel.app


Languages

Language:TypeScript 90.0%Language:JavaScript 8.3%Language:Shell 1.7%Language:CSS 0.1%