Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guilhe/magic
KMP Magic Deck Cards
https://github.com/guilhe/magic
kotlin kotlin-multiplatform swift
Last synced: about 2 months ago
JSON representation
KMP Magic Deck Cards
- Host: GitHub
- URL: https://github.com/guilhe/magic
- Owner: GuilhE
- License: apache-2.0
- Created: 2024-10-24T19:15:19.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-12-16T11:34:47.000Z (about 2 months ago)
- Last Synced: 2024-12-16T12:31:20.843Z (about 2 months ago)
- Topics: kotlin, kotlin-multiplatform, swift
- Language: Kotlin
- Homepage:
- Size: 13.4 MB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Magic
[![Android Weekly](https://androidweekly.net/issues/issue-647/badge)](https://androidweekly.net/issues/issue-647)
KMP sample project acting as a playground to illustrate what's discussed in this article:
## Details
### Shared
The modules `data-models`, `core-database`, and `core-network` are independent, while `data-managers` depends on all three.
Each module is responsible for providing its own Dependency Injection (DI) logic, but the `core-di` module manages the root DI system, utilised by all platforms.
This is why the `core-di` module depends on all other modules and will also contain the Objective-C framework settings.These five modules constitute the Shared Data Layer.
### Platforms
#### Android
The `MagicApp` serves as the entry point and includes the setup for DI. There's no Domain Layer and `Shared Data Layer` is the Data Layer itself. Finally, the `presentation` contains all the logic related to the UI Layer.
To run it `./gradlew :androidApp:installDebug`
#### iOS
The `App` package serves as the entry point and includes the setup for DI.
The `Core` defines the DI protocols and container. The `Data` acts as a bridge between the App's Data Layer and the Shared Data Layer, where the implementation logic resides.
The `Domain` contains the bridge protocols and data structures, and also the app protocols. Finally, the `Presentation` contains all the logic related to the UI Layer.To run it open `iosApp/Magic.xcodeproj` in Xcode and run standard configuration or use [KMP plugin](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform) for Android Studio and choose `iosApp` in `run configurations`.
![]()
## LICENSE
Copyright (c) 2024-present GuilhE
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 atUnless 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.