Skip to content

fernandospr/kmp-storyteller

Repository files navigation

animated

Kotlin Multiplatform Story Teller App

Choose a character 🐶🐱 and Gemini AI will generate a bedtime story for you.

Showcase (sound on!)

StoryTeller-Showcase.mp4

Setting up your development environment

To setup the environment, please consult these instructions.

Before running

  • Get a Gemini API Key
  • Add to local.properties file located in the root directory (create if it doesn't exist): gemini.api_key=YOUR_KEY

Running the Android app

Open project in IntelliJ IDEA or Android Studio and run composeApp configuration.

Running the iOS app

Open project in IntelliJ IDEA or Android Studio and run iosApp configuration.

Or open iosApp/iosApp.xcodeproj in Xcode and run it.

Technologies

The app uses the following multiplatform dependencies in its implementation:

To synthesize speech from the story text, it uses:

How to modify the AI prompt?

If you want the AI to generate other type of stories or make them longer, you can modify the prompt by opening the strings.xml files. You'll find one prompt string per language.

How to add more characters?

Open CharacterRepository and modify getAllCharacters(): Add the character you desire by providing a name, emoji and a background color.

You have to declare the name in the strings.xml files. You'll find one name string per language.