Code Monkey home page Code Monkey logo

grahamparvinkarimi / gemini-travel-planner Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 239.31 MB

An Android prototype application for planning a travel itinerary based on generative AI responses from Google's Gemini API

License: Apache License 2.0

Kotlin 100.00%
android gemini-api google-gemini google-gemini-ai google-gemini-pro jetpack jetpack-compose kotlin hilt jetpack-compose-navigation jetpackcompose junit material3-android material3-components mockito okhttp3 retrofit2

gemini-travel-planner's Introduction

Google Gemini AI Travel Planner

An Android prototype application for planning a travel itinerary based on generative AI responses from Google's Gemini API

Demo Video Itinerary Planning Screen Itinerary from Gemini AI
App Demo Video App Screenshot 2 App Screenshot 3

Project Overview

Features

  • The user can type in a location or select from one of four quick-select location buttons
  • The user selects a date range that corresponds to the start & end date of the trip that they are planning on taking
  • The GeoApify API validates the location that the user enters
  • Upon successful validation from the the GeoApify API, the Google Gemini generative AI API is prompted to create an itinerary corresponding to the location & dates that the user entered
  • The generative AI response from the Gemini AI is displayed to the user

Dependencies

  • Android Architecture Components (MVVM)
  • Material 3 Jetpack Compose UI Components
  • Jetpack Navigation Compose
  • Hilt/Dagger for Dependency Injection
  • Retrofit & OkHttp for HTTP calls
  • Moshi for JSON parsing
  • Coroutines for concurrency & asynchronous operations
  • JUnit & Mockito for unit tests

Modules

  • :app module for the application's scaffolding
  • :feature:itinerary-planner module for the Itinerary Planner feature

APIs

Loading API Keys from local.properties

This project is set up to retrieve the necessary API keys from local.properties by default. You will need to add your API keys to local.properties for the APIs mentioned below. This section in build.gradle.kts within the app module retrieves the API keys from local.properties:

        //load the api keys from local.properties
        val keystoreFile = project.rootProject.file("local.properties")
        val properties = Properties()
        properties.load(keystoreFile.inputStream())
        val geminiAPIKey = properties.getProperty("geminiAPIKey") ?: ""
        val geoApifyAPIKey = properties.getProperty("geoApifyAPIKey") ?: ""

GeoApify API

This app uses the GeoApify Geocoding API to validate the locations entered by the users. To use the API, you will need to obtain an API key from https://www.geoapify.com/geocoding-api and add it to the project's local.properties.

Google Gemini API

This app uses the Google Gemini API to develop a generative AI itinerary based on the entered location and dates. To use the API, you will need to obtain an API key from https://ai.google.dev/gemini-api/docs/api-key and add it to the project's local.properties.

gemini-travel-planner's People

Contributors

grahamparvinkarimi avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.