Skip to content

yassineAbou/LLMS

Repository files navigation

LLMS

LLMS

AI Kotlin Kotlin Multiplatform Compose Multiplatform Ktor WebAssembly Android iOS Desktop

Discover the power of AI with our Kotlin Multiplatform app. Choose from the latest open-source text and image models to boost your creativity. Pick the model that fits you, create unique texts or images. and keep everything safe and in sync across your devices.

🌸 Powered by Pollinations.ai

Pollinations.ai

This app uses Pollinations.ai β€” an open-source AI platform providing a unified API for text and image generation.

Pollinations.ai GitHub

πŸš€ How to Run

You can run the application for Android, Desktop, WebAssembly, and iOS directly from your IDE.

  1. Open the project in Android Studio or IntelliJ IDEA.
  2. Select your desired run configuration from the dropdown menu (e.g., composeApp, desktopRun, iosApp).
  3. Click the Run ▢️ button.

For iOS, you can alternatively open the iosApp folder in Xcode and run it from there.

🎨 Demo

chat.mp4
Imagine.mp4
You.mp4

πŸ—οΈ Architecture

Kotlin Multiplatform

πŸ“¦ Libraries

Package Structure

LLMS/
β”œβ”€β”€ composeApp/    #  Main application module for the UI, built with Compose Multiplatform
β”‚   └── src/
β”‚       β”œβ”€β”€ org/yassineabou/llms/app/
β”‚       β”‚   β”œβ”€β”€ App.kt
β”‚       β”‚   β”œβ”€β”€ MainScreen.kt
β”‚       β”‚   β”œβ”€β”€ core/
β”‚       β”‚   β”‚   β”œβ”€β”€ data/
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ async/
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ local/
β”‚       β”‚   β”‚   β”‚   └── remote/
β”‚       β”‚   β”‚   β”œβ”€β”€ di/
β”‚       β”‚   β”‚   β”œβ”€β”€ navigation/
β”‚       β”‚   β”‚   β”œβ”€β”€ sharedViews/
β”‚       β”‚   β”‚   β”œβ”€β”€ theme/
β”‚       β”‚   β”‚   └── util/
β”‚       β”‚   └── feature/
β”‚       β”‚       β”œβ”€β”€ chat/
β”‚       β”‚       β”‚   β”œβ”€β”€ data/model/
β”‚       β”‚       β”‚   └── ui/
β”‚       β”‚       β”‚       β”œβ”€β”€ chat/
β”‚       β”‚       β”‚       β”œβ”€β”€ history/
β”‚       β”‚       β”‚       β”œβ”€β”€ listDetailPane/
β”‚       β”‚       β”‚       └── view/
β”‚       β”‚       β”œβ”€β”€ imagine/
β”‚       β”‚       β”‚   β”œβ”€β”€ data/model/
β”‚       β”‚       β”‚   └── ui/
β”‚       β”‚       β”‚       β”œβ”€β”€ supportingPane/
β”‚       β”‚       β”‚       β”œβ”€β”€ util/
β”‚       β”‚       β”‚       └── view/
β”‚       β”‚       └── you/
β”‚       β”‚           β”œβ”€β”€ model/
β”‚       β”‚           └── ui/
β”‚       β”‚               β”œβ”€β”€ util/
β”‚       β”‚               └── view/
β”‚       └── sql/LlmsDatabse/llms/    # SQLiteNow source files defining the local database schema
β”‚
β”œβ”€β”€ server/     #  Backend server module, using Ktor, handling API requests and database interactions.
β”‚   └── src/
β”‚       └── org/yassineabou/llms/
β”‚           β”œβ”€β”€ Application.kt
β”‚           β”œβ”€β”€ Environment.kt
β”‚           └── database/
β”‚               β”œβ”€β”€ tables/
β”‚               β”œβ”€β”€ di/
β”‚               β”œβ”€β”€ repository/
β”‚               β”œβ”€β”€ service/
β”‚               └── DatabaseFactory.kt
β”‚
└── shared/    #  Shared API contract and data models, enabling type-safe communication between compose and server module.
    └── src/
        └── org/yassineabou/llms/api/
            β”œβ”€β”€ ChatService.kt
            β”œβ”€β”€ ImageService.kt
            β”œβ”€β”€ MessageService.kt
            β”œβ”€β”€ UserService.kt
            β”œβ”€β”€ Constants.kt
            └── Platform.kt

πŸ”΅πŸ”΄πŸŸ‘πŸŸ’ Google Authentication Setup

This project supports Google Authentication for data syncing across devices (part of Step 5 in Progress). Keys and sensitive files (e.g., google-services.json, GoogleService-Info.plist) are hidden and not committed to GitHub for security. To enable real Google auth after cloning the repo, follow these platform-specific steps. We've included fake data in the code (e.g., in commonMain/YouViewModel.kt) for testing without setupβ€”uncomment the real auth code when ready.

If you are confused in the process, watch this video: https://youtu.be/-5Ws4HSaYJc?si=uHhDbmnhC7GBZEL3.

General Steps

  1. Go to the Firebase Console.
  2. Create a new Firebase project (or select an existing one).
  3. Enable Authentication β†’ Sign-in method β†’ Google.
  4. For multiplatform support, also go to Google Cloud Console β†’ APIs & Services β†’ Credentials to create OAuth 2.0 Client IDs as needed.

Compose App

  1. In Firebase, click β€œAdd app” β†’ Android.
  2. Register your package name (e.g., com.yassineabou.llms), add SHA-1 fingerprints (debug/release).
  3. Download google-services.json.
  4. Replace the placeholder in composeApp/google-services.json with your file.
  5. In Google Cloud Console, create an β€œAndroid” OAuth Client ID with the same package name and SHA-1.
  6. In androidMain/MainActivity.kt, uncomment the init code for KMAuthInitializer.
  7. In commonMain/YouViewModel.kt and commonMain/App.kt, uncomment the Google auth-related code.
  8. Sync Gradle and rebuild.

iOSMain Module

  1. In Firebase, click β€œAdd app” β†’ iOS.
  2. Register your bundle ID, App Store ID (optional), and nickname.
  3. Download GoogleService-Info.plist.
  4. Replace the placeholder in iosApp/GoogleService-Info.plist with your file.
  5. Drag it into Xcode (check β€œCopy items if needed”).
  6. Add the Google Sign-In SDK via Xcode: File β†’ Add Packages… β†’ URL: https://github.com/google/GoogleSignIn-iOS β†’ Add GoogleSignIn to your target.
  7. In iosApp/Info.plist, uncomment and paste:
    • <key>GIDClientID</key><string>PASTE CLIENT_ID FROM GoogleService-Info.plist HERE</string>
    • For <key>CFBundleURLTypes</key>, add the <dict> with <key>CFBundleURLSchemes</key><array><string>PASTE REVERSED_CLIENT_ID FROM GoogleService-Info.plist HERE</string></array>.

Desktop/WebAssembly (desktopMain Module and commonMain)

  1. In Google Cloud Console, create a β€œWeb application” OAuth Client ID.
  2. Add authorized redirect URIs (e.g., http://localhost:8080/callback).
  3. Copy the generated CLIENT_ID and CLIENT_SECRET.
  4. Paste them into commonMain/GoogleOAuthConfig.kt (replace the empty constants).
  5. In desktopMain/main.kt, uncomment the init code for KMAuthInitializer.initClientSecret.
  6. In commonMain/App.kt and commonMain/YouViewModel.kt, uncomment the Google auth-related code.

🀝 Contribution

We welcome contributions to our project! Please follow these guidelines when submitting changes:

  • Report bugs and feature requests by creating an issue on our GitHub repository.
  • Contribute code changes by forking the repository and creating a new branch.
  • Ensure your code follows our coding conventions.
  • Improve our documentation by submitting changes as a pull request.

Thank you for your interest in contributing to our project!

πŸ“œ License

Copyright 2025 Yassine Abou 
  
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.

About

Discover the power of AI with our Kotlin Multiplatform app. Choose from the latest open-source text and image models to boost your creativity. Pick the model that fits you, create unique texts or images. and keep everything safe and in sync across your devices.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages