/ai-assistant

WIP of a web app that has a chat-gpt based style and is connected to various LLMs

Primary LanguageTypeScript

About this project

The technologies used in this project are:

  • Next.js
  • Postgres db (with docker)
  • Prisma for orm
  • Next-auth for authentication

To run the database:

  • docker-compose up -d
  • go to http://localhost:5050/ (to view the database via pgAdmin)
  • enter PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD

To register a new server inside the db

  • docker container ls (to get the CONTAINER ID of the postgres image)
  • docker inspect CONTAINER ID (to find the IP of the container)
  • Then inside the pgAdmin -> Add new Server
  • On General tab put a name (e.g. 'test_db')
  • On Connection tab enter the IP of the container on Hostname
  • Username and passoword: POSTGRES_USER and POSTGRES_PASSWORD

To run in dev mode

Simply run:

npm run dev

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

To migrating the database

npx prisma migrate
npx prisma generate

Sources: