https://github.com/felipekoga/vitamin.kt
Vite and Kotlin/JS example
https://github.com/felipekoga/vitamin.kt
coroutines koin kotlin-js kotlin-multiplatform ktor react react-query vite
Last synced: 4 months ago
JSON representation
Vite and Kotlin/JS example
- Host: GitHub
- URL: https://github.com/felipekoga/vitamin.kt
- Owner: FelipeKoga
- License: mit
- Created: 2025-02-25T23:31:26.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-05T16:29:45.000Z (4 months ago)
- Last Synced: 2025-03-05T23:46:07.489Z (4 months ago)
- Topics: coroutines, koin, kotlin-js, kotlin-multiplatform, ktor, react, react-query, vite
- Language: TypeScript
- Homepage: https://vitamin-koga.vercel.app/
- Size: 698 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Vitamin.kt
  [](https://dashboard.cypress.io/projects/etow1b/runs) [](https://github.com/prettier/prettier) [](http://commitizen.github.io/cz-cli/) [](https://github.com/FelipeKoga/Vitamin.kt/blob/main/LICENSE)
### Vite and Kotlin/JS example
#### Motivation
This project is an experiment with Kotlin/JS in React apps, similar to how Kotlin can be integrated with Swift and SwiftUI for iOS development.
The Kotlin/JS code is located in the core folder, and it’s currently configured for the JS target. However, it’s easy to extend it to other platforms like Android, iOS, or JVM.
Thanks to [@wtchnm](https://github.com/wtchnm) for creating an amazing Vite starter template. I was able to easily integrate Kotlin/JS and run tests to ensure everything is working smoothly. You can check it out [here](https://github.com/wtchnm/Vitamin).
### Tech Stack
- **Vite** with **React**, **TypeScript**, **React Query**, and a lot of cool features that are described in the template repository.
- **Kotlin Multiplatform** with **Kotlin Coroutines**, **Koin**, and **Ktor**.### Roadmap
- [ ] Add more functionalities and cover the Kotlin Multiplatform module with tests.
- [ ] Add more KMP targets, like **Android**, **iOS**, and **JVM**.
- [ ] Integrate with Kotlin Flow
- [ ] Explore how to integrate **Compose Multiplatform** into a React/JS app.
- [ ] Share a **Multiplatform ViewModel** between multiple apps – React, SwiftUI, and Compose.
- [ ] Add multiple modules to the KMP project
- [ ] Try out **Decompose**.### Getting started
Install the dependencies:
```
pnpm build:core && pnpm install
```Then, run:
```
pnpm run dev
```### Scripts
- `pnpm dev` - start a development server with hot reload.
- `pnpm build` - build for production. The generated files will be on the `dist` folder.
- `pnpm preview` - locally preview the production build.
- `pnpm test` - run unit and integration tests related to changed files based on git.
- `pnpm test:ci` - run all unit and integration tests in CI mode.
- `pnpm test:e2e` - run all e2e tests with the Cypress Test Runner.
- `pnpm test:e2e:headless` - run all e2e tests headlessly.
- `pnpm format` - format all files with Prettier.
- `pnpm lint` - runs TypeScript, ESLint and Stylelint.
- `pnpm validate` - runs `lint`, `test:ci` and `test:e2e:ci`.