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

Leandro Forte - Flutter Coding Test #75

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Changes from 4 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2c3fce1
create flutter project
Feb 6, 2024
f80178a
remove unnecessary comments
Feb 6, 2024
480508e
Merge pull request #1 from leandromichelforte/merge-main/project/flut…
leandromichelforte Feb 6, 2024
61742cc
add core folder; home, qr_code and scan: added tests on presenter lay…
Feb 7, 2024
084b9d2
creating get qr code usecase, repository, datasource and its tests
Feb 7, 2024
64dcd2e
finishing qr code page, cubit and its tests
Feb 8, 2024
3afb43c
deal with permission on scan page, refactor widgets and strings and f…
Feb 8, 2024
144f12c
Merge pull request #2 from leandromichelforte/feature/qr_code_scan
leandromichelforte Feb 8, 2024
b30cb90
Merge pull request #3 from leandromichelforte/develop
leandromichelforte Feb 8, 2024
1fd723c
add node js backend to return the seed
Feb 8, 2024
3bfaa4a
Merge pull request #4 from leandromichelforte/feature/backend
leandromichelforte Feb 8, 2024
6b8e84d
refactor inject, add dio, retrieve from node backend and fix tests
Feb 8, 2024
dcf2bb6
rename from expireAt to expiresAt
Feb 8, 2024
b01cff4
change key value from returned value from expireAt to expiresAt
Feb 8, 2024
1074306
add generic and api exception, throws news exceptions in qr code data…
Feb 8, 2024
a4a3429
Merge pull request #5 from leandromichelforte/feature/connect_flutter…
leandromichelforte Feb 8, 2024
999e1ab
Merge pull request #6 from leandromichelforte/develop
leandromichelforte Feb 8, 2024
e1a5dd0
remove time zone offset from expires_at and add 1 minute from now
Feb 8, 2024
28bf721
Merge pull request #7 from leandromichelforte/bugfix/expires_at
leandromichelforte Feb 8, 2024
23e1235
Merge pull request #8 from leandromichelforte/master
leandromichelforte Feb 8, 2024
7efc17c
add app documentation
Feb 8, 2024
300b593
Merge pull request #9 from leandromichelforte/project/documentation
leandromichelforte Feb 8, 2024
687078d
Merge pull request #10 from leandromichelforte/develop
leandromichelforte Feb 8, 2024
1ec2ecc
adjust tab in app doc md file
Feb 8, 2024
56204d1
Merge pull request #11 from leandromichelforte/project/documentation
leandromichelforte Feb 8, 2024
4b5ce96
Merge pull request #12 from leandromichelforte/develop
leandromichelforte Feb 8, 2024
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
88 changes: 88 additions & 0 deletions app-documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
## Overview 📈
This is an app to measure my engineering and development skills.

## Requirements ✅
- Good use of structure, security, and performance best practices ✓
- Solid testing approach ✓
- Extensible code ✓
- Auto-refresh ✓

## Features ✅
- API Server ✓
- Developed a simple backend in NodeJS. You can find at _./mobile-test-backend_ folder
- Call the Seed endpoint ✓
- With the _QrCodeUsecase_ I make the request in my backend retrieving the _QrCodeEntity_ which has the _seed_ and _expiresAt_ variables
- Scan ✓
- I developed the feature with the package *[qr_code_scanner](https://pub.dev/packages/qr_code_scanner)* and displaying the data to the user
- UI requirements ✓
- I built the pages and components according with the provided mock-up
- Documentation ✓
- Described all features and how to execute the code
- Tests ✓
- All unit and pages tests to ensure the app will work correctly
- Clear commits ✓
- I'm always writing concise message in my commits to make an easier understanding for who is reading

## App Structure 📱
- To show my knowledge and skills to build an app scalable and maintainable, I developed following the Clean Architechture
- With *[dartz](https://pub.dev/packages/dartz)* I guarantee the error will be handled
- Used best principles, conecpts and patterns were used. For example, S.O.L.I.D, Clean Code, DRY, Return Early, etc...
- BLoC and Cubit for state management
- GetIt to inject my dependecies
- Used Mocktail to make the test coverage over 90%
![test_coverage](https://i.ibb.co/TcgpShC/Screenshot-2024-02-02-at-23-38-44.png)

## Development environment 👨‍💻
- Flutter (Channel stable, 3.16.9, on macOS 13.3.1 22E772610a darwin-arm64, locale en-BR)
- Android toolchain - develop for Android devices (Android SDK version 33.0.2)
- Xcode - develop for iOS and macOS (Xcode 14.2)
- VS Code (version 1.86.0)

## Getting Started 🟢
##### Requirements
- [Flutter](https://flutter.dev/docs/get-started/install) and [NodeJS](https://nodejs.org/en) must be installed on your machine
##### Steps
1. Clone the repository
```bash
git clone https://github.com/leandromichelforte/mobile-test.git
```
2. Install Flutter dependencies
```bash
cd mobile-test/
flutter pub get
```
3. Install NodeJS dependencies
```bash
cd mobile-test-backend/
npm install
```
4. Run NodeJS server
```bash
node server.js
```
5. In another CLI and with your NodeJS server running, go to the project root folder and run the Flutter app
```bash
flutter run
```
##### Tests
- Run the tests
```bash
flutter test --coverage
```

## Packages 📦
- [BLoC](https://pub.dev/packages/bloc)
- [Flutter BLoC](https://pub.dev/packages/flutter_bloc)
- [BLoC Test](https://pub.dev/packages/bloc_test)
- [Dartz](https://pub.dev/packages/dartz)
- [Equatable](https://pub.dev/packages/equatable)
- [Mocktail](https://pub.dev/packages/mocktail)
- [Flutter Speed Dial](https://pub.dev/packages/flutter_speed_dial)
- [QR Code Scanner](https://pub.dev/packages/qr_code_scanner)
- [GetIt](https://pub.dev/packages/get_it)
- [QR Flutter](https://pub.dev/packages/qr_flutter)
- [Shimmer](https://pub.dev/packages/shimmer)
- [Dio](https://pub.dev/packages/dio)

## Support and Feedback 📞
If you have any questions or feedback please contact me [[email protected]](mailto:[email protected])