A friendly code assistant that helps users with their questions about the Stanford Spezi framework.
- Next.js
- AI SDK
- shadcn/ui
- LangChain
- Data Persistence with Vercel Postgres and Vercel Blob
- NextAuth.js for authentication
You will need to update the environment variables see the example file in .env.example
to run the Spezi AI Assistant.
Note: You should not commit your
.env
file or it will expose secrets that will allow others to control access to your various OpenAI and authentication provider accounts.
-
Set up your Postgres database (either locally or using Vercel Postgres)
-
Add your database URL to the
.env
file:POSTGRES_URL="postgres://..."
-
Initialize the database:
# Generate the database schema pnpm db:generate # Push the schema to your database pnpm db:push # Optional: Open the database UI pnpm db:studio
The system can automatically generate documentation from GitHub repositories and ingest it into the database:
-
Add the repositories you want to ingest to the
config/repositories.yml
file. -
Generate LLM-friendly markdown summaries of the repositories that are saved into the
resources
directory:pnpm generate
-
Ingest all markdown files from the
resources
directory into the database:pnpm ingest
-
You can also generate and ingest in one command, if desired:
pnpm generate-and-ingest
You can customize all of the above in scripts/ingest.ts
.
pnpm install
pnpm run dev