Hi everyone,
I currently have a working setup where Gemini API calls are being made directly from the frontend. I know that if I deploy this in the future, my API keys will be exposed in the browser, which risks quota theft and security issues.
I want to move these API calls entirely to the backend, but I am having trouble understanding how to make that structural shift smoothly. Whenever I ask AI tools directly with prompts like “shift it to the backend,” the AI messes up the implementation or misunderstands the flow.
Does anyone have a specific, proven prompt that AI tools can actually understand to generate this frontend-to-backend architecture correctly? Or, could anyone explain the clean, standard way to handle the data transition from the frontend to the backend when routing Gemini API calls?
Thanks!