Check out my blog post about this project here.
This is a project for me to play around with some ideas for a brainstorming app using Astro + Weaviate.
The web app gives you an AI coach that asks you questions to help you think through your idea. It's heavily inspired by Brainstory - a great web app that guides you through a brainstorming session and helps you turn your ideas into something real.
I'm using this project to help me learn more about vector databases, and find out what they could be useful for. If you want a real web app for brainstorming, try out Brainstory!
- This is an Astro web app that uses the
@astrojs/node
adapter to render the web app on the server. - The database is an embedded instance of Weaviate that runs within the same process as the Astro web server. When the Weaviate client is imported within the Astro application code, it sets up a dedicated Weaviate instance and connects to it.
- When the Weaviate instance is initialised, it creates the
Brainstorm
andBrainstormMessage
classes and adds some example brainstorms to get started. - The user uses the web app to create new brainstorms. Each brainstorm is a conversation with an AI coach. The coach uses the previous messages from the brainstorm to ask thought-provoking questions to help the user think through their ideas.
- Clone this Git repository.
cd
into the directory and runnpm install
to install the dependencies. - Duplicate
.env.sample
to.env
and edit with your OpenAI API key. - Run
npm run dev
to start up the local dev server. - Go to http://localhost:4321 in your web browser.
- This project uses Weaviate's 'generative search' or RAG for a few features:
- to generate a new thought-provoking question using the previous messages from the brainstorm
- to find relevant context from preivous brainstorms
- to generate a summary of the brainstorm.
- You can find the application code for these functions in
./src/weaviate/generative.ts
.