Gemini AI is an innovative web application that brings an interactive chat experience with the help of Google Gemini Pro api. Built using Node.js, React.js, MongoDB, and Redux Toolkit, this app allows users to engage in text-based conversations with Gemini AI. The application features Google OAuth V2 for user authentication, enabling enhanced capabilities and personalization.
Gemini AI Web App is a Google Gemini clone, providing users with a seamless chat interface powered by advanced AI capabilities. Users can enjoy conversations with Gemini AI, receiving text-based responses. The application supports two user types:
-
Non-authenticated Users:
- Limited to 10 chat requests per hour.
- Access to the last 5 chat history entries.
-
Authenticated Users:
- Unlimited chat responses.
- Full chat history access upon login.
-
Modern Interface:
- Enjoy a clean and user-friendly interface for a seamless chat experience.
Explore the live demo of Gemini AI: https://geminichatai.netlify.app/
-
Clone the repository:
git clone https://github.com/shuvra-matrix/Gemini-Ai--MERN.git
-
Navigate to the server folder:
cd ./server
-
Install dependencies:
npm install
-
Set up environment variables in a
.env
file:MONGO_USER=mongodb_username MONGO_PASS=mongodb_password GEMINI_API_KEY=gemini_api_key CLIENT_API_KEY=server_client_verify_api_key(generate by user) GEO_API_KEY=ipgeolocation_api_key LOCATION_API_KEY=geocode_api_key GOOGLE_CLIENT_ID=google_oauth_client_id GOOGLE_CLIENT_SECRET=google_oauth_client_secret GOOGLE_OAUTH_REDIRECT_URL=google_oauth_redirect_url CLIENT_REDIRECT_URL="http://localhost:3000" ACCESS_TOKEN_JWT_SECRET=cookie_secret REFRESH_TOKEN_JWT_SECRET=cookie_secret ACCESS_TOKEN_EXPIRETIME=15m REFRESH_TOKEN_EXPIRETIME=7d APPLICATION_TYPE="dev" or"production" COOKIE_DOMAIN=serverid_domain
-
Run the server:
npm start
-
Navigate to the root directory:
cd Gemini-Ai--MERN
-
Install client dependencies:
npm install
-
Set up client-side environment variables in a
.env
file:REACT_APP_GEMINI_KEY=user_generated_key) REACT_APP_GOOGLE_CLIENT_ID=google_oauth_client_id REACT_APP_GOOGLE_CLIENT_SECRET=google_oauth_client_secret REACT_APP_GOOGLE_OAUTH_REDIRECT_URL=google_oauth_redirect_url REACT_APP_SERVER_ENDPOINT=http://localhost:3030
-
Run the client:
npm start
If you have Docker installed, use the following command in the root directory:
docker-compose -f docker-compose.yaml up
Gemini AI Web App employs location tracking features for enhanced user experience. The following APIs are utilized on the server side to obtain location and IP details:
-
IP Geolocation API:
- Used to retrieve initial location details based on the user's IP address.
- API Endpoint: https://ipgeolocation.io/
- This information helps in providing a general idea of the user's location.
-
Geocode API:
- Utilized to get precise user location details by updating location based on latitude and longitude.
- API Endpoint: https://geocode.maps.co/
- The app uses this API to convert latitude and longitude coordinates into an accurate user location.
Please note that the use of location data is subject to our Privacy Policy, and user consent is prioritized. The obtained location information is solely used to enhance user experience within the Gemini AI Web App. We do not share this information with third parties.
If you have any concerns or questions regarding the use of location tracking in Gemini AI Web App, please contact us at shuvrachakrabarty97@gmail.com.
Report issues or contribute to the project on GitHub.
Read our Privacy Policy before using Gemini AI. Your use of this web app is subject to our privacy terms.
Read the Disclaimer before using Gemini AI. Use of this web app implies acceptance of the terms stated in the disclaimer.
Enjoy chatting with Gemini AI! 🚀