Giter Club home page Giter Club logo

kotlin-multiplatform-full-stack-web's Introduction

Kotlin React Ktor JS Multiplatform with kotlin-emotion

Responsive CSS with kotlin-emotion

JetBrains/kotlin-wrappers#1949

YouTube Video

https://youtu.be/dG7akwtWsLA

Overview

My BLE Scanner & Debugger is now live on the Google Play Store.

Get it on Google Play

This app uses a pre-populated Room database that includes BLE Services, Characteristics, and Descriptors from Nordic's Bluetooth Numbers Database.

Nordic's database might be updated from time to time, and I wanted a way to update my SQLite data without having to manually recreate my database every time. To accomplish this, I created a Kotlin/JS/React/Ktor Multiplatform app that does the following when you click Start Sync:

  1. From the frontend, it calls a Ktor API path to /descriptors, using Ktor Http Client for JS.
  2. From the API, it goes out to GitHub and reads the Raw JSON, using Ktor Http Client CIO. Here's an example of descriptor_uuids.json with added rows: descriptor_uuids.json
  3. Next, the API converts the Raw JSON to an object.
  4. Using Exposed, the API then reads the existing data from the SQLite database, and creates a list of all new Descriptors.
  5. If there are new records, the API inserts new Descriptors into the SQLite table.
  6. Finally, the API returns the response to the React frontend.

In the screenshot below, a new Characteristic was added to the Numbers database after I created my pre-populated room database. You can see the addition here: Nordic's git commit. My app found the new record, and inserted it into my local SQLite database:

ReactKtorApp

kotlin-multiplatform-full-stack-web's People

Contributors

santansarah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.