Skip to content

Commit 506cc4c

Browse files
author
adam-carbone
committed
Adding Symphonize Base examples
This is the best practices and examples that we worked out during the previous project capturing that back to the base applicaiton.
1 parent ddd0473 commit 506cc4c

File tree

212 files changed

+9362
-2860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+9362
-2860
lines changed

.github/workflows/tests.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ jobs:
44
drive:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v1
8-
- name: Write firebase_options.dart
9-
run: echo '{{ secrets.FIREBASE_OPTIONS }}' > lib/firebase_options.dart
10-
- name: Write GoogleService-info.plist
11-
run: echo '{{ secrets.GOOGLE_SERVICE_INFO_PLIST }}' > ios/Runner/GoogleService-Info.plist
12-
- name: Write google-services.json
13-
run: echo '{{ secrets.GOOGLE_SERVICES_JSON }}' > android/app/google-services.json
14-
- uses: subosito/[email protected]
15-
- name: Run Flutter tests
16-
run: flutter test
7+
- uses: actions/checkout@v1
8+
- uses: subosito/[email protected]
9+
- run: flutter pub get
10+
- run: flutter pub run build_runner build --delete-conflicting-outputs
11+
- name: Run Flutter tests
12+
run: flutter test

.gitignore

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
.buildlog/
1010
.history
1111
.svn/
12+
*.jsk
1213

1314
# IntelliJ related
1415
*.iml
@@ -17,7 +18,7 @@
1718
.idea/
1819

1920
# Visual Studio Code related
20-
#.vscode/
21+
.vscode/
2122

2223
# Flutter repo-specific
2324
/bin/cache/
@@ -46,6 +47,13 @@ unlinked.ds
4647
unlinked_spec.ds
4748
.flutter-plugins-dependencies
4849

50+
# Ignoring unsupported platforms
51+
linux
52+
macos
53+
windows
54+
web
55+
56+
4957
# Android related
5058
**/android/**/gradle-wrapper.jar
5159
**/android/.gradle
@@ -58,6 +66,10 @@ unlinked_spec.ds
5866
*.jks
5967

6068
# iOS/XCode related
69+
# commenting out the Podfile.lock because it is frequently changing and should be generated by the build
70+
# want to avoid constant branch conflicts
71+
/ios/Podfile.lock
72+
6173
**/ios/**/*.mode1v3
6274
**/ios/**/*.mode2v3
6375
**/ios/**/*.moved-aside
@@ -102,4 +114,17 @@ macos/firebase_app_id_file.json
102114
android/app/google-services.json
103115

104116
# Firebase hosting
105-
.firebase/
117+
.firebase/
118+
119+
.env
120+
.env/
121+
122+
# contains responses from Danlaw API
123+
api-response.yml
124+
125+
**/*.g.dart
126+
**/*.reflectable.dart
127+
128+
# bundle files
129+
*.apk
130+
*.aab

README.md

Lines changed: 72 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,105 @@
1-
# Time Tracking app with Flutter & Firebase
1+
<h1 id="top" align="center">Danlaw Smart Charger</h1>
22

3-
A time tracking application built with Flutter & Firebase:
3+
## Table of Contents
44

5-
![](/.github/images/time-tracker-screenshots.png)
5+
- [Description](#description)
6+
- [Features](#features)
7+
- [Roadmap](#roadmap)
8+
- [Packages](#packages)
9+
- [Support](#support)
10+
- [Design](#design)
11+
- [Screenshots](#screenshots)
12+
- [License](#license)
613

7-
This is intended as a **reference app** based on my [Riverpod Architecture](https://codewithandrea.com/articles/flutter-app-architecture-riverpod-introduction/).
8-
9-
> **Note**: this project used to be called "Started Architecture for Flutter & Firebase" (based on this [old article](https://codewithandrea.com/videos/starter-architecture-flutter-firebase/)). As of January 2023, it follows my updated [Riverpod Architecture](https://codewithandrea.com/articles/flutter-app-architecture-riverpod-introduction/), using the latest packages.
10-
11-
## Flutter web preview
12-
13-
A Flutter web preview of the app is available here:
14-
15-
- [Time Tracker | Flutter web demo](https://starter-architecture-flutter.web.app)
14+
## Description
1615

16+
Danlaw Smart Charger provides a simple interface for users to monitor the charging status of their EVs, plan custom charging schedules and setup various alerts.
17+
1718
## Features
1819

19-
- **Simple onboarding page**
20-
- **Full authentication flow** (using email & password)
21-
- **Jobs**: users can view, create, edit, and delete their own private jobs (each job has a name and hourly rate)
22-
- **Entries**: for each job, user can view, create, edit, and delete the corresponding entries (an entry is a task with a start and end time, with an optional comment)
23-
- **A report page** that shows a daily breakdown of all jobs, hours worked and pay, along with the totals.
24-
25-
All the data is persisted with Firestore and is kept in sync across multiple devices.
20+
- **Account**: New users need to create an account to access the features of the app.
21+
- **Authentication**: After account creation, users can login with email & password.
22+
- **Household**:
23+
- Users can add up to 3 households per account.
24+
- Household details can be changed.
25+
- **Charger**:
26+
- Users can add up to 3 chargers per household.
27+
- Chargers can be added with scanning a QR code or Bluetooth flow.
28+
- **Vehicle**:
29+
- Users can add up to 6 vehicles per household.
30+
- Vehicles can be added with scanning a QR code or Bluetooth flow.
31+
- Diagnostic Trouble Codes can be accessed from details page.
32+
- **Alert**:
33+
- Alerts are grouped by Vehicles and Chargers.
34+
- Users can be alerted by Push Notifications, Email and SMS.
35+
- Alerts can be set based on remaining miles, charge status, etc..
36+
- **Schedule**: Users can see and set charging schedules for the week.
37+
- **Reports**: Energy reports are available for all the vehicles and chargers. Table can be grouped by chargers.
2638

2739
## Roadmap
2840

29-
- [ ] Add missing tests
30-
- [x] Stateful Nested Navigation (available since GoRouter 7.1)
31-
- [ ] Use controllers / notifiers consistently across the app (some code still needs to be updated)
32-
- [ ] Add localization
33-
- [ ] Use the new Firebase UI packages where useful
34-
- [ ] Responsive UI
35-
36-
> This is a tentative roadmap. There is no ETA for any of the points above. This is a low priority project and I don't have much time to maintain it.
37-
38-
## Relevant Articles
41+
- [ ] Update Add Charger Flow
42+
- [ ] Update Add Vehicle Flow
43+
- [ ] Add more tests
44+
- [ ] Add language selection
3945

40-
The app is based on my Flutter Riverpod architecture, which is explained in detail here:
46+
>**Note:** Some of the items on the roadmap might be tackled at the next phase of development.
4147
42-
- [Flutter App Architecture with Riverpod: An Introduction](https://codewithandrea.com/articles/flutter-app-architecture-riverpod-introduction/)
43-
- [Flutter Project Structure: Feature-first or Layer-first?](https://codewithandrea.com/articles/flutter-project-structure/)
44-
- [Flutter App Architecture: The Repository Pattern](https://codewithandrea.com/articles/flutter-repository-pattern/)
45-
46-
More more info on Riverpod, read this:
47-
48-
- [Flutter Riverpod 2.0: The Ultimate Guide](https://codewithandrea.com/articles/flutter-state-management-riverpod/)
49-
50-
## Packages in use
48+
## Packages
5149

5250
These are the main packages used in the app:
5351

5452
- [Flutter Riverpod](https://pub.dev/packages/flutter_riverpod) for data caching, dependency injection, and more
5553
- [Riverpod Generator](https://pub.dev/packages/riverpod_generator) and [Riverpod Lint](https://pub.dev/packages/riverpod_lint) for the latest Riverpod APIs
5654
- [GoRouter](https://pub.dev/packages/go_router) for navigation
57-
- [Firebase Auth](https://pub.dev/packages/firebase_auth) and [Firebase UI Auth](https://pub.dev/packages/firebase_ui_auth) for authentication
58-
- [Cloud Firestore](https://pub.dev/packages/cloud_firestore) as a realtime database
59-
- [Firebase UI for Firestore](https://pub.dev/packages/firebase_ui_firestore) for the `FirestoreListView` widget with pagination support
60-
- [RxDart](https://pub.dev/packages/rxdart) for combining multiple Firestore collections as needed
61-
- [Intl](https://pub.dev/packages/intl) for currency, date, time formatting
55+
- [Intl](https://pub.dev/packages/intl) for date, time formatting
6256
- [Mocktail](https://pub.dev/packages/mocktail) for testing
6357
- [Equatable](https://pub.dev/packages/equatable) to reduce boilerplate code in model classes
58+
- [flutter_blue_plus](https://pub.dev/packages/flutter_blue_plus) to communicate with Charger and Vehicle via Bluetooth
59+
- [Reflectable](https://pub.dev/packages/reflectable) to automate widget generation from bespoke objects
6460

6561
See the [pubspec.yaml](pubspec.yaml) file for the complete list.
6662

67-
## Running the project with Firebase
68-
69-
To use this project with Firebase, follow these steps:
70-
71-
- Create a new project with the Firebase console
72-
- Enable Firebase Authentication, along with the Email/Password Authentication Sign-in provider in the Firebase Console (Authentication > Sign-in method > Email/Password > Edit > Enable > Save)
73-
- Enable Cloud Firestore
74-
75-
Then, follow one of the two approaches below. 👇
63+
## Support
64+
Application support by [Danlaw](https://danlawtechnologies.com/contactus).
7665

77-
### 1. Using the CLI
66+
Platform support:
67+
- Android: SDK 34+
68+
- iOS: iOS 17.0+
7869

79-
Make sure you have the Firebase CLI and [FlutterFire CLI](https://pub.dev/packages/flutterfire_cli) installed.
70+
Localization support:
71+
- United States English
72+
- Canadian French
73+
- Mexican Spanish
8074

81-
Then run this on the terminal from the root of this project:
75+
Currently application uses default language of the device. If device language is not supported defaults to Engligh.
8276

83-
- Run `firebase login` so you have access to the Firebase project you have created
84-
- Run `flutterfire configure` and follow all the steps
77+
## Design
8578

86-
For more info, follow this guide:
79+
Current designs for this application can be found at [Figma](https://www.figma.com/design/Ji08JojX9t4N5U4uhjgH55/DAN003---EV-Charger-App?node-id=315-20822&t=r8H62xjxlTNpKI6r-0).
8780

88-
- [How to add Firebase to a Flutter app with FlutterFire CLI](https://codewithandrea.com/articles/flutter-firebase-flutterfire-cli/)
81+
## Screenshots
8982

90-
### 2. Manual way (not recommended)
83+
<p >
84+
<img src="assets/readme_assets/start.png" height="400">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
85+
<img src="assets/readme_assets/landing_empty.png" height="400">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
86+
<img src="assets/readme_assets/landing_full.png" height="400">
87+
</p>
88+
<p >
89+
<img src="assets/readme_assets/alert_main.png" height="400"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
90+
<img src="assets/readme_assets/alert_config.png" height="400"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
91+
<img src="assets/readme_assets/report_table.png" height="400">
92+
</p>
93+
<p >
94+
<img src="assets/readme_assets/add_charger.png" height="400">
95+
<img src="assets/readme_assets/add_dongle.png" height="400">
96+
<img src="assets/readme_assets/report_main.png" height="400">
97+
</p>
9198

92-
If you don't want to use FlutterFire CLI, follow these steps instead:
9399

94-
- Register separate iOS, Android, and web apps in the Firebase project settings.
95-
- On Android, use `com.example.starter_architecture_flutter_firebase` as the package name.
96-
- then, [download and copy](https://firebase.google.com/docs/flutter/setup#configure_an_android_app) `google-services.json` into `android/app`.
97-
- On iOS, use `com.example.starterArchitectureFlutterFirebase` as the bundle ID.
98-
- then, [download and copy](https://firebase.google.com/docs/flutter/setup#configure_an_ios_app) `GoogleService-Info.plist` into `iOS/Runner`, and add it to the Runner target in Xcode.
100+
## License
101+
Copyright © 2024. All rights reserved by [Danlaw](https://danlawtechnologies.com/terms-conditions).
99102

100-
That's it. Have fun!
103+
<br><br>
101104

102-
## [License: MIT](LICENSE.md)
105+
[Back to Top](#top)

assets/AppIcon-no_background.svg

Lines changed: 41 additions & 0 deletions
Loading

assets/add_button_icon.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)