University social media and event app Demonstrate the Jetpack Compose UI using Firebase as Database. Made with β€οΈ by Enes
Polls item by Jonah Grindler
Create Poll by Damir
- Single Activity No Fragment
- MVVM Pattern
View: Renders UI and delegates user actions to ViewModel
ViewModel: Can have simple UI logic but most of the time just gets the data from UseCase.
UseCase: Contains all business 8000 rules and they written in the manner of single responsibility principle.
Repository: Single source of data. Responsible to get data from one or more data sources.
For more information you can check Guide to app architecture
-
inside local.properties file add this three below line and Rebuild project.
-
apiPath="meallist/meal_list/main/b69b930d.json"
-
baseUrl="https://raw.githubusercontent.com/"
-
clientId="YOUR CLIENT ID HERE"
- You can get this client id from Google Cloud Console
- First create Firebase Application
- Open cloud console and select your account where you created the Firebase application
- When you select your account your application should automatically show up on top left corner. If it's not then select your applicaiton by clicking
Select a project
button - Create OAuth 2 Web Credential from
Credentials
section - Copy
Client id
and paste it - For more information follow the Guideline
- You can get this client id from Google Cloud Console
-
-
- Enable Firebase Features
- Create applicaiton using Firebase Console
- Enable email and Google login from
Authenticaiton -> Sign in provider
section - Enable Firestore Database
- Enable Storage
- Setup Project
- Add your debug and release SHA-1 key from Project Settings section
- Download google_services.json and paste to your project directory
- Enable Firebase Features
-
- How to store API key? - Stackoverflow
- How to add SHA-1 Key to Firebase - Stackoverflow
- Firebase Documentaton - Firebase
- Kotlin - First class and official programming language for Android development.
- Retrofit - A type-safe HTTP client for Android and Java.
- Jetpack Compose - Jetpack Compose is Androidβs modern toolkit for building native UI.
- Accompanist - A collection of extension libraries for Jetpack Compose.
- Pager - Pager composable for Jetpack Compose.
- Navigation Animation - Animated Navigation for Jetpack Compose.
- Swipe to Refresh - Swipe Refresh layout for Jetpack Compose.
- Coroutines - For asynchronous and more..
- Android Architecture Components -
Collection of libraries that help you design robust, testable, and maintainable apps.
- Flows - Data objects that notify views when the underlying database changes.
- ViewModel - Stores UI-related data that isn't destroyed on UI changes.
- Jetpack DataStore - Jetpack DataStore is a data storage solution that allows you to store key-value pairs or typed objects with protocol buffers.
- Compose Destinations - A KSP library that processes annotations and generates code that uses Official Jetpack Compose Navigation under the hood. It hides from you the non-type-safe and boilerplate code you would otherwise have to write.
- Firebase - Firebase is an app development platform that helps you build and grow apps and games users love. Backed by Google and trusted by millions of businesses around the world.
- Material Components for Android - Modular and customizable Material Design UI components for Android.
- Dagger - Hilt - Dependency Injection Framework.
- Coil - Coroutine image loader library.
- Jsoup - HTML parser library.
- Compressor - An android image compression library.
.
.
.
βββ di # Hilt Dependency Injection
βββ feature # Screens, components and view models
|
βββ data # DTOs and repositories
| |
| βββ event # Screen Event classes
| |
| βββ model # models
| |
| βββ remote # Retrofit API interfaces
| |
| βββ repository # Repository classes
| |
| βββ state # Screen States
|
βββ core
| βββ ui # Compose Theme
| |
| βββ component # Main Activity components
|
βββ utils # Useful classes, extensions and more
|
βββ Eventverse.kt # @HiltAndroidApp
If you want to contribute to this app, you're always welcome!
Copyright (c) 2022 Enes KayΔ±klΔ±k
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.