See demo here (message me for access)
Three parts to this:
- Firebase Cloud Firestore database
- Firebase Cloud Function that calls OpenAI (/firebase/functions)
- Simple Flutter app (/flutter-app)
Important: This doesn't include auth, so don't make it public without being approved.
- Create a firebase project with Cloud Firestore, Cloud Functions (and Hosting if you want to host the web app on firebase)
- Create Firestore database with structure:
- conversations
- settings/openai_config (populate document with values for: preamble, first_question)
- Add your OpenAI API key to firebase/functions/index.js
- Deploy cloud functions ("flutter deploy --only functions" from within firebase directory)
- Build flutter app (flutter build web). Can also build for iOS and Android
- Host web app Guide
To host on firebase:
- Move/copy flutter-app/build/web into firebase directory
- Setup firebase hosting
- firebase deploy --only hosting
Note: if you host elsewhere, you will need to use a slightly different setup in the app Guide