Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desenvolvimento e Aprimoramento Abrangentes: Firebase, Networking, Navegação, Injeção de Dependência, Testes, e as Features de Login e Home #5

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
8759d75
chore: initial commit create project
leocruzdev Jun 1, 2023
55e5645
feat(theme): add theme abstraction with custom components
leocruzdev Jun 2, 2023
6d936b2
test(theme): implementation with instrumentation test to components
leocruzdev Jun 2, 2023
0bbcd0b
feat(networking): abstraction to networking request and add tranforme…
leocruzdev Jun 2, 2023
76ed7cd
feat(navigator): abstraction to navigation screens
leocruzdev Jun 2, 2023
0d57908
teste(navigator): test to navigator implementation
leocruzdev Jun 2, 2023
c596e05
feat(firebase): create abstraction to firebase auth
leocruzdev Jun 2, 2023
460b6e6
feat(firebase): create abstraction to analytics
leocruzdev Jun 2, 2023
6fe5b3e
feat(firebase): create abstraction to crashlytics
leocruzdev Jun 2, 2023
4855b8b
feat(firebase): create custom errors to firebase
leocruzdev Jun 2, 2023
1cee9a9
feat(firebase): create injection module to firebase
leocruzdev Jun 2, 2023
645ee77
feat(firebase): add network permissions to firebase module
leocruzdev Jun 2, 2023
425bd05
test(firebase): create tests to firebase analytics and firebase auth
leocruzdev Jun 2, 2023
1613a8d
feat(database): create database abstraction
leocruzdev Jun 2, 2023
8cec769
feat(database): create dao to login and entity user to login
leocruzdev Jun 2, 2023
bb7799d
feat(login): create local datasource from database to login in data l…
leocruzdev Jun 2, 2023
7cf8901
feat(login): create data layer to login using database and firebase a…
leocruzdev Jun 2, 2023
00fab32
feat(login): create domain layer to login encapsulate logic in usecases
leocruzdev Jun 2, 2023
0466d39
feat(login): create presentation layer to login screen and register s…
leocruzdev Jun 2, 2023
e7894e4
feat(login): create injection module to login
leocruzdev Jun 2, 2023
6900f84
test(login): create tests to login data layer, add coroutine test rule
leocruzdev Jun 2, 2023
eebdb97
test(login): create tests to login domain layer
leocruzdev Jun 2, 2023
850e038
test(login): create tests to login presentation layer
leocruzdev Jun 2, 2023
ba7ea55
test(login): create instrumented tests to login email and password form
leocruzdev Jun 2, 2023
40c907f
feat(database): create dao localization and entity localization to ho…
leocruzdev Jun 2, 2023
8adbc07
feat(home): create local datasource abstraction from database to home…
leocruzdev Jun 2, 2023
43157c7
feat(home): create data layer to home using database as dependency
leocruzdev Jun 2, 2023
b2ef029
feat(home): create domain layer to home encapsulate logic in usecases
leocruzdev Jun 2, 2023
f927437
feat(home): create presentation layer to home screen with states
leocruzdev Jun 2, 2023
5f8584e
test(home): create unit tests to home data layer, add coroutine test …
leocruzdev Jun 2, 2023
35efdd4
test(home): create unit tests to home domain layer
leocruzdev Jun 2, 2023
7823ca6
test(home): create unit tests to home presentation layer
leocruzdev Jun 2, 2023
8c8a168
feat(home): create injection module to home
leocruzdev Jun 2, 2023
ece8710
feat(home): create files default to module home
leocruzdev Jun 2, 2023
68b4bbd
feat(database): create injection module to database, add default file…
leocruzdev Jun 2, 2023
7560f2e
test(database): create instrumented tests to database add coroutine t…
leocruzdev Jun 2, 2023
b456e4e
feat(app): create app navigator orchestrator to app level with splash…
leocruzdev Jun 2, 2023
1ab7269
feat(app): create app main activity orchestrator to screens composabl…
leocruzdev Jun 2, 2023
72b287b
feat(app): create app to start koin and input all modules to application
leocruzdev Jun 2, 2023
d049e7a
chore(app): remove trash
leocruzdev Jun 2, 2023
9a9f2ca
feat(app): include google-services.json to test application
leocruzdev Jun 2, 2023
635bc4e
fix(app): uncoment pop to splash screen
leocruzdev Jun 2, 2023
db38bfa
docs: add app images examples
leocruzdev Jun 2, 2023
a0a6870
Update README.md
leocruzdev Jun 2, 2023
3121270
docs: add app images crashlytics and analytics examples
leocruzdev Jun 2, 2023
2005120
Merge remote-tracking branch 'origin/develop' into develop
leocruzdev Jun 2, 2023
3b48928
Update README.md
leocruzdev Jun 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# .editorconfig
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.kt]
max_line_length = 100
continuation_indent_size = 4

[*.xml]
indent_size = 2
99 changes: 99 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Built application files
*.apk
*.aar
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/
release/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

# Version control
vcs.xml

# lint
lint/intermediates/

# lint-gradle-api-26.1.2.jar
/home/<aUser>/.gradle/caches/modules-2/files-2.1/com.android.tools.lint/lint-gradle-api/26.1.2/2e3fa2b2ddec89a49ea26a63e6b9cdaa76944f0d/lint-gradle-api-26.1.2.jar

# Firebase config file
google-services.json

# Classpath
.classpath

# CMakeLists.txt.user
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps

# Mac
.DS_Store
112 changes: 112 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,115 @@ Seu projeto será avaliado de acordo com os seguintes critérios.
4. Qualidade e cobertura dos testes unitários.

Adicionalmente, tentaremos verificar a sua familiarização com as bibliotecas padrões (standard libs), bem como sua experiência com programação orientada a objetos a partir da estrutura de seu projeto.

================================================|||||======================================================================

# Projeto ByCoders

Este projeto apresenta uma solução completa para a visualização de um mapa, implementando funcionalidades como login, autenticação, localização e rastreamento de usuários. Utilizando uma série de técnicas e bibliotecas modernas, o projeto segue uma estrutura modular e utiliza uma variedade de padrões de projeto.

## Screens:

<img src="https://github.com/leocruzdev/desafio_mobile/blob/3121270565a82095a0b09b0c9e8bf71f42702a1a/app/src/main/res/drawable/bycoders_11.png" width="500"/>

<img src="https://github.com/leocruzdev/desafio_mobile/blob/3121270565a82095a0b09b0c9e8bf71f42702a1a/app/src/main/res/drawable/bycoders_10.png" width="500"/>


<img src="https://github.com/ByCodersTec/desafio_mobile/blob/db38bfacd9066b3fd706b374771b51eaaa59e4dc/app/src/main/res/drawable/bycoders_1.png" width="200"/>
<img src="https://github.com/ByCodersTec/desafio_mobile/blob/db38bfacd9066b3fd706b374771b51eaaa59e4dc/app/src/main/res/drawable/bycoders_2.png" width="200"/>
<img src="https://github.com/ByCodersTec/desafio_mobile/blob/db38bfacd9066b3fd706b374771b51eaaa59e4dc/app/src/main/res/drawable/bycoders_3.png" width="200"/>
<img src="https://github.com/ByCodersTec/desafio_mobile/blob/db38bfacd9066b3fd706b374771b51eaaa59e4dc/app/src/main/res/drawable/bycoders_4.png" width="200"/>
<img src="https://github.com/ByCodersTec/desafio_mobile/blob/db38bfacd9066b3fd706b374771b51eaaa59e4dc/app/src/main/res/drawable/bycoders_5.png" width="200"/>
<img src="https://github.com/ByCodersTec/desafio_mobile/blob/db38bfacd9066b3fd706b374771b51eaaa59e4dc/app/src/main/res/drawable/bycoders_6.png" width="200"/>
<img src="https://github.com/ByCodersTec/desafio_mobile/blob/db38bfacd9066b3fd706b374771b51eaaa59e4dc/app/src/main/res/drawable/bycoders_7.png" width="200"/>
<img src="https://github.com/ByCodersTec/desafio_mobile/blob/db38bfacd9066b3fd706b374771b51eaaa59e4dc/app/src/main/res/drawable/bycoders_8.png" width="200"/>
<img src="https://github.com/ByCodersTec/desafio_mobile/blob/db38bfacd9066b3fd706b374771b51eaaa59e4dc/app/src/main/res/drawable/bycoders_9.png" width="200"/>

##Bibliotecas Utilizadas

##Gerais
- Compose UI
- Room
- Koin Android
- Koin Core JVM
- Koin Test JVM
- Firebase Auth, Analytics, Crashlytics
- Google Maps
- Detekt

##Testes de Unidade
- Junit: 4.13.2
- MockK: 1.13.5
- Kotlinx Coroutines Test: 1.7.1
- Turbine: 0.13.0
- Robolectric: 4.6.1
- Google Truth: 1.1.3
- AssertJ Core: 3.20.2
- Testes Instrumentados
- AndroidX Test ext junit: 1.1.5
- Espresso Core: 3.5.1
- AndroidX Test ext truth: 1.5.0
- AndroidX Test runner: 1.5.2
- AndroidX Test rules: 1.5.0
- Compose UI test junit4: 1.4.3
- Koin Test: 3.4.0
- MockK Android: 1.13.5
- MockK Agent: 1.13.5
- Compose UI Test Manifest: 1.4.3

## Recursos

- Arquitetura limpa com abstrações para Firebase, Networking e Navigator
- Injeção de Dependência com Koin
- Integração com Firebase Auth, Analytics e Crashlytics
- Persistência de dados com Room
- Integração com Google Maps
- Padrões de Projeto Usecase e Repository
- Estratégia de Single Activity para Composables
- Análise Estática de Código com Detekt

## Arquitetura e Módulos

O projeto segue os princípios de Clean Architecture, com abstrações para Firebase, Networking e Navigator, e é dividido em vários módulos claros, otimizando a manutenção e escalabilidade. As features implementadas incluem:

- Login: provê funcionalidades de autenticação de usuários.
- Home: exibe o mapa com informações de localização e permite a interação com marcadores.

Os módulos do projeto incluem:

- `firebase`: abstrai a integração com Firebase Auth, Firebase Analytics e Firebase Crashlytics.
- `networking`: proporciona o gerenciamento de chamadas de rede.
- `navigator`: responsável pelo gerenciamento de navegação no aplicativo.
- `database`: contém a abstração do banco de dados com Room.
- `features`: inclui as funcionalidades específicas de cada feature do projeto.

## Testes

Dedicamos uma atenção especial à qualidade do software, implementando testes de unidade e testes instrumentados para todas as funcionalidades do aplicativo, garantindo sua correta funcionalidade e confiabilidade.

## Próximos Passos e Melhorias

Estamos sempre buscando melhorar e expandir o projeto. Alguns dos nossos planos futuros incluem:

- Melhorar a cobertura de testes
- Implementar novas features
- Aprimorar a usabilidade e a experiência do usuário
- Continuar otimizando a manutenibilidade e escalabilidade do projeto

## Instalação

Para instalar e executar o aplicativo no Android Studio, siga estas etapas:

1. Clone o repositório ou baixe os arquivos zip do projeto.
2. Abra o Android Studio e clique em "Open an existing Android Studio project".
3. Navegue até a pasta do projeto e selecione a pasta raiz.
4. Aguarde o Android Studio sincronizar e construir o projeto.
5. Execute o aplicativo em um emulador ou dispositivo Android conectado.

## Contato

Se você tiver dúvidas ou sugestões, sinta-se à vontade para entrar em contato:

- Nome: Leonardo Oliveira da Cruz
- E-mail: [[email protected]]
- LinkedIn: [https://www.linkedin.com/in/leonardo-oliveira-da-cruz-8566a530/]
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
91 changes: 91 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}

android {
namespace 'com.dacruz.bycodersmobile'
compileSdk 33

defaultConfig {
applicationId "com.dacruz.bycodersmobile"
minSdk 23
targetSdk 33
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
}

buildFeatures {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion = "1.4.3"
}

packagingOptions {
exclude("META-INF/DEPENDENCIES")
exclude("META-INF/LICENSE")
exclude("META-INF/LICENSE.txt")
exclude("META-INF/license.txt")
exclude("META-INF/NOTICE")
exclude("META-INF/NOTICE.txt")
exclude("META-INF/notice.txt")
exclude("META-INF/ASL2.0")
exclude("META-INF/*.kotlin_module")
}
}

dependencies {
implementation project(":features:login")
implementation project(":features:home")

implementation project(":theme")
implementation project(":navigator")
implementation project(":database")
implementation project(":networking")
implementation project(":firebase")


implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.appcompat:appcompat:1.6.1'

implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'

implementation 'androidx.activity:activity-compose:1.7.2'
implementation "androidx.compose.ui:ui:1.5.0-beta01"
implementation "androidx.compose.ui:ui-tooling-preview:1.5.0-beta01"
implementation 'androidx.compose.material:material:1.4.3'

implementation "io.insert-koin:koin-core:3.4.0"
implementation "io.insert-koin:koin-android:3.4.0"
implementation "io.insert-koin:koin-androidx-compose:3.4.4"
implementation "io.insert-koin:koin-test:3.4.0"

implementation 'androidx.room:room-runtime:2.5.1'

}
29 changes: 29 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "778288842861",
"project_id": "bycodersmobile",
"storage_bucket": "bycodersmobile.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:778288842861:android:86a39a54554ee16f911764",
"android_client_info": {
"package_name": "com.dacruz.bycodersmobile"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDU2NTjL2ndcMzA4kYhPwWDv3bMPbtWlhE"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Loading