What the app does is, we first of all make a POST request to an endpoint that requires you to pass a query field in the request body. The query must be a collection name, we then pass the query to a function that uses Gemini to generate code that fetches data in the specified collection by giving it a well structured prompt, we then write the code generated by Gemini to a file, then run a node child process to execute the code in the file, after executing the code through the child node process, we then pass the data to another function that uses Gemini to convert the code into a JSON and then finally return the data to the user. Our aim is not to just get data from collections but to also be able to post, put, delete and patch data in a collection in the upcoming weeks. After that, we want the query passed to the enpoint to be like for example "I want to fetch all users, I want to delete user with id 2", gemini will be able to generate a code that will be able to perform the above query.
Built with
Web/Chrome
Team
By
Elijah Darkeh Agbedam and Augustine Love Stephens
From
Ghana
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],[],[],[],null,["# GEMINI AUTO BACKEND AI PROJECT\n\n[More Apps](/competition/vote) \n\nGEMINI AUTO BACKEND AI PROJECT\n==============================\n\nA Gemini-powered backend service. \nVote \nVoted!\nWhat it does\n\nWhat the app does is, we first of all make a POST request to an endpoint that requires you to pass a query field in the request body. The query must be a collection name, we then pass the query to a function that uses Gemini to generate code that fetches data in the specified collection by giving it a well structured prompt, we then write the code generated by Gemini to a file, then run a node child process to execute the code in the file, after executing the code through the child node process, we then pass the data to another function that uses Gemini to convert the code into a JSON and then finally return the data to the user. Our aim is not to just get data from collections but to also be able to post, put, delete and patch data in a collection in the upcoming weeks. After that, we want the query passed to the enpoint to be like for example \"I want to fetch all users, I want to delete user with id 2\", gemini will be able to generate a code that will be able to perform the above query. \nBuilt with\n\n- Web/Chrome \nTeam \nBy\n\nElijah Darkeh Agbedam and Augustine Love Stephens \nFrom\n\nGhana \n[](/competition/vote)"]]