Skip to content

📱 Compose Multiplatform, 100% UI shared by Compose, generates contents by Gemini

Notifications You must be signed in to change notification settings

wisemuji/compose-would-you-rather-game

Repository files navigation

Would You Rather Game App Using Compose Multiplatform, Gemini

Kotlin Weekly Android iOS Desktop

This is a "Would you rather" game app built using the Kotlin Multiplatform, where 100% of the UI is shared by Compose. Also commonly known as "balance game" in Korean, involve adding conditions repeatedly to create balance. All contents are generated by Google Gemini(Supported Languages: KR, EN)

Shared Element Transitions in Compose, Animated Emoji Lottie resources was used to display animations.



📱🖥️ Compose Multiplatform

Currently builds with Android, iOS, Desktop. Compose UI is entirely shared, without the need for any native UI components.



Tech Stack & Open Source Libraries

How to make Gemini API Requests

The Gemini SDK for Kotlin Multiplatform is currently unavailable; so I generated responses through HTTP requests using Ktor.

Also refer to caution messages in android SDK:

The Google AI SDK for Android is recommended for prototyping only. If you plan to enable billing, we strongly recommend that you use a backend SDK to access the Google AI Gemini API. You risk potentially exposing your API key to malicious actors if you embed your API key directly in your Android app or fetch it remotely at runtime.

How to build

You need a valid Gemini API key. Create one and put it in your local.properties file.

GEMINI_API_KEY=YOUR_API_KEY

And build to run the project.

Contribution

Everyone is welcome to contribute 🤗. Just create an issue or pull requests.

If you like my work, feel free to give it a star ⭐.

License

Copyright 2024 Suhyeon Kim(wisemuji), Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.