- Copy
backend/.env.exampletobackend/.env. - Set
GEMINI_API_KEYto your Google Gemini API key. - Optionally change
GEMINI_MODELif you want a different Gemini model. - Start the backend normally. The backend loads
.envautomatically for Gemini settings, whileDATABASE_URLcontinues to come fromdocker-compose.yml.
When you open a product modal, BloomCart calls the backend POST /products/{product_id}/eco-summary endpoint. The backend sends product data from the database to Gemini, stores the generated eco-friendly message in the existing verdict column, and reuses that cached verdict on later opens.