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 genkitReview 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_KEYAfter installin Genkit, we deploy our backend to Firebase using the following command:
firebase deployThis 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 startReview 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-functionsAnd 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 4001To run all Cloud Functions and Security Rules tests, use the following command:
npm run testIf you want to run the Cloud Functions test only, use the following command:
npm run test-cloud-functionsIf you want to run the Security Rules test only, use the following command:
npm run test-rules-emulators