Skip to content

timotejAdamec/Snag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

686 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a Kotlin Multiplatform project targeting Android, iOS, Web, Desktop (JVM), Server.

Prerequisites

Google Cloud Storage Setup

This project uses Google Cloud Storage for file storage. Follow these steps to set up your development environment:

1. Install Google Cloud CLI

  • macOS (using Homebrew):
  brew install --cask google-cloud-sdk

2. Authenticate with Google Cloud

Initialize the gcloud CLI and authenticate:

gcloud init

Follow the prompts to:

  • Sign in with your Google account (you have to be added to the GCP project)
  • Select the snag-487319 project

3. Set Up Application Default Credentials

Configure credentials for the application code:

gcloud auth application-default login

This creates credentials at ~/.config/gcloud/application_default_credentials.json that the application will use automatically.

Important: Never commit credential files to the repository. They contain sensitive authentication tokens.

4. Verify Setup

You can verify your setup by listing the project's buckets:

gsutil ls

Building and Running the Project

Build and Run Android Application

To build and run the development version of the Android app, use the run configuration from the run widget in your IDE’s toolbar or build it directly from the terminal:

  • on macOS/Linux
    ./gradlew :androidApp:assembleDebug
  • on Windows
    .\gradlew.bat :androidApp:assembleDebug

Build and Run Desktop (JVM) Application

To build and run the development version of the desktop app, use the run configuration from the run widget in your IDE’s toolbar or run it directly from the terminal:

  • on macOS/Linux
    ./gradlew :composeApp:run
  • on Windows
    .\gradlew.bat :composeApp:run

Build and Run Server

To build and run the development version of the server, use the run configuration from the run widget in your IDE’s toolbar or run it directly from the terminal:

  • on macOS/Linux
    ./gradlew :server:run --no-daemon
  • on Windows
    .\gradlew.bat :server:run --no-daemon

Build and Run Web Application

To build and run the development version of the web app, use the run configuration from the run widget in your IDE's toolbar or run it directly from the terminal:

  • for the Wasm target (faster, modern browsers):
    • on macOS/Linux
      ./gradlew :composeApp:wasmJsBrowserDevelopmentRun
    • on Windows
      .\gradlew.bat :composeApp:wasmJsBrowserDevelopmentRun
  • for the JS target (slower, supports older browsers):
    • on macOS/Linux
      ./gradlew :composeApp:jsBrowserDevelopmentRun
    • on Windows
      .\gradlew.bat :composeApp:jsBrowserDevelopmentRun

Build and Run iOS Application

To build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.

Server Target

By default, frontend clients connect to localhost. To target a Cloud Run deployment instead, set the snag.serverTarget property in gradle.properties:

snag.serverTarget=dev

Valid values: localhost (default), dev, demo.

After changing the value, re-sync the Gradle project in your IDE. This applies to all build targets (Android, desktop, web).

Alternatively, you can pass it as a command-line flag without modifying any files:

./gradlew <task> -Psnag.serverTarget=dev

Making a Release

  1. Tag and push:
    git tag v0.2.0
    git push origin v0.2.0
  2. GitHub Actions automatically builds all platform artifacts and creates a GitHub Release with them attached
  3. Artifacts are downloadable from the Releases page

The version is derived entirely from the git tag — no manual version bumps needed anywhere.

Project Structure

See Project Structure.

FIT CTU logo

Affiliation

This software was developed with the support of the Faculty of Information Technology, Czech Technical University in Prague. For more information, visit fit.cvut.cz.

About

A KMP snagging system for Android, iOS, desktop and web with a Ktor backend.

Resources

License

Stars

Watchers

Forks

Packages