Backend project for Tindog, built with Firebase using Genkit for the Gemini API Developer Competition.
You can also check out the frontend built with NextJS in its dedicated GitHub repository].
This web app has been deployed on Vercel, you can check it out here.
To run this, first we need to install Genkit.
npm i -g genkit
Review the documentation for details and samples.
One important step is to set the GOOGLE_GENAI_API_KEY
environment variable to your key:
export GOOGLE_GENAI_API_KEY=<your API key>
If you plan on running Genkit locally, set the GOOGLE_GENAI_API_KEY
secret in Firebase:
firebase functions:secrets:set GOOGLE_GENAI_API_KEY
After installin Genkit, we deploy our backend to Firebase using the following command:
firebase deploy
This will make our flows and functions available to our [Tindog Frontend][tindog_frontend_repo].
To start the Genkit Developer UI use the following command:
genkit start
Review the documentation for details and samples.
If you want to run this using the Firebase Local Emulator Suite, you should first run the emulators with the following command:
GENKIT_ENV=dev firebase emulators:start --inspect-functions
And then start Genkit in another port (since both Genkit and Emulators use the same default 4000 port) using the following command:
genkit start --attach http://localhost:3100 --port 4001
To run all Cloud Functions and Security Rules tests, use the following command:
npm run test
If you want to run the Cloud Functions test only, use the following command:
npm run test-cloud-functions
If you want to run the Security Rules test only, use the following command:
npm run test-rules-emulators