Skip to content

Commit

Permalink
Merge pull request #22 from JoelKanyi/develop
Browse files Browse the repository at this point in the history
1.0.0
  • Loading branch information
joelkanyi authored Oct 3, 2023
2 parents 50b4141 + 9558c02 commit 112f460
Show file tree
Hide file tree
Showing 193 changed files with 12,307 additions and 3,603 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Build

on:
push:
branches: [ develop ]
pull_request:
branches: [ main, develop ]

Expand All @@ -14,10 +16,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Make gradle executable
run: chmod +x ./gradlew
Expand Down
100 changes: 100 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<p align="center"><img src="art/app_logo.png" alt="MealTime" height="150px"></p>

# FocusBloom
FocusBloom is a Kotlin Multiplatform Pomodoro app that helps users enhance their productivity and time management skills through focused work intervals and short breaks.

## Platforms
![](https://img.shields.io/badge/Android-black.svg?style=for-the-badge&logo=android) | ![](https://img.shields.io/badge/iOS-black.svg?style=for-the-badge&logo=apple) | ![](https://img.shields.io/badge/Desktop-black.svg?style=for-the-badge&logo=windows) | ![](https://img.shields.io/badge/Web-black.svg?style=for-the-badge&logo=google-chrome)
:----: | :----: | :----: | :----:
✅ | ✅ | ✅ | Planned
<a href='https://play.google.com/store/apps/details?id=com.joelkanyi.focusbloom.android'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' height='80px'/></a>

## Screenshots
### Android
<img src="art/app_screen1.jpeg" width="250"/> <img src="art/app_screen2.jpeg" width="250"/> <img src="art/app_screen3.jpeg" width="250/"> <img src="art/app_screen4.jpeg" width="250"/> <img src="art/app_screen5.jpeg" width="250"/>

### iOS
<img src="art/ios_screen1.png" width="250"/> <img src="art/ios_screen2.png" width="250"/> <img src="art/ios_screen3.png" width="250"/> <img src="art/ios_screen4.png" width="250"/> <img src="art/ios_screen5.png" width="250"/> <img src="art/ios_screen6.png" width="250"/> <img src="art/ios_screen7.png" width="250"/> <img src="art/ios_screen8.png" width="250"/> <img src="art/ios_screen9.png" width="250"/>

### Desktop
<img src="art/dsk_screen1.png"/>
<img src="art/dsk_screen2.png"/>
<img src="art/dsk_screen3.png"/>
<img src="art/dsk_screen4.png"/>
<img src="art/dsk_screen5.png"/>
## Architecture
The app is shared between Android, iOS and Desktop. The shared code is written in Kotlin and the UI is built with Compose Multiplatform. The shared code is compiled to Kotlin/JVM for Android and Kotlin/Native for iOS and Desktop.


### Modules
- shared:
- contains all the shared code between the platforms
- contains the business logic and data layer
- contains the UI layer
- contains the database layer
- contains the repository layer
- android: contains the android app
- contains the android app
- ios: contains the ios app
- contains the ios app
- desktop: contains the desktop app
- contains the desktop app

## Built with
- [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html) - The Kotlin Multiplatform technology is designed to simplify the development of cross-platform projects.
- [Compose Multiplatform](https://www.jetbrains.com/lp/compose-multiplatform/) - a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
- [SQLDelight](https://github.com/cashapp/sqldelight) - SQLDelight is an open-source library developed by Cash App (formerly Square, Inc.) for working with SQL databases in Kotlin-based Android and multi-platform applications.
- [Multiplatform Settings](https://github.com/russhwolf/multiplatform-settings) - A Kotlin Multiplatform library for saving simple key-value data.
- [Koin](https://insert-koin.io/) - The pragmatic Kotlin & Kotlin Multiplatform Dependency Injection framework.
- [Voyager](https://voyager.adriel.cafe/) - A multiplatform navigation library.
- [Kotlinx-datetime](https://github.com/Kotlin/kotlinx-datetime) - KotlinX multiplatform date/time library.
- [Kotlinx-serilization](https://github.com/Kotlin/kotlinx.serialization) - Kotlin multiplatform / multi-format serialization.
- [Koala plot](https://github.com/KoalaPlot/koalaplot-core) - Koala Plot is a Compose Multiplatform based charting and plotting library written in Kotlin.
- [Compose Components Resources](https://mvnrepository.com/artifact/org.jetbrains.compose.components/components-resources) - Resources For Compose Multiplatform.
- [Material3 Window Size Multiplatform](https://github.com/chrisbanes/material3-windowsizeclass-multiplatform) - About Material 3 Window Size Class for Compose Multiplatform.
- [Spotless](https://github.com/diffplug/spotless) - A code formatter that helps keep the codebase clean.
- [Detekt](https://github.com/detekt/detekt) - Static code analysis for Kotlin.
- [Ktlint](https://github.com/pinterest/ktlint) - A static code analysis tool and formatter for Kotlin.
- [Github Actions](https://docs.github.com/en/actions) - A CI/CD tool that helps automate workflows.
- [Renovate](https://docs.renovatebot.com/) - An open-source software tool designed to help automate the process of updating dependencies in software projects.

## Run project
### Android
To run the application on android device/emulator:
- open project in Android Studio and run imported android run configuration

To build the application bundle:
- run `./gradlew :composeApp:assembleDebug`
- find `.apk` file in `composeApp/build/outputs/apk/debug/composeApp-debug.apk`

### Desktop
Run the desktop application: `./gradlew :desktop:run`

### iOS
To run the application on iPhone device/simulator:
- Open `ios/iosApp.xcworkspace` in Xcode and run standard configuration
- Or use [Kotlin Multiplatform Mobile plugin](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile) for Android Studio

## Todo
- [ ] Work on Notifications: To remind you of upcoming and overdue tasks
- [ ] Reminders: Sounds for breaks and work sessions
- [ ]
## Credits
-
## License
```xml
Copyright 2023 JoelKanyi

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 at

http://www.apache.org/licenses/LICENSE-2.0

Unless 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.
```

21 changes: 18 additions & 3 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2023 Joel Kanyi.
*
* 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 at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless 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.
*/
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.android.kotlin)
Expand Down Expand Up @@ -28,12 +43,12 @@ android {

compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}

buildFeatures {
Expand Down
3 changes: 2 additions & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:name="com.joelkanyi.focusbloom.android.FocusBloomApp"
android:name="com.joelkanyi.focusbloom.android.BloomApp"
android:allowBackup="false"
android:supportsRtl="true"
android:label="@string/focusbloom"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<activity
android:name="com.joelkanyi.focusbloom.android.MainActivity"
Expand Down
Binary file added android/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions android/src/main/java/com/joelkanyi/focusbloom/android/BloomApp.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright 2023 Joel Kanyi.
*
* 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 at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless 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.
*/
package com.joelkanyi.focusbloom.android

import android.app.Application
import com.joelkanyi.focusbloom.android.di.androidModule
import com.joelkanyi.focusbloom.di.KoinInit
import io.github.aakira.napier.BuildConfig
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.core.logger.Level

class BloomApp : Application() {
override fun onCreate() {
super.onCreate()

KoinInit().init {
androidLogger(level = if (BuildConfig.DEBUG) Level.ERROR else Level.NONE)
androidContext(androidContext = this@BloomApp)
modules(
listOf(
androidModule
)
)
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2023 Joel Kanyi.
*
* 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 at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless 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.
*/
package com.joelkanyi.focusbloom.android

import android.os.Bundle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2023 Joel Kanyi.
*
* 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 at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless 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.
*/
package com.joelkanyi.focusbloom.android.di

import org.koin.dsl.module
Expand Down
14 changes: 14 additions & 0 deletions android/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="432"
android:viewportHeight="432">
<group android:scaleX="0.54"
android:scaleY="0.54"
android:translateX="99.36"
android:translateY="99.36">
<path
android:pathData="M173.44,216a66.77,66.77 0,0 1,-66.81 66.82C42.51,282.84 0,214.6 0,214.6s35.09,-62.53 106.63,-65.4c35.54,-1.42 66.81,29.92 66.81,66.8zM216,258.56a66.77,66.77 0,0 1,66.82 66.81C282.84,389.49 214.6,432 214.6,432s-62.53,-35.09 -65.4,-106.63c-1.42,-35.54 29.92,-66.81 66.8,-66.81zM258.56,216a66.77,66.77 0,0 1,66.81 -66.82C389.49,149.16 432,217.4 432,217.4s-35.09,62.53 -106.63,65.4c-35.54,1.42 -66.81,-29.92 -66.81,-66.8zM214.52,173.44a66.77,66.77 0,0 1,-66.81 -66.81C147.71,42.51 216,0 216,0s62.53,35.09 65.39,106.63c1.37,35.54 -29.96,66.81 -66.87,66.81z"
android:fillColor="#667ce9"/>
</group>
</vector>
Loading

0 comments on commit 112f460

Please sign in to comment.