Skip to content

Balintus00/kotlin-clothing-webshop

Repository files navigation

Kotlin Clothing Webshop

Kotlin MIT License

Kotlin Multiplatform Sample Application

Kotlin Clothing Webshop is Kotlin Multiplatform application. My main goal with the project to learn more and show that how Kotlin Multiplatform can be used to create complex applications. The project includes:

Current project status

Currently, the repository contains an implementation of the proof of concept demo version of the webshop application.

Demo application user interface

Future plans

The next release (1.0.0) will contain:

  • Basic authentication and user management
  • Clothing article browsing

And the following release (1.1.0) will contain:

  • Improvements to the recommendation model inspection Jupyter Notebook
  • Update of the usage of the recommendation model on the backend

Installation Requirements

Requirements to run the backend

The backend requires JDK 17 and Docker to be installed.

Requirements to run the Android, JVM Desktop application

Both the Android and JVM application requires JDK 17 to be installed. To build and install the Android application it is also recommended to install Android Studio.

Requirements to run the Web application

To run the web application, you need to have a browser installed with WebAssembly Garbage Collection Support (WasmGC). Please refer to the related official site for more information about supported browsers.

Requirements to run the iOS application

To check that you have the required dependencies to build and run the iOS application, use the KDoctor tool.

Requirements to run the Kotlin Notebook

Install IntelliJ IDEA and install and enable the Kotlin Notebook and Jupyter IntelliJ IDEA plugins.

Requirements to run the IPython Notebook

Install Python, and the dependencies declared in requirements.txt, and a IPython (Jupyter) Notebook editor software, e.g. PyCharm.

Usage

This section provides instructions on how to use the project, including commands to create artifacts or run it. The only supported setup of the system is when the backend and the client application is running on the same host, or in the case mobile applications when the simulator and emulator is running on the same host.

1. Backend

The recommended way to run the backend is to use the Forced build: docker-compose.yaml custom configuration in IntelliJ IDEA or Android Studio. This configuration always rebuilds the backend, and also runs necessary preprocessing gradle tasks (e.g. copying source code into the rootProject folder to make it accessible from Docker build context). If you don't want to rebuild the backend (if not necessary), use Build: docker-compose.yaml configuration.

The backend will be available on http://localhost:5400 and the PostgreSQL database on http://localhost:5432.

2. Clients (Android, JVM Desktop, iOS, Web application)

Before the client applications could be built, the GraphQL schema must be downloaded to the required place. The easiest way to do this, is to run the downloadKotlinClothingWebshopApolloSchemaFromIntrospection gradle task. Before running the task, make sure that the backend is running.

  • Android application
    • The easiest way to run the android configuration in Android Studio. But you can also use gradle tasks from IDE or using the gradlew to generate an apk:

      ./gradlew android:assemble
      

      The apk will be generated in android/build/outputs/apk/, and in that folder for each build type (currently debug and release is defined) there will be a folder that will contain the apk built with the related build type. And then this apk can be installed onto the running emulator using adb with following command:

      adb install android-debug.apk
      
  • JVM Desktop application
    • To run the JVM Desktop application run the desktop:run gradle task.
  • iOS application
    • Open the Xcode project from the iosApp folder, and build and run it using Xcode.
  • Web application
    • To run the Web application run the wasmWebClient:wasmJsBrowserRun gradle task.

3. Kotlin Exploratory Data Analysis Notebook

Open the notebook in IntelliJ IDEA.

4. Model experimentation IPython Notebook

Open your notebook with your preferred Jupyter Notebook editor tool.

Versioning

This project follows the principles of Semantic Versioning (SemVer).

Acknowledgement

  • The T-Shirt logo in the application's icon is from svgrepo
  • The application icon resources were generated using IconKitchen

Contributing

Thank you for your interest in contributing to this project! At the moment, the repository is not open to external contributions. However, this may change in the future as the project evolves. Stay tuned for updates!