Skip to content

A Next.js chatbot powered by Vercel AI that provides vizualization over a dataset

License

Notifications You must be signed in to change notification settings

amithmkini/dataviz-chatbot

Repository files navigation

DataViz Chatbot

AI chatbot for data visualization and analytics

Features · Running locally · Connecting Databases


Features

  • Next.js App Router
  • React Server Components (RSCs), Suspense, and Server Actions
  • Vercel AI SDK for streaming chat UI

Running locally

First, you need to create either a Vercel KV or Upstash Redis DB to store the chatbot state. After that, you will need to use the environment variables defined in .env.example to run Next.js AI Chatbot.

pnpm install
pnpm dev

Your app template should now be running on localhost:3000.

If you don't want to setup Upstash, you can run the Docker compose file to start a Redis DB with http server locally:

docker compose up

Then, adjust the environment variables in the .env file to point to the local Redis server.

KV_URL="http://localhost:8079"
KV_REST_API_URL="http://localhost:8079"
KV_REST_API_TOKEN="test"
KV_REST_API_READ_ONLY_TOKEN="test"

Connecting Databases

Dataviz Chatbot makes use of Turso SQLite DBs for querying data. Create a DB on Turso and pass in the URL and the authToken to the application.

About

A Next.js chatbot powered by Vercel AI that provides vizualization over a dataset

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages