├── .editorconfig
├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── pull_request_template.md
└── workflows
│ ├── branch.yml
│ ├── contributors.yml
│ ├── deploy-to-playstore.yml
│ └── main.yml
├── .gitignore
├── CONTRIBUTING.md
├── Gemfile
├── Gemfile.lock
├── README.md
├── app
├── .gitignore
├── build.gradle.kts
├── google-services.json
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── ic_launcher-playstore.png
│ ├── java
│ └── com
│ │ └── android254
│ │ └── droidconKE2022
│ │ ├── DroidconKE2022.kt
│ │ ├── crashlytics
│ │ └── CrashlyticsTree.kt
│ │ └── services
│ │ └── MessagingService.kt
│ └── res
│ ├── drawable-v24
│ └── ic_launcher_foreground.xml
│ ├── drawable
│ └── ic_launcher_background.xml
│ ├── mipmap-hdpi
│ ├── ic_droidcon_launcher_foreground.png
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ ├── ic_droidcon_launcher_foreground.png
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ ├── ic_droidcon_launcher_foreground.png
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ ├── ic_droidcon_launcher_foreground.png
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ ├── ic_droidcon_launcher_foreground.png
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── values-night
│ └── themes.xml
│ ├── values
│ ├── colors.xml
│ ├── ic_droidcon_launcher_background.xml
│ ├── strings.xml
│ └── themes.xml
│ └── xml
│ ├── backup_rules.xml
│ └── data_extraction_rules.xml
├── build.gradle.kts
├── chai
├── .gitignore
├── README.md
├── build.gradle.kts
├── consumer-rules.pro
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── droidconke
│ │ └── chai
│ │ ├── Theme.kt
│ │ ├── atoms
│ │ ├── CFonts.kt
│ │ └── Color.kt
│ │ ├── components
│ │ ├── CButtons.kt
│ │ ├── CCards.kt
│ │ ├── CInputFiels.kt
│ │ ├── CTabs.kt
│ │ └── CText.kt
│ │ ├── icons
│ │ └── Icons.kt
│ │ ├── images
│ │ └── Images.kt
│ │ └── utils
│ │ ├── Shape.kt
│ │ └── Spacing.kt
│ └── res
│ ├── drawable
│ ├── about_icon.xml
│ ├── droidcon_icon.png
│ ├── feed_icon.xml
│ ├── home_icon.xml
│ ├── ic_back_arrow.xml
│ ├── ic_google_logo_icon.xml
│ ├── ic_green_session_card_spacer.xml
│ ├── ic_orange_session_card_spacer.xml
│ ├── ic_topbar_bg_login.xml
│ ├── ic_topbar_bg_login_dark.xml
│ ├── sessions_icon.xml
│ ├── toolbar_bg_sign_up_dark.xml
│ └── topbar_bg_sign_up.xml
│ └── font
│ ├── montserrat_bold.ttf
│ ├── montserrat_extra_light.ttf
│ ├── montserrat_light.ttf
│ ├── montserrat_medium.ttf
│ ├── montserrat_regular.ttf
│ ├── montserrat_semi_bold.ttf
│ └── montserrat_thin.ttf
├── chaidemo
├── .gitignore
├── README.md
├── build.gradle.kts
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── droidconke
│ │ └── chaidemo
│ │ ├── ChaiDemo.kt
│ │ ├── ChaiDemoActivity.kt
│ │ └── screens
│ │ └── TextDemo.kt
│ └── res
│ ├── drawable-v24
│ └── ic_launcher_foreground.xml
│ ├── drawable
│ └── ic_launcher_background.xml
│ ├── mipmap-anydpi-v26
│ ├── ic_launcher.xml
│ └── ic_launcher_round.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.webp
│ └── ic_launcher_round.webp
│ ├── mipmap-mdpi
│ ├── ic_launcher.webp
│ └── ic_launcher_round.webp
│ ├── mipmap-xhdpi
│ ├── ic_launcher.webp
│ └── ic_launcher_round.webp
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.webp
│ └── ic_launcher_round.webp
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.webp
│ └── ic_launcher_round.webp
│ └── values
│ ├── colors.xml
│ ├── strings.xml
│ └── themes.xml
├── codeAnalysis.sh
├── data
├── .gitignore
├── build.gradle.kts
├── schemas
│ └── com.android254.data.db.Database
│ │ └── 1.json
└── src
│ ├── main
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── android254
│ │ └── data
│ │ ├── dao
│ │ ├── BaseDao.kt
│ │ ├── BookmarkDao.kt
│ │ ├── OrganizersDao.kt
│ │ ├── SessionDao.kt
│ │ └── SpeakerDao.kt
│ │ ├── db
│ │ ├── Database.kt
│ │ ├── model
│ │ │ ├── BookmarkEntity.kt
│ │ │ ├── OrganizerEntity.kt
│ │ │ ├── SessionEntity.kt
│ │ │ └── SpeakerEntity.kt
│ │ └── util
│ │ │ ├── DateStringConverter.kt
│ │ │ └── InstantConverter.kt
│ │ ├── di
│ │ ├── DaoModule.kt
│ │ ├── DatabaseModule.kt
│ │ ├── DatastoreModule.kt
│ │ ├── NetworkModule.kt
│ │ └── RepoModule.kt
│ │ ├── network
│ │ ├── Constants.kt
│ │ ├── apis
│ │ │ ├── AuthApi.kt
│ │ │ ├── FeedApi.kt
│ │ │ ├── FeedbackApi.kt
│ │ │ ├── OrganizersApi.kt
│ │ │ ├── SessionsApi.kt
│ │ │ ├── SpeakersApi.kt
│ │ │ └── SponsorsApi.kt
│ │ ├── models
│ │ │ ├── payloads
│ │ │ │ ├── Feedback.kt
│ │ │ │ └── GoogleToken.kt
│ │ │ └── responses
│ │ │ │ ├── AccessTokenDTO.kt
│ │ │ │ ├── BookmarkDTO.kt
│ │ │ │ ├── Feed.kt
│ │ │ │ ├── OrganizerDTO.kt
│ │ │ │ ├── PaginatedResponse.kt
│ │ │ │ ├── PaginationMetaData.kt
│ │ │ │ ├── ResponseMetaData.kt
│ │ │ │ ├── RoomDTO.kt
│ │ │ │ ├── SessionDTO.kt
│ │ │ │ ├── SpeakerDTO.kt
│ │ │ │ ├── SponsorDTO.kt
│ │ │ │ ├── StatusDTO.kt
│ │ │ │ └── UserDetailsDTO.kt
│ │ └── util
│ │ │ ├── HttpClientFactory.kt
│ │ │ ├── SafeApiCall.kt
│ │ │ └── TokenProvider.kt
│ │ ├── preferences
│ │ └── DefaultTokenProvider.kt
│ │ └── repos
│ │ ├── AuthManager.kt
│ │ ├── HomeRepoImpl.kt
│ │ ├── OrganizersSource.kt
│ │ ├── SessionsManager.kt
│ │ ├── SpeakersManager.kt
│ │ └── mappers
│ │ ├── OrganizersMapper.kt
│ │ ├── SessionMapper.kt
│ │ ├── SpeakerMapper.kt
│ │ └── SponsorsMapper.kt
│ └── test
│ └── java
│ └── com
│ └── android254
│ └── data
│ ├── dao
│ └── SessionDaoTest.kt
│ ├── network
│ ├── AuthApiTest.kt
│ ├── FeedApiTest.kt
│ ├── FeedbackApiTest.kt
│ ├── MockTokenProvider.kt
│ ├── OrganizersApiTest.kt
│ ├── SessionApiTest.kt
│ ├── SpeakerRemoteSourceTest.kt
│ ├── SponsorsApiTest.kt
│ └── apis
│ │ └── Utils.kt
│ ├── preferences
│ └── DefaultTokenProviderTest.kt
│ └── repos
│ ├── AuthManagerTest.kt
│ ├── SampleData.kt
│ └── SessionsManagerTest.kt
├── detekt.yml
├── domain
├── .gitignore
├── build.gradle.kts
└── src
│ └── main
│ └── java
│ └── com
│ └── android254
│ └── domain
│ ├── models
│ ├── Creator.kt
│ ├── DataResult.kt
│ ├── HomeDetails.kt
│ ├── Organizer.kt
│ ├── OrganizingPartners.kt
│ ├── ResourceResult.kt
│ ├── Session.kt
│ ├── SessionDomainModel.kt
│ └── Speaker.kt
│ └── repos
│ ├── AuthRepo.kt
│ ├── HomeRepo.kt
│ ├── OrganizersRepository.kt
│ ├── SessionsRepo.kt
│ └── SpeakersRepo.kt
├── fastlane
├── Appfile
├── Fastfile
└── README.md
├── gradle.properties
├── gradle
├── libs.versions.toml
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── presentation
├── .gitignore
├── build.gradle.kts
└── src
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── android254
│ │ │ └── presentation
│ │ │ ├── about
│ │ │ └── view
│ │ │ │ ├── AboutScreen.kt
│ │ │ │ ├── AboutViewModel.kt
│ │ │ │ └── OrganizingTeamComponent.kt
│ │ │ ├── activity
│ │ │ └── MainActivity.kt
│ │ │ ├── auth
│ │ │ ├── AuthViewModel.kt
│ │ │ ├── GoogleSignInHandler.kt
│ │ │ └── view
│ │ │ │ ├── AuthDialog.kt
│ │ │ │ └── GoogleSignInButton.kt
│ │ │ ├── common
│ │ │ ├── bottomnav
│ │ │ │ └── BottomNavigationBar.kt
│ │ │ ├── bottomsheet
│ │ │ │ ├── BottomSheetScaffold.kt
│ │ │ │ ├── Drawer.kt
│ │ │ │ ├── Strings.kt
│ │ │ │ └── Swipeable.kt
│ │ │ ├── components
│ │ │ │ ├── DroidConTextField.kt
│ │ │ │ ├── DroidconAppBar.kt
│ │ │ │ ├── DroidconAppBarWithFeedbackButton.kt
│ │ │ │ ├── DroidconAppBarWithFilter.kt
│ │ │ │ ├── FullscreenDialog.kt
│ │ │ │ ├── ImageAvatar.kt
│ │ │ │ ├── Loader.kt
│ │ │ │ ├── OrganizedBySection.kt
│ │ │ │ ├── PrimaryButton.kt
│ │ │ │ ├── SessionsCard.kt
│ │ │ │ ├── SessionsLoadingSkeleton.kt
│ │ │ │ ├── SocialAuthButton.kt
│ │ │ │ ├── SpeakersCard.kt
│ │ │ │ ├── SponsorsCard.kt
│ │ │ │ └── ToggleButtonGroup.kt
│ │ │ ├── navigation
│ │ │ │ ├── Navigation.kt
│ │ │ │ └── Screens.kt
│ │ │ └── theme
│ │ │ │ ├── Color.kt
│ │ │ │ ├── Theme.kt
│ │ │ │ └── Type.kt
│ │ │ ├── feed
│ │ │ └── view
│ │ │ │ ├── FeedComponent.kt
│ │ │ │ ├── FeedScreen.kt
│ │ │ │ └── FeedShareSection.kt
│ │ │ ├── feedback
│ │ │ └── view
│ │ │ │ └── FeedBackScreen.kt
│ │ │ ├── home
│ │ │ ├── components
│ │ │ │ ├── HomeBannerSection.kt
│ │ │ │ ├── HomeSessionSection.kt
│ │ │ │ ├── HomeSpacer.kt
│ │ │ │ ├── HomeSpeakerComponent.kt
│ │ │ │ └── HomeSpeakersSection.kt
│ │ │ ├── screen
│ │ │ │ └── HomeScreen.kt
│ │ │ ├── viewmodel
│ │ │ │ └── HomeViewModel.kt
│ │ │ └── viewstate
│ │ │ │ └── HomeViewState.kt
│ │ │ ├── models
│ │ │ ├── EventDate.kt
│ │ │ ├── OrganizingTeamMember.kt
│ │ │ ├── SessionDetailsPresentationModel.kt
│ │ │ ├── SessionPresentationModel.kt
│ │ │ ├── SessionsFilterAdapter.kt
│ │ │ ├── SessionsFilterOption.kt
│ │ │ ├── Speaker.kt
│ │ │ └── SpeakerUI.kt
│ │ │ ├── sessionDetails
│ │ │ ├── SessionDetailsViewModel.kt
│ │ │ └── view
│ │ │ │ └── SessionDetailsScreen.kt
│ │ │ ├── sessions
│ │ │ ├── components
│ │ │ │ ├── EventDaySelector.kt
│ │ │ │ ├── EventDaySelectorButton.kt
│ │ │ │ ├── SessionList.kt
│ │ │ │ └── SessionsFilterPanel.kt
│ │ │ ├── mappers
│ │ │ │ └── SessionMapper.kt
│ │ │ ├── utils
│ │ │ │ ├── FilterKeys.kt
│ │ │ │ └── SessionsFilterCategory.kt
│ │ │ └── view
│ │ │ │ ├── SessionsFilterState.kt
│ │ │ │ ├── SessionsScreen.kt
│ │ │ │ └── SessionsViewModel.kt
│ │ │ └── speakers
│ │ │ ├── SpeakersViewModel.kt
│ │ │ └── view
│ │ │ ├── SpeakerComponent.kt
│ │ │ ├── SpeakerDetailsScreen.kt
│ │ │ ├── SpeakersScreen.kt
│ │ │ └── TopAppBar.kt
│ └── res
│ │ ├── drawable
│ │ ├── about_icon.xml
│ │ ├── all.png
│ │ ├── btn_google_icon.xml
│ │ ├── droidcon_event_banner.png
│ │ ├── droidcon_icon.png
│ │ ├── droidcon_logo.xml
│ │ ├── feed_icon.xml
│ │ ├── home_icon.xml
│ │ ├── ic_back_arrow.xml
│ │ ├── ic_baseline_close_24.xml
│ │ ├── ic_droidcon_logo.xml
│ │ ├── ic_facebook.xml
│ │ ├── ic_feedback_emoji.xml
│ │ ├── ic_filter.xml
│ │ ├── ic_google_logo_icon.xml
│ │ ├── ic_green_session_card_spacer.xml
│ │ ├── ic_home_speakers_card_drawable.xml
│ │ ├── ic_home_speakers_card_play.xml
│ │ ├── ic_listalt.xml
│ │ ├── ic_orange_session_card_spacer.xml
│ │ ├── ic_send_icon.xml
│ │ ├── ic_share.xml
│ │ ├── ic_telegram.xml
│ │ ├── ic_topbar_bg_login.xml
│ │ ├── ic_topbar_bg_login_dark.xml
│ │ ├── ic_twitter.xml
│ │ ├── ic_twitter_logo.xml
│ │ ├── ic_view_agenda.xml
│ │ ├── ic_whatsapp.xml
│ │ ├── session_transforming_lives.png
│ │ ├── sessions_icon.xml
│ │ ├── smile.xml
│ │ ├── smiling.png
│ │ ├── team.png
│ │ ├── toolbar_bg_sign_up_dark.xml
│ │ ├── topbar_bg_sign_up.xml
│ │ ├── topbar_speaker_bg.xml
│ │ └── whilte_padlock.xml
│ │ ├── font
│ │ ├── montserrat_black.ttf
│ │ ├── montserrat_black_italic.ttf
│ │ ├── montserrat_bold.ttf
│ │ ├── montserrat_bold_italic.ttf
│ │ ├── montserrat_extra_bold.ttf
│ │ ├── montserrat_extra_bold_italic.ttf
│ │ ├── montserrat_extra_light.ttf
│ │ ├── montserrat_extra_light_italic.ttf
│ │ ├── montserrat_italic.ttf
│ │ ├── montserrat_light.ttf
│ │ ├── montserrat_light_italic.ttf
│ │ ├── montserrat_medium.ttf
│ │ ├── montserrat_medium_italic.ttf
│ │ ├── montserrat_regular.ttf
│ │ ├── montserrat_semi_bold.ttf
│ │ ├── montserrat_semi_bold_italic.ttf
│ │ ├── montserrat_thin.ttf
│ │ └── montserrat_thin_italic.ttf
│ │ ├── raw
│ │ └── loading.json
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ └── test
│ └── java
│ └── com
│ └── android254
│ └── presentation
│ ├── about
│ └── view
│ │ └── AboutScreenTest.kt
│ ├── auth
│ └── view
│ │ └── AuthDialogTest.kt
│ ├── feed
│ └── view
│ │ └── FeedScreenTest.kt
│ ├── feedback
│ └── view
│ │ └── FeedBackScreenTest.kt
│ ├── home
│ ├── components
│ │ └── HomeBannerSectionTest.kt
│ └── screen
│ │ └── HomeScreenTest.kt
│ ├── sessionDetails
│ └── view
│ │ └── SessionDetailsScreenTest.kt
│ ├── sessions
│ └── view
│ │ └── SessionScreenTest.kt
│ └── speakers
│ └── view
│ ├── SpeakerDetailsScreenTest.kt
│ └── SpeakersScreenTest.kt
├── settings.gradle.kts
├── spotless
└── copyright.kt
└── whatsnew
└── whatsnew-en-US
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.{kt,kts}]
2 | insert_final_newline=false
3 | max_line_length=off
4 | disabled_rules=no-wildcard-imports,import-ordering
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | @chepsi @wangerekaharun @michaelbukachi @jumaallan @kibettheophilus @misshannah
2 |
3 | ## code changes will send PR to following users
4 | * @chepsi @wangerekaharun @michaelbukachi @jumaallan @kibettheophilus @misshannah
5 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: "[Bug Report] Short Form Subject (50 Chars or less)"
5 | labels: bug report
6 | assignees: 'chepsi, wangerekaharun, michaelbukachi, jumaallan, kibettheophilus, misshannah'
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem please ensure that your screenshots are SFW or at least appropriately censored.
25 |
26 | **Recoin Version: (from Settings -> About):**
27 |
28 | **Desktop (please complete the following information):**
29 | - OS: [e.g. iOS]
30 | - Browser [e.g. chrome, safari]
31 | - Version [e.g. 22]
32 |
33 | **Smartphone (please complete the following information):**
34 | - Device: [e.g. iPhone6]
35 | - OS: [e.g. iOS8.1]
36 | - Browser [e.g. stock browser, safari]
37 | - Version [e.g. 22]
38 |
39 | **Additional context**
40 | Add any other context about the problem here.
41 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: "[Feature] Short Form Title (50 chars or less.)"
5 | labels: feature request
6 | assignees: 'chepsi, wangerekaharun, michaelbukachi, jumaallan, kibettheophilus, misshannah'
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | # Scope
2 |
3 | _Please make sure to read https://github.com/droidconKE/droidconKE2022Android/docs/CONTRIBUTING.md
4 | and check that you understand and have followed it as best as possible Explain what your feature
5 | does in a short paragraph._ please check the below boxes
6 | - [ ] I have followed the coding conventions
7 | - [ ] I have added/updated necessary tests
8 | - [ ] I have tested the changes added on a physical device
9 | - [ ] I have run `./codeAnalysis.sh` to make sure all lint/formatting checks have been done.
10 |
11 | ## Closes/Fixes Issues
12 | _Declare any issues by typing `fixes #1` or `closes #1` for example so that the automation can kick
13 | in when this is merged_
14 |
15 | ## Other testing QA Notes
16 | _What have you tested specifically and what possible impacts/areas there are that may need retesting
17 | by others._
18 |
19 | Please add a screenshot (if necessary)
20 |
--------------------------------------------------------------------------------
/.github/workflows/contributors.yml:
--------------------------------------------------------------------------------
1 | on:
2 | push:
3 | branches: [main]
4 |
5 | jobs:
6 | contrib-readme-job:
7 | runs-on: ubuntu-latest
8 | name: A job to automate contrib in readme
9 | steps:
10 | - name: Contribute List
11 | uses: akhilmhdh/contributors-readme-action@v2.3.5
12 | env:
13 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 |
--------------------------------------------------------------------------------
/.github/workflows/deploy-to-playstore.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to Playstore
2 |
3 | on:
4 | push:
5 | branches: [ 'releases/**' ]
6 |
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 |
11 | steps:
12 | - uses: actions/checkout@v2
13 | - name: set up JDK 11
14 | uses: actions/setup-java@v1
15 | with:
16 | distribution: 'adopt'
17 | java-version: '11'
18 |
19 | - name: Assemble Release Bundle
20 | run: ./gradlew bundleRelease
21 |
22 | - name: Bump version
23 | uses: chkfung/android-version-actions@v1.1
24 | with:
25 | gradlePath: app/build.gradle.kts
26 | versionCode: ${{github.run_number}}
27 | versionName: 1.0.0
28 |
29 | - name: Sign Release
30 | uses: r0adkll/sign-android-release@v1
31 | with:
32 | releaseDirectory: app/build/outputs/bundle/release
33 | signingKeyBase64: ${{ secrets.PLAYSTORE_SIGNING_KEY }}
34 | alias: ${{ secrets.KEY_ALIAS }}
35 | keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
36 | keyPassword: ${{ secrets.KEY_PASSWORD }}
37 |
38 | - name: Deploy to Production
39 | uses: r0adkll/upload-google-play@v1
40 | with:
41 | serviceAccountJsonPlainText: ${{ secrets.GOOGLE_SERVICES_JSON }}
42 | packageName: com.android254.droidconKE2022
43 | releaseFiles: app/build/outputs/bundle/release/app-release.aab
44 | track: production
45 | whatsNewDirectory: whatsnew/
46 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: develop
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 |
7 | env:
8 | APP_SIGN_KEYSTORE_PATH: /tmp/keystore
9 | CACHE_BUNDLER: ~/.bundler
10 |
11 | jobs:
12 | build:
13 | runs-on: ubuntu-latest
14 | steps:
15 | - name: Write key file
16 | env:
17 | AUTH: ${{ secrets.KEYSTORE }}
18 | run: echo $AUTH | base64 --decode > /tmp/keystore
19 |
20 | - name: Checkout the Repository
21 | uses: actions/checkout@v2
22 |
23 | - name: Set up JDK 11
24 | uses: actions/setup-java@v1
25 | with:
26 | java-version: '11'
27 |
28 | - name: Cache gradle
29 | uses: actions/cache@v1
30 | with:
31 | path: ~/.gradle/caches
32 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
33 | restore-keys: |
34 | ${{ runner.os }}-gradle-
35 | - name: Bundler cache
36 | uses: actions/cache@v1
37 | with:
38 | path: $CACHE_BUNDLER
39 | key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
40 | restore-keys: |
41 | ${{ runner.os }}-gems-
42 | - name: Setup Ruby
43 | uses: ruby/setup-ruby@v1
44 | with:
45 | ruby-version: '2.6'
46 |
47 | - name: Install Dependencies
48 | run: gem install bundler && bundle install
49 |
50 | - name: Run Release Build
51 | uses: maierj/fastlane-action@v1.4.0
52 | with:
53 | lane: main
54 | options: '{ "conf": "release" }'
55 | skip-tracking: false
56 | subdirectory: fastlane
57 | bundle-install-path: CACHE_BUNDLER
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /buildSrc/build
13 | /captures
14 | .externalNativeBuild
15 | .cxx
16 | /.idea/
17 | .idea/sonarlint/
18 | app/libs/
19 | buildSrc/build
20 | /keystore.properties
21 |
22 | /fastlane/report.xml
23 | /api_key.txt
24 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem "fastlane"
4 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.kts.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/java/com/android254/droidconKE2022/DroidconKE2022.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.droidconKE2022
17 |
18 | import android.app.Application
19 | import com.android254.droidconKE2022.crashlytics.CrashlyticsTree
20 | import dagger.hilt.android.HiltAndroidApp
21 | import org.jetbrains.annotations.NotNull
22 | import timber.log.Timber
23 |
24 | @HiltAndroidApp
25 | class DroidconKE2022 : Application() {
26 |
27 | override fun onCreate() {
28 | super.onCreate()
29 |
30 | initTimber()
31 | }
32 |
33 | private fun initTimber() = when {
34 | BuildConfig.DEBUG -> {
35 | Timber.plant(object : Timber.DebugTree() {
36 | override fun createStackElementTag(@NotNull element: StackTraceElement): String {
37 | return super.createStackElementTag(element) + ":" + element.lineNumber
38 | }
39 | })
40 | }
41 | else -> {
42 | Timber.plant(CrashlyticsTree())
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/android254/droidconKE2022/crashlytics/CrashlyticsTree.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.droidconKE2022.crashlytics
17 |
18 | import android.util.Log
19 | import com.android254.droidconKE2022.BuildConfig
20 | import com.google.firebase.crashlytics.FirebaseCrashlytics
21 | import timber.log.Timber
22 |
23 | class CrashlyticsTree : Timber.Tree() {
24 | private val crashlytics = FirebaseCrashlytics.getInstance()
25 | override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
26 | if (priority == Log.VERBOSE || priority == Log.DEBUG || priority == Log.INFO) {
27 | return
28 | }
29 |
30 | if (BuildConfig.DEBUG) {
31 | crashlytics.setCrashlyticsCollectionEnabled(false)
32 | return
33 | }
34 |
35 | crashlytics.setCustomKey(CRASHLYTICS_KEY_PRIORITY, priority)
36 | if (tag != null) {
37 | crashlytics.setCustomKey(CRASHLYTICS_KEY_TAG, tag)
38 | }
39 | crashlytics.setCustomKey(CRASHLYTICS_KEY_MESSAGE, message)
40 |
41 | if (t == null) {
42 | crashlytics.recordException(Exception(message))
43 | } else {
44 | crashlytics.recordException(t)
45 | }
46 | }
47 |
48 | companion object {
49 | private const val CRASHLYTICS_KEY_PRIORITY = "priority"
50 | private const val CRASHLYTICS_KEY_TAG = "tag"
51 | private const val CRASHLYTICS_KEY_MESSAGE = "message"
52 | }
53 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_droidcon_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-hdpi/ic_droidcon_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_droidcon_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-mdpi/ic_droidcon_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_droidcon_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-xhdpi/ic_droidcon_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_droidcon_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-xxhdpi/ic_droidcon_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_droidcon_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-xxxhdpi/ic_droidcon_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_droidcon_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FDFDFD
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | DroidconKE2022
3 | DEFAULT_NOTIFICATION_CHANNEL_ID
4 | DEFAULT_NOTIFICATION_CHANNEL_DESCRIPTION
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
20 |
--------------------------------------------------------------------------------
/build.gradle.kts:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | plugins {
3 | id("com.android.application") version "7.3.1" apply false
4 | id("com.android.library") version "7.3.1" apply false
5 | id("org.jetbrains.kotlin.android") version "1.7.10" apply false
6 | id("com.google.devtools.ksp") version "1.7.0-1.0.6" apply true
7 | id("org.jlleitschuh.gradle.ktlint") version "10.2.0"
8 | id("io.gitlab.arturbosch.detekt") version "1.18.0-RC2"
9 | id("com.diffplug.spotless") version "6.0.0"
10 | id("org.jetbrains.dokka") version "1.7.10"
11 | kotlin("plugin.serialization") version "1.6.21"
12 | }
13 |
14 | buildscript {
15 | dependencies {
16 | classpath("com.google.dagger:hilt-android-gradle-plugin:2.42")
17 | classpath("com.google.gms:google-services:4.3.14")
18 | classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.2")
19 | classpath("com.google.firebase:perf-plugin:1.4.2")
20 | }
21 | }
22 |
23 | allprojects {
24 | apply(plugin = "org.jetbrains.dokka")
25 | apply(plugin = "org.jlleitschuh.gradle.ktlint")
26 | ktlint {
27 | android.set(true)
28 | verbose.set(true)
29 | filter {
30 | exclude { element -> element.file.path.contains("generated/") }
31 | }
32 | }
33 | }
34 |
35 | subprojects {
36 | apply(plugin = "io.gitlab.arturbosch.detekt")
37 | detekt {
38 | config = files("${project.rootDir}/detekt.yml")
39 | parallel = true
40 | buildUponDefaultConfig = true
41 | }
42 |
43 | apply(plugin = "com.diffplug.spotless")
44 | spotless {
45 | kotlin {
46 | target("**/*.kt")
47 | licenseHeaderFile(
48 | rootProject.file("${project.rootDir}/spotless/copyright.kt"),
49 | "^(package|object|import|interface)"
50 | )
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/chai/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/chai/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ## Chai Design System
7 |
8 | ---
9 |
10 | ### [WIP 🚧 documentation]
11 |
12 | ---
13 |
14 | What is a design system:
15 |
16 | To learn more about this look at this article by Brad Frost on [Atomic design](https://bradfrost.com/blog/post/atomic-web-design/)
17 |
18 | ## About Chai
19 |
20 | Chai is swahili word for tea.
21 | This is the droidconKE design system.
22 |
23 | Link to design doc: [design ](https://xd.adobe.com/view/eb1ed4ed-fd4d-4ba2-b2f7-a91c7379a022-be4d/screen/cfea72b5-9007-4335-ae86-9162594c094f/)
24 |
25 |
26 | There is a separate stand alone [Chai Design System project here](https://github.com/tamzi/ChaiDesignSystem)
27 |
28 | This shows how you can use this design system in an app in production.
29 |
30 | ### Structure Of Chai's Design System,
31 |
32 | The Design System Architecture is as follows;
33 |
34 | ### Atoms
35 |
36 | This package includes;
37 |
38 | 1. Color
39 | 2. CFonts -
40 |
41 | ### Components
42 |
43 | This package contains;
44 |
45 | 1. CButtons
46 | 2. CCards
47 | 3. CInputFields
48 | 4. CTabs
49 | 5. Ctypography
50 |
51 | ### Icons
52 |
53 | - Icons
54 |
55 | ## Images
56 |
57 | App will have the following features:
58 |
59 | - Images
60 |
61 | ## Utils
62 |
63 | Utils will have the following features:
64 |
65 | 1. Shape
66 | 2. Spacing
67 |
68 | ## Theme
69 |
70 | - Theme constructs the entire design system by combining the above elements
71 |
72 | ## Implementing Chai
73 |
74 | To Implement chai,
75 |
76 | See the example implementation that exists by running chaidemo that contains the various implementations of the elements of the design system.
77 |
--------------------------------------------------------------------------------
/chai/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chai/consumer-rules.pro
--------------------------------------------------------------------------------
/chai/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/chai/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/chai/src/main/java/com/droidconke/chai/atoms/CFonts.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chai.atoms.type
17 |
18 | import androidx.compose.ui.text.font.Font
19 | import androidx.compose.ui.text.font.FontFamily
20 | import com.droidconke.chai.R
21 |
22 | /**
23 | * Chai typography:
24 | * Consists of 2 files that work together:
25 | * - CTypography(located ion the components package) and
26 | * - CFont located in the atoms directory
27 | * Font:
28 | * Defines the font family types only here
29 | * We use val for the purpose of making it available in the entire application
30 | * You first add the fonts to the res folder under fonts
31 | * Then just reference them here.
32 | * Font- List all fonts that will be used in the application
33 | *
34 | */
35 |
36 | val MontserratRegular = FontFamily(Font(R.font.montserrat_regular))
37 | val MontserratBold = FontFamily(Font(R.font.montserrat_bold))
38 | val MontserratSemiBold = FontFamily(Font(R.font.montserrat_semi_bold))
39 | val MontserratLight = FontFamily(Font(R.font.montserrat_light))
40 | val MontserratMedium = FontFamily(Font(R.font.montserrat_medium))
41 |
42 | val MontserratExtraLight = FontFamily(Font(R.font.montserrat_extra_light))
43 |
44 | val MontserratThin = FontFamily(Font(R.font.montserrat_thin))
--------------------------------------------------------------------------------
/chai/src/main/java/com/droidconke/chai/components/CButtons.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chai.components
--------------------------------------------------------------------------------
/chai/src/main/java/com/droidconke/chai/components/CCards.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chai.components
--------------------------------------------------------------------------------
/chai/src/main/java/com/droidconke/chai/components/CInputFiels.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chai.components
--------------------------------------------------------------------------------
/chai/src/main/java/com/droidconke/chai/components/CTabs.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chai.components
--------------------------------------------------------------------------------
/chai/src/main/java/com/droidconke/chai/icons/Icons.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chai.icons
--------------------------------------------------------------------------------
/chai/src/main/java/com/droidconke/chai/images/Images.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chai.images
--------------------------------------------------------------------------------
/chai/src/main/java/com/droidconke/chai/utils/Shape.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chai.utils
17 | import androidx.compose.foundation.shape.RoundedCornerShape
18 | import androidx.compose.material3.Shapes
19 | import androidx.compose.ui.unit.dp
20 |
21 | val Shapes = Shapes(
22 | small = RoundedCornerShape(3.dp),
23 | medium = RoundedCornerShape(7.dp),
24 | large = RoundedCornerShape(9.dp),
25 | )
--------------------------------------------------------------------------------
/chai/src/main/java/com/droidconke/chai/utils/Spacing.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chai.utils
17 |
18 | import androidx.compose.foundation.layout.*
19 | import androidx.compose.runtime.Composable
20 | import androidx.compose.ui.Modifier
21 | import androidx.compose.ui.unit.dp
22 |
23 | @Composable
24 | fun BreathingSpace13() {
25 | Spacer(modifier = Modifier.height(15.dp))
26 | }
27 |
28 | @Composable
29 | fun BreathingSpace26() {
30 | Spacer(modifier = Modifier.height(26.dp))
31 | }
32 | @Composable
33 | fun SeparatorSpace() {
34 | Spacer(modifier = Modifier.height(5.dp))
35 | }
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/about_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/droidcon_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chai/src/main/res/drawable/droidcon_icon.png
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/feed_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/home_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/ic_back_arrow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/ic_google_logo_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/ic_green_session_card_spacer.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/ic_orange_session_card_spacer.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/ic_topbar_bg_login.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/ic_topbar_bg_login_dark.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/sessions_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/toolbar_bg_sign_up_dark.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/chai/src/main/res/drawable/topbar_bg_sign_up.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/chai/src/main/res/font/montserrat_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chai/src/main/res/font/montserrat_bold.ttf
--------------------------------------------------------------------------------
/chai/src/main/res/font/montserrat_extra_light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chai/src/main/res/font/montserrat_extra_light.ttf
--------------------------------------------------------------------------------
/chai/src/main/res/font/montserrat_light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chai/src/main/res/font/montserrat_light.ttf
--------------------------------------------------------------------------------
/chai/src/main/res/font/montserrat_medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chai/src/main/res/font/montserrat_medium.ttf
--------------------------------------------------------------------------------
/chai/src/main/res/font/montserrat_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chai/src/main/res/font/montserrat_regular.ttf
--------------------------------------------------------------------------------
/chai/src/main/res/font/montserrat_semi_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chai/src/main/res/font/montserrat_semi_bold.ttf
--------------------------------------------------------------------------------
/chai/src/main/res/font/montserrat_thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chai/src/main/res/font/montserrat_thin.ttf
--------------------------------------------------------------------------------
/chaidemo/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/chaidemo/README.md:
--------------------------------------------------------------------------------
1 | # Chai Design System Demo
2 | This shows the various a
3 | ## Atoms
4 | These are the very basic of the design system
5 |
6 | ## Components
7 |
8 |
9 | ## Icons and Images
10 |
11 | ## Implementing Chai
12 |
--------------------------------------------------------------------------------
/chaidemo/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/chaidemo/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/chaidemo/src/main/java/com/droidconke/chaidemo/ChaiDemo.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chaidemo
17 |
18 | import androidx.compose.foundation.background
19 | import androidx.compose.foundation.layout.*
20 | import androidx.compose.runtime.Composable
21 | import androidx.compose.ui.Modifier
22 | import androidx.compose.ui.tooling.preview.Preview
23 | import androidx.compose.ui.unit.dp
24 | import com.droidconke.chai.ChaiDCKE22Theme
25 | import com.droidconke.chai.atoms.ChaiWhite
26 | import com.droidconke.chai.components.*
27 | import com.droidconke.chai.utils.BreathingSpace13
28 | import com.droidconke.chai.utils.BreathingSpace26
29 | import com.droidconke.chai.utils.SeparatorSpace
30 |
31 | @Preview(showBackground = true)
32 | @Composable
33 | fun ChaiDemo() {
34 | ChaiDCKE22Theme {
35 | Column(
36 | Modifier
37 | .fillMaxSize()
38 | .background(color = ChaiWhite)
39 | .padding(horizontal = 13.dp, vertical = 5.dp)
40 | ) {
41 | BreathingSpace26()
42 | CPageTitle("Chai Demo")
43 | SeparatorSpace()
44 | CSubtitle("A catalog of the chai design system elements")
45 | SeparatorSpace()
46 | CParagraph("Check the code that is with each view")
47 | BreathingSpace13()
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/chaidemo/src/main/java/com/droidconke/chaidemo/ChaiDemoActivity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.droidconke.chaidemo
17 |
18 | import android.os.Bundle
19 | import androidx.activity.ComponentActivity
20 | import androidx.activity.compose.setContent
21 | import androidx.core.view.WindowCompat
22 |
23 | class ChaiDemoActivity : ComponentActivity() {
24 | override fun onCreate(savedInstanceState: Bundle?) {
25 | super.onCreate(savedInstanceState)
26 |
27 | WindowCompat.setDecorFitsSystemWindows(window, false)
28 |
29 | setContent { ChaiDemo() }
30 | }
31 | }
--------------------------------------------------------------------------------
/chaidemo/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chaidemo/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chaidemo/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chaidemo/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chaidemo/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chaidemo/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chaidemo/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chaidemo/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chaidemo/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chaidemo/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/chaidemo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/chaidemo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/chaidemo/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/chaidemo/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | chaidemo
3 |
--------------------------------------------------------------------------------
/chaidemo/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/codeAnalysis.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ./gradlew ktlintFormat && ./gradlew ktlintCheck && ./gradlew detekt && ./gradlew spotlessApply
4 |
5 | # Before use it, in the first time, you must guarantee some running permissions:
6 | # chmod +x codeAnalysis.sh
7 | #
8 | # After that, you just need to run:
9 | # ./codeAnalysis.sh
10 |
--------------------------------------------------------------------------------
/data/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /schemas
--------------------------------------------------------------------------------
/data/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/dao/BaseDao.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.dao
17 |
18 | import androidx.room.Delete
19 | import androidx.room.Insert
20 | import androidx.room.OnConflictStrategy.REPLACE
21 | import androidx.room.Update
22 |
23 | /**
24 | * BaseDao
25 | *
26 | * This dao interface makes it easy to abstract commonly used room operations
27 | *
28 | * @param T takes in the data class
29 | */
30 | interface BaseDao {
31 |
32 | @Insert(onConflict = REPLACE)
33 | suspend fun insert(item: T): Long
34 |
35 | @Insert(onConflict = REPLACE)
36 | suspend fun insert(vararg items: T)
37 |
38 | @Insert(onConflict = REPLACE)
39 | suspend fun insert(items: List)
40 |
41 | @Update(onConflict = REPLACE)
42 | suspend fun update(item: T): Int
43 |
44 | @Update(onConflict = REPLACE)
45 | suspend fun update(items: List): Int
46 |
47 | @Delete
48 | suspend fun delete(item: T)
49 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/dao/BookmarkDao.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.dao
17 |
18 | import androidx.room.Dao
19 | import androidx.room.Query
20 | import com.android254.data.db.model.BookmarkEntity
21 |
22 | @Dao
23 | interface BookmarkDao : BaseDao {
24 | @Query("SELECT * FROM bookmarks")
25 | fun getBookmarkIds(): List
26 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/dao/OrganizersDao.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.dao
17 |
18 | import androidx.room.Dao
19 | import androidx.room.Query
20 | import com.android254.data.db.model.OrganizerEntity
21 |
22 | @Dao
23 | interface OrganizersDao : BaseDao {
24 |
25 | @Query("SELECT * FROM ORGANIZERS")
26 | fun fetchOrganizers(): List
27 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/dao/SessionDao.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.dao
17 |
18 | import androidx.room.Dao
19 | import androidx.room.Query
20 | import androidx.room.RawQuery
21 | import androidx.sqlite.db.SupportSQLiteQuery
22 | import com.android254.data.db.model.SessionEntity
23 |
24 | @Dao
25 | interface SessionDao : BaseDao {
26 | @Query("SELECT * FROM sessions ORDER BY startTimestamp ASC")
27 | fun fetchSessions(): List
28 |
29 | @Query("DELETE FROM sessions")
30 | fun clearSessions()
31 |
32 | @Query("SELECT * FROM sessions WHERE id = :id")
33 | fun getSessionById(id: String): SessionEntity?
34 |
35 | @RawQuery
36 | fun fetchSessionsWithFilters(query: SupportSQLiteQuery): List
37 |
38 | @Query("UPDATE sessions SET isBookmarked = :isBookmarked WHERE remote_id = :id")
39 | fun updateBookmarkedStatus(id: String, isBookmarked: Boolean)
40 |
41 | @Query("SELECT isBookmarked FROM sessions WHERE remote_id = :id")
42 | fun getBookmarkStatus(id: String): Boolean
43 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/dao/SpeakerDao.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.dao
17 |
18 | import androidx.room.Dao
19 | import androidx.room.Query
20 | import com.android254.data.db.model.SpeakerEntity
21 |
22 | @Dao
23 | interface SpeakerDao : BaseDao {
24 | @Query("SELECT * FROM speakers")
25 | suspend fun fetchSpeakers(): List
26 |
27 | @Query("SELECT COUNT(*) FROM speakers")
28 | suspend fun fetchSpeakerCount(): Int
29 |
30 | @Query("SELECT * FROM speakers WHERE id = :id")
31 | suspend fun getSpeakerById(id: Int): SpeakerEntity
32 |
33 | @Query("DELETE FROM speakers")
34 | suspend fun deleteAll()
35 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/db/Database.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.db
17 |
18 | import androidx.room.AutoMigration
19 | import androidx.room.Database
20 | import androidx.room.RoomDatabase
21 | import androidx.room.TypeConverters
22 | import com.android254.data.dao.BookmarkDao
23 | import com.android254.data.dao.OrganizersDao
24 | import com.android254.data.dao.SessionDao
25 | import com.android254.data.dao.SpeakerDao
26 | import com.android254.data.db.model.BookmarkEntity
27 | import com.android254.data.db.model.OrganizerEntity
28 | import com.android254.data.db.model.SessionEntity
29 | import com.android254.data.db.model.SpeakerEntity
30 | import com.android254.data.db.util.InstantConverter
31 |
32 | @Database(
33 | entities = [
34 | SessionEntity::class,
35 | SpeakerEntity::class,
36 | BookmarkEntity::class,
37 | OrganizerEntity::class
38 | ],
39 | version = 2,
40 | exportSchema = true,
41 | autoMigrations = [AutoMigration(from = 1, to = 2)]
42 | )
43 | @TypeConverters(
44 | InstantConverter::class
45 | )
46 | abstract class Database : RoomDatabase() {
47 | abstract fun sessionDao(): SessionDao
48 |
49 | abstract fun speakerDao(): SpeakerDao
50 |
51 | abstract fun bookmarkDao(): BookmarkDao
52 |
53 | abstract fun organizersDao(): OrganizersDao
54 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/db/model/BookmarkEntity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.db.model
17 |
18 | import androidx.room.Entity
19 | import androidx.room.PrimaryKey
20 |
21 | @Entity(tableName = "bookmarks")
22 | class BookmarkEntity(
23 | @PrimaryKey(autoGenerate = false)
24 | var sessionId: String
25 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/db/model/OrganizerEntity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.db.model
17 |
18 | import androidx.room.Entity
19 | import androidx.room.PrimaryKey
20 | import kotlinx.serialization.SerialName
21 |
22 | @Entity(tableName = "organizers")
23 | class OrganizerEntity(
24 | @PrimaryKey(autoGenerate = true)
25 | var id: Int,
26 | val name: String,
27 | val tagline: String,
28 | val link: String,
29 | val type: String,
30 | val photo: String,
31 | val bio: String,
32 | val twitterHandle: String,
33 | val designation: String,
34 | @SerialName("created_at") val createdAt: String
35 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/db/model/SessionEntity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.db.model
17 |
18 | import androidx.room.Entity
19 | import androidx.room.PrimaryKey
20 |
21 | @Entity(tableName = "sessions")
22 | data class SessionEntity(
23 | @PrimaryKey(autoGenerate = true) val id: Int,
24 | val remote_id: String,
25 | val description: String,
26 | val sessionFormat: String,
27 | val sessionLevel: String,
28 | val slug: String,
29 | val title: String,
30 | val endDateTime: String,
31 | val endTime: String,
32 | val isBookmarked: Boolean,
33 | val isKeynote: Boolean,
34 | val isServiceSession: Boolean,
35 | val sessionImage: String?,
36 | val startDateTime: String,
37 | val startTime: String,
38 | val rooms: String,
39 | val speakers: String,
40 | val startTimestamp: Long,
41 | val sessionImageUrl: String
42 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/db/model/SpeakerEntity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.db.model
17 |
18 | import androidx.room.Entity
19 | import androidx.room.Index
20 | import androidx.room.PrimaryKey
21 |
22 | @Entity(tableName = "speakers", indices = [Index(value = ["twitter"], unique = true)])
23 | data class SpeakerEntity(
24 | @PrimaryKey(autoGenerate = true) val id: Int,
25 | val name: String,
26 | val tagline: String,
27 | val bio: String,
28 | val avatar: String,
29 | val twitter: String
30 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/db/util/DateStringConverter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.db.util
17 |
18 | import android.os.Build
19 | import androidx.annotation.RequiresApi
20 | import androidx.room.TypeConverter
21 | import java.time.Instant
22 | import java.time.LocalDateTime
23 | import java.time.ZoneId
24 | import java.time.ZoneOffset
25 | import java.time.format.DateTimeFormatter
26 | import java.util.*
27 |
28 | class DateStringConverter {
29 | @RequiresApi(Build.VERSION_CODES.O)
30 | @TypeConverter
31 | fun fromLong(timestamp: Long): String {
32 | val pattern = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
33 | .withZone(ZoneId.systemDefault())
34 | return pattern.format(Instant.ofEpochMilli(timestamp))
35 | }
36 |
37 | @RequiresApi(Build.VERSION_CODES.O)
38 | @TypeConverter
39 | fun fromString(offsetDateTime: String): Long {
40 | val pattern = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
41 | return LocalDateTime.parse(offsetDateTime, pattern).toInstant(ZoneOffset.ofHours(3))
42 | .toEpochMilli()
43 | }
44 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/db/util/InstantConverter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.db.util
17 |
18 | import androidx.room.TypeConverter
19 | import kotlinx.datetime.Instant
20 |
21 | class InstantConverter {
22 |
23 | @TypeConverter
24 | fun longToInstant(value: Long?): Instant? =
25 | value?.let(Instant::fromEpochMilliseconds)
26 |
27 | @TypeConverter
28 | fun instantToLong(instant: Instant?): Long? =
29 | instant?.toEpochMilliseconds()
30 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/di/DaoModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.di
17 |
18 | import com.android254.data.dao.BookmarkDao
19 | import com.android254.data.dao.OrganizersDao
20 | import com.android254.data.db.Database
21 | import com.android254.data.dao.SessionDao
22 | import dagger.Module
23 | import dagger.Provides
24 | import dagger.hilt.InstallIn
25 | import dagger.hilt.components.SingletonComponent
26 |
27 | @Module
28 | @InstallIn(SingletonComponent::class)
29 | object DaoModule {
30 |
31 | @Provides
32 | fun providesAuthorDao(
33 | database: Database
34 | ): SessionDao = database.sessionDao()
35 |
36 | @Provides
37 | fun providesBookmarkDao(
38 | database: Database
39 | ): BookmarkDao = database.bookmarkDao()
40 |
41 | @Provides
42 | fun providesOrganizersDao(
43 | database: Database
44 | ): OrganizersDao = database.organizersDao()
45 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/di/DatabaseModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.di
17 |
18 | import android.content.Context
19 | import androidx.room.Room
20 | import com.android254.data.db.Database
21 | import dagger.Module
22 | import dagger.Provides
23 | import dagger.hilt.InstallIn
24 | import dagger.hilt.android.qualifiers.ApplicationContext
25 | import dagger.hilt.components.SingletonComponent
26 | import javax.inject.Singleton
27 |
28 | @Module
29 | @InstallIn(SingletonComponent::class)
30 | object DatabaseModule {
31 |
32 | @Provides
33 | @Singleton
34 | fun providesDatabase(
35 | @ApplicationContext context: Context
36 | ): Database = Room.databaseBuilder(
37 | context,
38 | Database::class.java,
39 | "dcke22-database"
40 | )
41 | .build()
42 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/di/RepoModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.di
17 |
18 | import com.android254.data.repos.AuthManager
19 | import com.android254.data.repos.HomeRepoImpl
20 | import com.android254.data.repos.OrganizersSource
21 | import com.android254.data.repos.SessionsManager
22 | import com.android254.data.repos.SpeakersManager
23 | import com.android254.domain.repos.AuthRepo
24 | import com.android254.domain.repos.HomeRepo
25 | import com.android254.domain.repos.OrganizersRepository
26 | import com.android254.domain.repos.SessionsRepo
27 | import com.android254.domain.repos.SpeakersRepo
28 | import dagger.Binds
29 | import dagger.Module
30 | import dagger.hilt.InstallIn
31 | import dagger.hilt.components.SingletonComponent
32 | import javax.inject.Singleton
33 |
34 | @Module
35 | @InstallIn(SingletonComponent::class)
36 | abstract class RepoModule {
37 |
38 | @Binds
39 | @Singleton
40 | abstract fun provideAuthRepo(repo: AuthManager): AuthRepo
41 |
42 | @Binds
43 | @Singleton
44 | abstract fun provideSessionsRepo(repo: SessionsManager): SessionsRepo
45 |
46 | @Binds
47 | @Singleton
48 | abstract fun providesHomeRepo(homeRepoImpl: HomeRepoImpl): HomeRepo
49 |
50 | @Binds
51 | @Singleton
52 | abstract fun provideSpeakersRepo(manager: SpeakersManager): SpeakersRepo
53 |
54 | @Binds
55 | @Singleton
56 | abstract fun provideOrganizersRepo(source: OrganizersSource): OrganizersRepository
57 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/Constants.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network
17 |
18 | object Constants {
19 | const val BASE_URL = "https://droidcon-erp.herokuapp.com/api/v1"
20 | const val LIVE_BASE_URL = "https://api.droidcon.co.ke/v1"
21 | const val EVENT_SLUG = "droidconke-2022-281"
22 | const val ORG_SLUG = "droidcon-ke-645"
23 | const val EVENT_BASE_URL = "$LIVE_BASE_URL/events/$EVENT_SLUG"
24 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/apis/AuthApi.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.apis
17 |
18 | import com.android254.data.network.Constants
19 | import com.android254.data.network.models.payloads.GoogleToken
20 | import com.android254.data.network.models.responses.AccessTokenDTO
21 | import com.android254.data.network.models.responses.StatusDTO
22 | import com.android254.data.network.util.safeApiCall
23 | import io.ktor.client.*
24 | import io.ktor.client.call.*
25 | import io.ktor.client.request.*
26 | import javax.inject.Inject
27 |
28 | class AuthApi @Inject constructor(
29 | private val client: HttpClient
30 | ) {
31 | suspend fun googleLogin(token: GoogleToken): AccessTokenDTO = safeApiCall {
32 | return@safeApiCall client.post("${Constants.BASE_URL}/social_login/google") {
33 | setBody(token)
34 | }.body()
35 | }
36 |
37 | suspend fun logout(): StatusDTO = safeApiCall {
38 | val url = "${Constants.BASE_URL}/logout"
39 | return@safeApiCall client.post(url).body()
40 | }
41 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/apis/FeedApi.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.apis
17 |
18 | import com.android254.data.network.Constants
19 | import com.android254.data.network.models.responses.Feed
20 | import com.android254.data.network.models.responses.PaginatedResponse
21 | import com.android254.data.network.util.dataResultSafeApiCall
22 | import io.ktor.client.*
23 | import io.ktor.client.call.*
24 | import io.ktor.client.request.*
25 | import javax.inject.Inject
26 |
27 | class FeedApi @Inject constructor(private val client: HttpClient) {
28 |
29 | suspend fun fetchFeed(page: Int = 1, size: Int = 100) = dataResultSafeApiCall {
30 | val response: PaginatedResponse> =
31 | client.get("${Constants.EVENT_BASE_URL}/feeds") {
32 | url {
33 | parameters.append("page", page.toString())
34 | parameters.append("per_page", size.toString())
35 | }
36 | }.body()
37 |
38 | return@dataResultSafeApiCall response.data
39 | }
40 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/apis/FeedbackApi.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.apis
17 |
18 | import com.android254.data.network.Constants
19 | import com.android254.data.network.models.payloads.Feedback
20 | import com.android254.data.network.util.dataResultSafeApiCall
21 |
22 | import io.ktor.client.*
23 | import io.ktor.client.request.*
24 |
25 | import javax.inject.Inject
26 |
27 | class FeedbackApi @Inject constructor(
28 | private val client: HttpClient
29 | ) {
30 | suspend fun postFeedback(feedback: Feedback, sessionId: String) = dataResultSafeApiCall {
31 | client.post("${Constants.EVENT_BASE_URL}/feedback/sessions/$sessionId") {
32 | setBody(feedback)
33 | }
34 | return@dataResultSafeApiCall
35 | }
36 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/apis/OrganizersApi.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.apis
17 |
18 | import com.android254.data.network.Constants
19 | import com.android254.data.network.models.responses.OrganizersPagedResponse
20 | import com.android254.data.network.util.dataResultSafeApiCall
21 | import com.android254.domain.models.DataResult
22 | import io.ktor.client.*
23 | import io.ktor.client.call.*
24 | import io.ktor.client.request.*
25 | import javax.inject.Inject
26 |
27 | class OrganizersApi @Inject constructor(
28 | private val client: HttpClient
29 | ) {
30 |
31 | private val organizersUrl = "${Constants.LIVE_BASE_URL}/organizers/${Constants.ORG_SLUG}/team?"
32 |
33 | suspend fun fetchOrganizers(type: String): DataResult = dataResultSafeApiCall {
34 | client.get("${organizersUrl}type=$type&per_page=100&page").body()
35 | }
36 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/apis/SessionsApi.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.apis
17 |
18 | import com.android254.data.network.Constants
19 | import com.android254.data.network.models.responses.EventScheduleGroupedResponse
20 | import com.android254.data.network.util.safeApiCall
21 | import io.ktor.client.*
22 | import io.ktor.client.call.*
23 | import io.ktor.client.request.*
24 | import javax.inject.Inject
25 |
26 | class SessionsApi @Inject constructor(
27 | private val client: HttpClient
28 | ) {
29 | suspend fun fetchSessions(): EventScheduleGroupedResponse = safeApiCall {
30 | return@safeApiCall client.get("${Constants.EVENT_BASE_URL}/schedule") {
31 | url {
32 | parameters.append("grouped", "true")
33 | }
34 | }.body()
35 | }
36 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/apis/SpeakersApi.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.apis
17 |
18 | import com.android254.data.network.Constants
19 | import com.android254.data.network.models.responses.SpeakersPagedResponse
20 | import com.android254.data.network.util.dataResultSafeApiCall
21 | import com.android254.domain.models.DataResult
22 | import io.ktor.client.*
23 | import io.ktor.client.call.*
24 | import io.ktor.client.request.*
25 | import javax.inject.Inject
26 |
27 | class SpeakersApi @Inject constructor(
28 | private val client: HttpClient
29 | ) {
30 | suspend fun fetchSpeakers(): DataResult = dataResultSafeApiCall {
31 | return@dataResultSafeApiCall client.get(
32 | "${Constants.EVENT_BASE_URL}/speakers?per_page=100"
33 | ) {
34 | }.body()
35 | }
36 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/apis/SponsorsApi.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.apis
17 |
18 | import com.android254.data.network.Constants
19 | import com.android254.data.network.models.responses.SponsorsPagedResponse
20 | import com.android254.data.network.util.dataResultSafeApiCall
21 | import com.android254.domain.models.DataResult
22 | import io.ktor.client.HttpClient
23 | import io.ktor.client.call.body
24 | import io.ktor.client.request.*
25 | import javax.inject.Inject
26 |
27 | class SponsorsApi @Inject constructor(
28 | private val client: HttpClient
29 | ) {
30 |
31 | suspend fun fetchSponsors(): DataResult =
32 | dataResultSafeApiCall {
33 | client.get("${Constants.EVENT_BASE_URL}/sponsors?per_page=10") {
34 | }.body()
35 | }
36 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/payloads/GoogleToken.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.payloads
17 |
18 | import kotlinx.serialization.SerialName
19 | import kotlinx.serialization.Serializable
20 |
21 | @Serializable
22 | data class GoogleToken(@SerialName("access_token") val token: String)
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/AccessTokenDTO.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.SerialName
19 | import kotlinx.serialization.Serializable
20 |
21 | @Serializable
22 | data class AccessTokenDTO(
23 | @SerialName("token") val token: String,
24 | @SerialName("user") val user: UserDetailsDTO
25 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/BookmarkDTO.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.Serializable
19 |
20 | @Serializable
21 | data class BookmarkDTO(
22 | val message: String
23 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/OrganizerDTO.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.SerialName
19 | import kotlinx.serialization.Serializable
20 |
21 | @Serializable
22 | data class OrganizersPagedResponse(
23 | val data: List
24 | )
25 |
26 | @Serializable
27 | data class OrganizerDTO(
28 | @SerialName("bio")
29 | val bio: String? = "",
30 | @SerialName("created_at")
31 | val createdAt: String? = "",
32 | @SerialName("designation")
33 | val designation: String? = "",
34 | @SerialName("link")
35 | val link: String? = "",
36 | @SerialName("name")
37 | val name: String? = "",
38 | @SerialName("photo")
39 | val photo: String? = "",
40 | @SerialName("tagline")
41 | val tagline: String? = "",
42 | @SerialName("twitter_handle")
43 | val twitterHandle: String? = "",
44 | @SerialName("type")
45 | val type: String? = ""
46 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/PaginatedResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.Serializable
19 |
20 | @Serializable
21 | data class PaginatedResponse(
22 | val data: ResponseData,
23 | val meta: ResponseMetaData
24 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/PaginationMetaData.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.SerialName
19 | import kotlinx.serialization.Serializable
20 |
21 | @Serializable
22 | data class PaginationMetaData(
23 | val count: Int,
24 | @SerialName("current_page") val currentPage: Int,
25 | @SerialName("has_more_pages") val hasMorePages: Boolean,
26 | @SerialName("next_page") val nextPage: String?,
27 | @SerialName("next_page_url") val nextPageUrl: String?,
28 | @SerialName("per_page") val perPage: String,
29 | @SerialName("previous_page_url") val previousPageUrl: String?
30 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/ResponseMetaData.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.Serializable
19 |
20 | @Serializable
21 | data class ResponseMetaData(
22 | val paginator: PaginationMetaData
23 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/RoomDTO.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.Serializable
19 |
20 | @Serializable
21 | data class RoomDTO(
22 | val title: String,
23 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/SessionDTO.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.SerialName
19 | import kotlinx.serialization.Serializable
20 |
21 | @Serializable data class EventScheduleGroupedResponse(
22 | val data: Map>
23 | )
24 |
25 | @Serializable
26 | data class SessionDTO(
27 | val id: String,
28 | val backgroundColor: String,
29 | val borderColor: String,
30 | val description: String,
31 | @SerialName("end_date_time") val endDateTime: String,
32 | @SerialName("end_time") val endTime: String,
33 | @SerialName("is_bookmarked") val isBookmarked: Boolean,
34 | @SerialName("is_keynote") val isKeynote: Boolean,
35 | @SerialName("is_serviceSession") val isServiceSession: Boolean,
36 | @SerialName("session_format") val sessionFormat: String,
37 | @SerialName("session_image") val sessionImage: String?,
38 | @SerialName("session_level") val sessionLevel: String,
39 | val slug: String,
40 | @SerialName("start_date_time") val startDateTime: String,
41 | @SerialName("start_time") val startTime: String,
42 | val title: String,
43 | val rooms: List,
44 | val speakers: List
45 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/SpeakerDTO.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.SerialName
19 | import kotlinx.serialization.Serializable
20 |
21 | @Serializable
22 | data class SpeakerDTO(
23 | val name: String,
24 | @SerialName("biography")
25 | val bio: String,
26 | val tagline: String,
27 | val avatar: String,
28 | val twitter: String?
29 | )
30 |
31 | @Serializable
32 | data class SpeakersPagedResponse(
33 | val data: List,
34 | val meta: ResponseMetaData
35 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/SponsorDTO.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.SerialName
19 | import kotlinx.serialization.Serializable
20 |
21 | @Serializable
22 | data class SponsorsPagedResponse(
23 | val data: List,
24 | )
25 |
26 | @Serializable
27 | data class SponsorDTO(
28 | val name: String,
29 | val tagline: String,
30 | val link: String,
31 | val logo: String,
32 | @SerialName("created_at") var createdAt: String
33 |
34 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/StatusDTO.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.Serializable
19 |
20 | @Serializable
21 | data class StatusDTO(val message: String)
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/models/responses/UserDetailsDTO.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.models.responses
17 |
18 | import kotlinx.serialization.Serializable
19 |
20 | @Serializable
21 | data class UserDetailsDTO(
22 | val name: String,
23 | val email: String,
24 | val gender: String?,
25 | val avatar: String
26 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/network/util/TokenProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.util
17 |
18 | import kotlinx.coroutines.flow.Flow
19 |
20 | interface TokenProvider {
21 |
22 | suspend fun fetch(): Flow
23 |
24 | suspend fun update(accessToken: String)
25 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/preferences/DefaultTokenProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.preferences
17 |
18 | import androidx.datastore.core.DataStore
19 | import androidx.datastore.preferences.core.Preferences
20 | import androidx.datastore.preferences.core.edit
21 | import androidx.datastore.preferences.core.emptyPreferences
22 | import androidx.datastore.preferences.core.stringPreferencesKey
23 | import com.android254.data.network.util.TokenProvider
24 | import kotlinx.coroutines.flow.Flow
25 | import kotlinx.coroutines.flow.catch
26 | import kotlinx.coroutines.flow.map
27 | import javax.inject.Inject
28 |
29 | private object PreferencesKeys {
30 | val ACCESS_TOKEN = stringPreferencesKey("access_token")
31 | }
32 |
33 | class DefaultTokenProvider @Inject constructor(private val dataStore: DataStore) :
34 | TokenProvider {
35 |
36 | override suspend fun fetch(): Flow = dataStore.data
37 | .catch {
38 | emit(emptyPreferences())
39 | }.map { preferences ->
40 | preferences[PreferencesKeys.ACCESS_TOKEN]
41 | }
42 |
43 | override suspend fun update(accessToken: String) {
44 | dataStore.edit { preferences ->
45 | preferences[PreferencesKeys.ACCESS_TOKEN] = accessToken
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/repos/AuthManager.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.repos
17 |
18 | import com.android254.data.network.apis.AuthApi
19 | import com.android254.data.network.models.payloads.GoogleToken
20 | import com.android254.data.network.util.NetworkError
21 | import com.android254.data.network.util.ServerError
22 | import com.android254.data.network.util.TokenProvider
23 | import com.android254.domain.models.DataResult
24 | import com.android254.domain.models.Success
25 | import com.android254.domain.repos.AuthRepo
26 | import javax.inject.Inject
27 |
28 | class AuthManager @Inject constructor(private val api: AuthApi, private val tokenProvider: TokenProvider) : AuthRepo {
29 | override suspend fun getAndSaveApiToken(idToken: String): DataResult {
30 | return try {
31 | val result = api.googleLogin(GoogleToken(idToken))
32 | tokenProvider.update(result.token)
33 | DataResult.Success(Success)
34 | } catch (e: Exception) {
35 | when (e) {
36 | is ServerError, is NetworkError -> {
37 | DataResult.Error("Login failed", networkError = true, exc = e)
38 | } else -> {
39 | DataResult.Error("Login failed", exc = e)
40 | }
41 | }
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/repos/mappers/OrganizersMapper.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.repos.mappers
17 |
18 | import com.android254.data.db.model.OrganizerEntity
19 | import com.android254.data.network.models.responses.OrganizerDTO
20 | import com.android254.domain.models.Organizer
21 |
22 | fun OrganizerDTO.toEntity() = OrganizerEntity(
23 | id = 0,
24 | name = name.orEmpty(),
25 | tagline = tagline.orEmpty(),
26 | link = link.orEmpty(),
27 | type = type.orEmpty(),
28 | photo = photo.orEmpty(),
29 | createdAt = createdAt.orEmpty(),
30 | designation = designation.orEmpty(),
31 | bio = bio.orEmpty(),
32 | twitterHandle = twitterHandle.orEmpty()
33 | )
34 |
35 | fun OrganizerEntity.toDomain() = Organizer(
36 | id = id,
37 | name = name,
38 | tagline = tagline,
39 | link = link,
40 | type = type,
41 | photo = photo,
42 | createdAt = createdAt,
43 | bio = bio,
44 | twitterHandle = twitterHandle,
45 | designation = designation
46 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/repos/mappers/SpeakerMapper.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.repos.mappers
17 |
18 | import com.android254.data.db.model.SpeakerEntity
19 | import com.android254.data.network.models.responses.SpeakerDTO
20 | import com.android254.domain.models.Speaker
21 |
22 | fun SpeakerDTO.toEntity() = SpeakerEntity(
23 | id = 0,
24 | name = name,
25 | tagline = tagline,
26 | bio = bio,
27 | avatar = avatar,
28 | twitter = twitter ?: ""
29 | )
30 |
31 | fun SpeakerEntity.toDomainModel() = Speaker(
32 | avatar = avatar,
33 | name = name,
34 | biography = bio,
35 | tagline = tagline,
36 | twitter = twitter,
37 | linkedin = "",
38 | instagram = "",
39 | facebook = "",
40 | blog = "",
41 | company_website = ""
42 | )
43 |
44 | fun SpeakerDTO.toDomain() = Speaker(
45 | avatar = avatar,
46 | name = name,
47 | tagline = tagline,
48 | biography = bio,
49 | twitter = twitter.orEmpty(),
50 | linkedin = "",
51 | instagram = "",
52 | facebook = "",
53 | blog = "",
54 | company_website = ""
55 | )
--------------------------------------------------------------------------------
/data/src/main/java/com/android254/data/repos/mappers/SponsorsMapper.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.repos.mappers
17 |
18 | import com.android254.data.network.models.responses.SponsorDTO
19 | import com.android254.domain.models.Sponsors
20 |
21 | fun SponsorDTO.toDomain() = Sponsors(
22 | sponsorName = name,
23 | sponsorLogoUrl = logo
24 | )
--------------------------------------------------------------------------------
/data/src/test/java/com/android254/data/network/MockTokenProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network
17 |
18 | import com.android254.data.network.util.TokenProvider
19 | import kotlinx.coroutines.flow.Flow
20 | import kotlinx.coroutines.flow.emptyFlow
21 |
22 | class MockTokenProvider : TokenProvider {
23 | override suspend fun fetch(): Flow = emptyFlow()
24 | override suspend fun update(accessToken: String) {}
25 | }
--------------------------------------------------------------------------------
/data/src/test/java/com/android254/data/network/SessionApiTest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network
17 |
18 | import com.android254.data.network.apis.SessionsApi
19 | import com.android254.data.network.models.responses.EventScheduleGroupedResponse
20 | import com.android254.data.network.util.HttpClientFactory
21 | import io.ktor.client.engine.mock.*
22 | import io.ktor.http.*
23 | import kotlinx.coroutines.runBlocking
24 | import org.hamcrest.MatcherAssert.assertThat
25 | import org.junit.Test
26 | import org.hamcrest.CoreMatchers.`is`
27 |
28 | class SessionApiTest {
29 | @Test
30 | fun `sessions are fetched successfully`() {
31 | val expectedResponse =
32 | EventScheduleGroupedResponse(
33 | data = emptyMap()
34 | )
35 |
36 | val responseText = """
37 | {
38 | data: {}
39 | }
40 | """.trimIndent()
41 | val mockHttpEngine = MockEngine {
42 | respond(
43 | content = responseText,
44 | headers = headersOf(HttpHeaders.ContentType, "application/json")
45 | )
46 | }
47 |
48 | val httpClient = HttpClientFactory(MockTokenProvider()).create(mockHttpEngine)
49 |
50 | runBlocking {
51 | // WHEN
52 | val response = SessionsApi(httpClient).fetchSessions()
53 | // THEN
54 | assertThat(response, `is`(expectedResponse))
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/data/src/test/java/com/android254/data/network/apis/Utils.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.network.apis
17 |
18 | import com.android254.data.network.models.responses.PaginationMetaData
19 | import com.android254.data.network.models.responses.ResponseMetaData
20 |
21 | val samplePaginationMetaData = ResponseMetaData(
22 | paginator = PaginationMetaData(
23 | count = 0,
24 | currentPage = 1,
25 | hasMorePages = false,
26 | nextPage = null,
27 | nextPageUrl = null,
28 | perPage = "20",
29 | previousPageUrl = null
30 | )
31 | )
--------------------------------------------------------------------------------
/data/src/test/java/com/android254/data/repos/SampleData.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.data.repos
17 |
18 | import com.android254.data.network.models.responses.*
19 |
20 | val results = EventScheduleGroupedResponse(
21 | data = mapOf(
22 | "2022-11-16" to listOf(
23 | SessionDTO(
24 | id = "String",
25 | backgroundColor = "String",
26 | borderColor = "String",
27 | description = "String",
28 | endDateTime = "String",
29 | endTime = "String",
30 | isBookmarked = false,
31 | isKeynote = false,
32 | isServiceSession = false,
33 | sessionFormat = "String",
34 | sessionImage = "String",
35 | sessionLevel = "String",
36 | slug = "String",
37 | startDateTime = "String",
38 | startTime = "String",
39 | title = "String",
40 | rooms = listOf(),
41 | speakers = listOf()
42 | )
43 | )
44 | )
45 | )
--------------------------------------------------------------------------------
/domain/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/domain/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("java-library")
3 | id("org.jetbrains.kotlin.jvm")
4 | }
5 |
6 | java {
7 | sourceCompatibility = JavaVersion.VERSION_1_8
8 | targetCompatibility = JavaVersion.VERSION_1_8
9 | }
10 |
11 | dependencies {
12 | implementation(libs.kotlinx.coroutines.core)
13 | }
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/models/Creator.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.models
17 |
18 | data class Creator(
19 | val id: Int?,
20 | val name: String?,
21 | val email: String?,
22 | val createdAt: String
23 | )
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/models/DataResult.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.models
17 |
18 | sealed interface DataResult {
19 | data class Success(val data: T) : DataResult
20 | data class Error(
21 | val message: String,
22 | val networkError: Boolean = false,
23 | val exc: Throwable? = null
24 | ) : DataResult
25 |
26 | data class Loading(val data: T?) : DataResult
27 | object Empty : DataResult
28 | }
29 |
30 | object Success
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/models/HomeDetails.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.models
17 |
18 | data class HomeDetails(
19 | val isCallForSpeakersEnable: Boolean,
20 | val isEventBannerEnable: Boolean,
21 | val sessions: List,
22 | val sessionsCount: Int,
23 | val speakers: List,
24 | val speakersCount: Int,
25 | val sponsors: List,
26 | val organizers: List
27 | )
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/models/Organizer.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.models
17 |
18 | data class Organizer(
19 | val id: Int,
20 | val name: String,
21 | val tagline: String,
22 | val link: String,
23 | val type: String,
24 | val bio: String,
25 | val twitterHandle: String,
26 | val designation: String,
27 | val photo: String,
28 | val createdAt: String
29 | )
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/models/OrganizingPartners.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.models
17 |
18 | data class OrganizingPartners(
19 | val organizerName: String,
20 | val organizerLogoUrl: String
21 | )
22 |
23 | data class Sponsors(
24 | val sponsorName: String,
25 | val sponsorLogoUrl: String
26 | )
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/models/ResourceResult.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.models
17 |
18 | sealed class ResourceResult(open val data: T? = null, open val message: String? = null) {
19 | data class Success(override val data: T?) : ResourceResult(data)
20 | data class Error(override val message: String, override val data: T? = null, val networkError: Boolean = false) : ResourceResult(data, message)
21 | data class Loading(val isLoading: Boolean = true) : ResourceResult(null)
22 | data class Empty (override val message: String) : ResourceResult(null)
23 | }
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/models/Session.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.models
17 |
18 | data class Session(
19 | val id: String,
20 | val endDateTime: String,
21 | val endTime: String,
22 | val isBookmarked: Boolean,
23 | val isKeynote: Boolean,
24 | val isServiceSession: Boolean,
25 | val sessionImage: String?,
26 | val startDateTime: String,
27 | val startTime: String,
28 | val rooms: String,
29 | val speakers: String,
30 | val remote_id: String,
31 | val description: String,
32 | val sessionFormat: String,
33 | val sessionLevel: String,
34 | val slug: String,
35 | val title: String
36 | )
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/models/SessionDomainModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.models
17 |
18 | data class SessionDomainModel(
19 | val backgroundColor: String,
20 | val borderColor: String,
21 | val end_date_time: String,
22 | val end_time: String,
23 | val is_bookmarked: Boolean,
24 | val is_keynote: Boolean,
25 | val is_serviceSession: Boolean,
26 | val session_image: String?,
27 | val start_date_time: String,
28 | val start_time: String,
29 | val rooms: String,
30 | val speakers: String,
31 | val remote_id: String,
32 | val description: String,
33 | val session_format: String,
34 | val session_level: String,
35 | val slug: String,
36 | val title: String,
37 | )
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/models/Speaker.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.models
17 |
18 | data class Speaker(
19 | val avatar: String = "",
20 | val biography: String = "",
21 | val blog: String = "",
22 | val company_website: String = "",
23 | val facebook: String = "",
24 | val instagram: String = "",
25 | val linkedin: String = "",
26 | val name: String,
27 | val tagline: String = "",
28 | val twitter: String = ""
29 | )
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/repos/AuthRepo.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.repos
17 |
18 | import com.android254.domain.models.DataResult
19 | import com.android254.domain.models.Success
20 |
21 | interface AuthRepo {
22 |
23 | suspend fun getAndSaveApiToken(idToken: String): DataResult
24 | }
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/repos/HomeRepo.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.repos
17 |
18 | import com.android254.domain.models.HomeDetails
19 |
20 | interface HomeRepo {
21 | suspend fun fetchHomeDetails(): HomeDetails
22 | }
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/repos/OrganizersRepository.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.repos
17 |
18 | import com.android254.domain.models.Organizer
19 |
20 | interface OrganizersRepository {
21 | suspend fun getOrganizers(): List
22 | }
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/repos/SessionsRepo.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.repos
17 |
18 | import com.android254.domain.models.ResourceResult
19 | import com.android254.domain.models.Session
20 | import kotlinx.coroutines.flow.Flow
21 |
22 | interface SessionsRepo {
23 | suspend fun fetchAndSaveSessions(
24 | fetchFromRemote: Boolean = false,
25 | query: String? = null
26 | ): Flow>>
27 |
28 | suspend fun fetchSessionById(id: String): Flow>
29 |
30 | suspend fun toggleBookmarkStatus(id: String, isCurrentlyStarred: Boolean): Flow>
31 | }
--------------------------------------------------------------------------------
/domain/src/main/java/com/android254/domain/repos/SpeakersRepo.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.domain.repos
17 |
18 | import com.android254.domain.models.ResourceResult
19 | import com.android254.domain.models.Speaker
20 |
21 | interface SpeakersRepo {
22 | suspend fun fetchSpeakers(): ResourceResult>
23 | suspend fun fetchSpeakersUnpacked(): List
24 | suspend fun fetchSpeakerCount(): ResourceResult
25 | suspend fun getSpeakerById(id: Int): ResourceResult
26 | }
--------------------------------------------------------------------------------
/fastlane/Appfile:
--------------------------------------------------------------------------------
1 | json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
2 | package_name("com.android254.droidconKE2022") # e.g. com.krausefx.app
3 |
--------------------------------------------------------------------------------
/fastlane/Fastfile:
--------------------------------------------------------------------------------
1 | # This file contains the fastlane.tools configuration
2 | # You can find the documentation at https://docs.fastlane.tools
3 | #
4 | # For a list of all available actions, check out
5 | #
6 | # https://docs.fastlane.tools/actions
7 | #
8 | # For a list of all available plugins, check out
9 | #
10 | # https://docs.fastlane.tools/plugins/available-plugins
11 | #
12 |
13 | # Uncomment the line if you want fastlane to automatically update itself
14 | # update_fastlane
15 |
16 | default_platform(:android)
17 |
18 | platform :android do
19 | desc "Runs ktlintFormat on the codebase"
20 | lane :ktlintFormat do
21 | gradle(task: "ktlintFormat")
22 | end
23 |
24 | desc "Runs ktlintCheck on the codebase"
25 | lane :ktlintCheck do
26 | gradle(task: "ktlintCheck")
27 | end
28 |
29 | desc "Runs detekt on the codebase"
30 | lane :detekt do
31 | gradle(task: "detekt")
32 | end
33 |
34 | desc "Runs tests on the codebase"
35 | lane :test do
36 | gradle(task: "testDebug")
37 | end
38 |
39 | desc "Builds on all branches"
40 | lane :branch do
41 | gradle(task: "buildDebug")
42 | end
43 |
44 | desc "Runs on main branch"
45 | lane :main do
46 | gradle(task: "clean buildDebug")
47 | end
48 | end
49 |
--------------------------------------------------------------------------------
/fastlane/README.md:
--------------------------------------------------------------------------------
1 | fastlane documentation
2 | ----
3 |
4 | # Installation
5 |
6 | Make sure you have the latest version of the Xcode command line tools installed:
7 |
8 | ```sh
9 | xcode-select --install
10 | ```
11 |
12 | For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
13 |
14 | # Available Actions
15 |
16 | ## Android
17 |
18 | ### android branch
19 |
20 | ```sh
21 | [bundle exec] fastlane android branch
22 | ```
23 |
24 | Builds on all branches
25 |
26 | ### android main
27 |
28 | ```sh
29 | [bundle exec] fastlane android main
30 | ```
31 |
32 | Runs on main branch
33 |
34 | ----
35 |
36 | This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
37 |
38 | More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
39 |
40 | The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
41 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Kotlin code style for this project: "official" or "obsolete":
19 | kotlin.code.style=official
20 | # Enables namespacing of each library's R class so that its R class includes only the
21 | # resources declared in the library itself and none from the library's dependencies,
22 | # thereby reducing the size of the R class for that library
23 | android.nonTransitiveRClass=true
24 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/presentation/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/presentation/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/about/view/AboutViewModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.about.view
17 |
18 | import androidx.lifecycle.ViewModel
19 | import com.android254.domain.repos.OrganizersRepository
20 | import com.android254.presentation.models.OrganizingTeamMember
21 | import dagger.hilt.android.lifecycle.HiltViewModel
22 | import javax.inject.Inject
23 |
24 | @HiltViewModel
25 | class AboutViewModel @Inject constructor(
26 | private val organizersRepo: OrganizersRepository
27 | ) : ViewModel() {
28 |
29 | suspend fun getOrganizers(): Pair, List> {
30 | val result = organizersRepo.getOrganizers()
31 | val team = result.filter { it.type == "individual" }.map {
32 | OrganizingTeamMember(
33 | name = it.name,
34 | desc = it.tagline,
35 | image = it.photo
36 | )
37 | }
38 | val stakeholders = result.filterNot { it.type == "individual" }.map {
39 | it.photo
40 | }
41 |
42 | return Pair(team, stakeholders)
43 | }
44 | }
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/auth/AuthViewModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.auth
17 |
18 | import android.content.Intent
19 | import androidx.lifecycle.ViewModel
20 | import com.android254.domain.models.DataResult
21 | import com.android254.domain.repos.AuthRepo
22 | import dagger.hilt.android.lifecycle.HiltViewModel
23 | import timber.log.Timber
24 | import javax.inject.Inject
25 |
26 | @HiltViewModel
27 | class AuthViewModel @Inject constructor(
28 | private val googleSignInHandler: GoogleSignInHandler,
29 | private val authRepo: AuthRepo
30 | ) : ViewModel() {
31 |
32 | fun getSignInIntent() = googleSignInHandler.getSignInIntent()
33 |
34 | suspend fun submitGoogleToken(intent: Intent?): Boolean {
35 | val idToken = googleSignInHandler.getIdToken(intent)
36 | Timber.i("Id token is $idToken")
37 | // Submit ID Token to API
38 | // to get access token
39 | if (idToken == null) {
40 | return false
41 | }
42 | Timber.i("Fetching API token")
43 | return when (authRepo.getAndSaveApiToken(idToken)) {
44 | is DataResult.Success -> {
45 | true
46 | }
47 | else -> {
48 | false
49 | }
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/common/components/DroidConTextField.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.common.components
17 |
18 | import androidx.compose.foundation.layout.fillMaxWidth
19 | import androidx.compose.foundation.layout.height
20 | import androidx.compose.foundation.layout.padding
21 | import androidx.compose.foundation.shape.RoundedCornerShape
22 | import androidx.compose.material3.Text
23 | import androidx.compose.material3.TextField
24 | import androidx.compose.material3.TextFieldDefaults
25 | import androidx.compose.runtime.*
26 | import androidx.compose.ui.Modifier
27 | import androidx.compose.ui.graphics.Color
28 | import androidx.compose.ui.unit.dp
29 |
30 | @Composable
31 | fun DroidConTextField(label: String) {
32 | var value by remember {
33 | mutableStateOf("")
34 | }
35 |
36 | TextField(
37 | value = value,
38 | onValueChange = { value = it },
39 | label = { Text(label) },
40 | modifier = Modifier.fillMaxWidth().padding(0.dp).height(48.dp),
41 | colors = TextFieldDefaults.textFieldColors(
42 | focusedIndicatorColor = Color.Transparent,
43 | unfocusedIndicatorColor = Color.Transparent,
44 | disabledIndicatorColor = Color.Transparent
45 | ),
46 | shape = RoundedCornerShape(7.dp)
47 | )
48 | }
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/common/components/ImageAvatar.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.common.components
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/common/components/Loader.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.common.components
17 |
18 | import androidx.compose.foundation.layout.Column
19 | import androidx.compose.foundation.layout.fillMaxWidth
20 | import androidx.compose.material3.Text
21 | import androidx.compose.runtime.Composable
22 | import androidx.compose.runtime.getValue
23 | import androidx.compose.ui.Alignment
24 | import androidx.compose.ui.Modifier
25 | import com.airbnb.lottie.compose.LottieAnimation
26 | import com.airbnb.lottie.compose.LottieCompositionSpec
27 | import com.airbnb.lottie.compose.rememberLottieComposition
28 | import com.android254.presentation.R
29 |
30 | @Composable
31 | fun Loader(message: String = "Loading...") {
32 | val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.loading))
33 | Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
34 | LottieAnimation(
35 | composition = composition,
36 | )
37 | Text(text = message)
38 | }
39 | }
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/common/components/PrimaryButton.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.common.components
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/common/components/SpeakersCard.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.common.components
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/common/navigation/Screens.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.common.navigation
17 |
18 | import androidx.annotation.DrawableRes
19 | import com.android254.presentation.R
20 |
21 | sealed class Screens(var route: String, @DrawableRes var icon: Int, var title: String) {
22 | object Home : Screens("/home", R.drawable.home_icon, "Home")
23 | object Feed : Screens("/feed", R.drawable.feed_icon, "Feed")
24 | object Sessions : Screens("/sessions", R.drawable.sessions_icon, "Sessions")
25 | object About : Screens("/about", R.drawable.about_icon, "About")
26 | object Speakers : Screens("/speakers", R.drawable.droidcon_icon, "Speakers")
27 | object FeedBack : Screens("/feedback", R.drawable.droidcon_icon, "FeedBack")
28 | object SessionDetails : Screens("/sessionDetails/{sessionId}", R.drawable.droidcon_icon, "Session Details") { const val sessionIdNavigationArgument = "sessionId" }
29 | object SpeakerDetails : Screens("/speaker_details/{speakerId}", R.drawable.droidcon_icon, "Speaker Details")
30 | }
31 |
32 | val bottomNavigationDestinations = listOf(
33 | Screens.Home,
34 | Screens.Sessions,
35 | Screens.About
36 | )
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/home/components/HomeSpacer.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.home.components
17 |
18 | import androidx.compose.foundation.layout.Spacer
19 | import androidx.compose.foundation.layout.padding
20 | import androidx.compose.runtime.Composable
21 | import androidx.compose.ui.Modifier
22 | import androidx.compose.ui.unit.dp
23 |
24 | @Composable
25 | fun HomeSpacer() = Spacer(modifier = Modifier.padding(10.dp))
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/home/viewstate/HomeViewState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.home.viewstate
17 |
18 | import com.android254.presentation.models.SessionPresentationModel
19 | import com.android254.presentation.models.SpeakerUI
20 |
21 | data class HomeViewState(
22 | val isPosterVisible: Boolean = true,
23 | val isCallForSpeakersVisible: Boolean = false,
24 | val linkToCallForSpeakers: String = "",
25 | val isSignedIn: Boolean = false,
26 | val speakers: List = emptyList(),
27 | val sponsors: List = emptyList(),
28 | val organizedBy: List = emptyList(),
29 | val sessions: List = emptyList()
30 | )
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/models/EventDate.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.models
17 |
18 | import kotlinx.datetime.LocalDate
19 |
20 | data class EventDate(
21 | val value: LocalDate
22 | )
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/models/OrganizingTeamMember.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.models
17 |
18 | data class OrganizingTeamMember(
19 | val id: Int = 0,
20 | val name: String = "",
21 | val desc: String = "",
22 | val image: String,
23 | )
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/models/SessionDetailsPresentationModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.models
17 |
18 | data class SessionDetailsPresentationModel(
19 | val id: String,
20 | val title: String,
21 | val description: String,
22 | val venue: String,
23 | val speakerImage: String,
24 | val speakerName: String,
25 | val startTime: String,
26 | val endTime: String,
27 | val amOrPm: String,
28 | val isStarred: Boolean,
29 | val format: String,
30 | val level: String,
31 | val twitterHandle: String?,
32 | val sessionImageUrl: String?,
33 | val timeSlot: String
34 | )
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/models/SessionPresentationModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.models
17 |
18 | data class SessionPresentationModel(
19 | val id: String,
20 | val title: String,
21 | val description: String,
22 | val venue: String,
23 | val speakerImage: String,
24 | val speakerName: String,
25 | val startTime: String,
26 | val endTime: String,
27 | val amOrPm: String,
28 | val isStarred: Boolean,
29 | val format: String,
30 | val level: String,
31 | val startDate: String,
32 | val endDate: String,
33 | val remoteId: String,
34 | val isService: Boolean = false,
35 | val sessionImage: String = ""
36 | )
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/models/SessionsFilterAdapter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.models
17 |
18 | import com.android254.presentation.sessions.utils.SessionsFilterCategory
19 |
20 | data class SessionsFilterAdapter(
21 | val categories: MutableMap>,
22 | )
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/models/SessionsFilterOption.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.models
17 |
18 | import com.android254.presentation.sessions.utils.SessionsFilterCategory
19 |
20 | data class SessionsFilterOption(
21 | val label: String,
22 | val value: String,
23 | val type: SessionsFilterCategory
24 | )
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/models/Speaker.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.models
17 |
18 | data class Speaker(
19 | val avatar: String?,
20 | val biography: String?,
21 | val blog: String?,
22 | val company_website: String?,
23 | val facebook: String?,
24 | val instagram: String?,
25 | val linkedin: String?,
26 | val name: String,
27 | val tagline: String?,
28 | val twitter: String?
29 | )
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/models/SpeakerUI.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.models
17 |
18 | data class SpeakerUI(
19 | val id: Int = 0,
20 | val imageUrl: String? = "",
21 | val name: String = "Name",
22 | val tagline: String? = "",
23 | val bio: String? = "bio",
24 | val twitterHandle: String? = "TwitterHandle"
25 | )
26 |
27 | val speakersDummyData = listOf(
28 | SpeakerUI(
29 | imageUrl = "https://sessionize.com/image/09c1-400o400o2-cf-9587-423b-bd2e-415e6757286c.b33d8d6e-1f94-4765-a797-255efc34390d.jpg",
30 | name = "Harun Wangereka",
31 | bio = "Kenya Partner Lead at droidcon Berlin | Android | Kotlin | Flutter | C++"
32 | ),
33 | SpeakerUI(
34 | imageUrl = "https://media-exp1.licdn.com/dms/image/C4D03AQGn58utIO-x3w/profile-displayphoto-shrink_200_200/0/1637478114039?e=2147483647&v=beta&t=3kIon0YJQNHZojD3Dt5HVODJqHsKdf2YKP1SfWeROnI",
35 | name = "Frank Tamre",
36 | bio = "Kenya Partner Lead at droidcon Berlin | Android | Kotlin | Flutter | C++"
37 | )
38 | )
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/sessions/utils/FilterKeys.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.sessions.utils
17 |
18 | enum class FilterKeys {
19 | START_DATE_TIME
20 | }
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/sessions/utils/SessionsFilterCategory.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.sessions.utils
17 |
18 | import com.android254.presentation.R
19 |
20 | enum class SessionsFilterCategory(val resId: Int) {
21 | Level(R.string.title_filter_level),
22 | Topic(R.string.title_filter_topic),
23 | Room(R.string.title_filter_room),
24 | SessionType(R.string.title_filter_session_type),
25 | }
--------------------------------------------------------------------------------
/presentation/src/main/java/com/android254/presentation/sessions/view/SessionsFilterState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.sessions.view
17 |
18 | data class SessionsFilterState(
19 | val levels: List = listOf(),
20 | val topics: List = listOf(),
21 | val rooms: List = listOf(),
22 | val sessionTypes: List = listOf(),
23 | val isBookmarked: Boolean = false
24 | )
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/about_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/drawable/all.png
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/droidcon_event_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/drawable/droidcon_event_banner.png
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/droidcon_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/drawable/droidcon_icon.png
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/feed_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/home_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_back_arrow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_baseline_close_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_facebook.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_feedback_emoji.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_filter.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_google_logo_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_green_session_card_spacer.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_home_speakers_card_play.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_listalt.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_orange_session_card_spacer.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_send_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_share.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_telegram.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_topbar_bg_login.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_topbar_bg_login_dark.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_twitter.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_twitter_logo.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_view_agenda.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/ic_whatsapp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/session_transforming_lives.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/drawable/session_transforming_lives.png
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/sessions_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/smile.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/smiling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/drawable/smiling.png
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/team.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/drawable/team.png
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/toolbar_bg_sign_up_dark.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/topbar_bg_sign_up.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/topbar_speaker_bg.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/presentation/src/main/res/drawable/whilte_padlock.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_black.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_black_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_black_italic.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_bold.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_bold_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_bold_italic.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_extra_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_extra_bold.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_extra_bold_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_extra_bold_italic.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_extra_light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_extra_light.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_extra_light_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_extra_light_italic.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_italic.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_light.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_light_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_light_italic.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_medium.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_medium_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_medium_italic.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_regular.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_semi_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_semi_bold.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_semi_bold_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_semi_bold_italic.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_thin.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/font/montserrat_thin_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidconKE/droidconKE2022Android/65d0b73a1e48db06a27f84fce1afa81382b872c4/presentation/src/main/res/font/montserrat_thin_italic.ttf
--------------------------------------------------------------------------------
/presentation/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #000CEB
4 | #FF6E4D
5 | #707070
6 | #F5F5F5
7 | #00E2C3
8 | #7DE1C3
9 | #20201E
10 | #1c000CEB
11 | #FFFFFF
12 | #B1B1B1
13 | #000000
14 | #191D1D
15 |
--------------------------------------------------------------------------------
/presentation/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/presentation/src/test/java/com/android254/presentation/auth/view/AuthDialogTest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.android254.presentation.auth.view
17 |
18 | import androidx.compose.ui.test.assertIsDisplayed
19 | import androidx.compose.ui.test.assertTextEquals
20 | import androidx.compose.ui.test.junit4.createComposeRule
21 | import androidx.compose.ui.test.onNodeWithTag
22 | import com.android254.presentation.common.theme.DroidconKE2022Theme
23 | import org.junit.Rule
24 | import org.junit.Test
25 | import org.junit.runner.RunWith
26 | import org.robolectric.RobolectricTestRunner
27 | import org.robolectric.annotation.Config
28 |
29 | @RunWith(RobolectricTestRunner::class)
30 | @Config(instrumentedPackages = ["androidx.loader.content"])
31 | class AuthDialogTest {
32 |
33 | @get:Rule
34 | val composeTestRule = createComposeRule()
35 |
36 | @Test
37 | fun `test all widgets should be visible`() {
38 | composeTestRule.setContent {
39 | DroidconKE2022Theme {
40 | AuthDialog()
41 | }
42 | }
43 |
44 | // Google login button
45 | composeTestRule.onNodeWithTag("google_button").assertIsDisplayed()
46 | composeTestRule.onNodeWithTag("google_button").assertTextEquals("Sign in with Google")
47 | }
48 | }
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | mavenCentral()
5 | google()
6 | maven { url = uri("https://jitpack.io") }
7 | }
8 | }
9 |
10 | dependencyResolutionManagement {
11 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
12 | repositories {
13 | mavenCentral()
14 | google()
15 | maven { url = uri("https://jitpack.io") }
16 | }
17 | }
18 |
19 | mapOf(
20 | "app" to "app",
21 | "data" to "data",
22 | "chaidemo" to "chaidemo",
23 | "chai" to "chai",
24 | "domain" to "domain",
25 | "presentation" to "presentation"
26 | ).forEach { (projectName, projectPath) ->
27 | include(":$projectName")
28 | project(":$projectName").projectDir = File(projectPath)
29 | }
30 |
31 | rootProject.name = "DroidconKE2022"
--------------------------------------------------------------------------------
/spotless/copyright.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright $YEAR DroidconKE
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
--------------------------------------------------------------------------------
/whatsnew/whatsnew-en-US:
--------------------------------------------------------------------------------
1 | - Bug fixes and UI improvements.
--------------------------------------------------------------------------------