Skip to content

Commit

Permalink
Updated Doc and Code (#33)
Browse files Browse the repository at this point in the history
* Security Rules Updated

* Hot reload fix

* README UPDATED

* Readme style fix

* Updated Readme

* Updated Readme 2.0

* Updated Doc With Code
  • Loading branch information
zhu-j-faceonlive committed Jan 17, 2022
1 parent 65a5d7f commit c06ae42
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 12 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

An App Made with Face SDK

<img src="cover_image.png">
![cover_image](docs/github_cover.png)

## Before we get started
- 👉 For now, Our app does support only Android platform (arm64).

- 👉 You will need a new AAR Library if you are creating this app on your own or changning the package name.

- 🚀 If you are looking the code in a code editor.You can hover over it to see the info of a particular function or classes. 👇
<img src="docs/hovering_over_class_or_functions.png">
![hovering_over_functions](docs/hovering_over_class_or_functions.png)
- 🙋🏽‍♂️ We are improving the codebase and trying to make it better,but you may see some legacy codes. 🔥


Expand Down Expand Up @@ -38,10 +38,10 @@ An App Made with Face SDK

- Step-5: Get a Google Map SDK key from Google API [*if you want geolocatio based verification]
- Follow the below steps [In Order]:<br>
<img src="docs/android_map_sdk.png" alignment="left"><br>
<img src="docs/tap_on_credentials.png"><br>
![map_doc_1](docs/android_map_sdk.png)
![map_doc_2](docs/tap_on_credentials.png)<br>
- Tap on Create Credintials, after creating you will see something like this.
<img src="docs/map_api_key.png"><br>
![map_doc_3](docs/map_api_key.png)<br>
- Now add the google map api key *"android/app/src/main/AndroidManifest.xml"* in application tag
``` xml
<meta-data android:name="com.google.android.geo.API_KEY"
Expand All @@ -57,7 +57,14 @@ An App Made with Face SDK

- Step-7: Now open a emulator or connect a device with your development machine and open the code editor of your choice and You will see a run button on the **main.dart** file if you have installed flutter extension on vscode. if not then go to your project root directory and run **_flutter run_** from the terminal. It will build the apk and install the app on the device or emulator.

### Common Errors :
- Step-8: After everything has been setted up, copy and paste the code from **firestore.rules** to the Firebase firestore security rules. This file is included with the project.

### How the data is structured:
![data_1](docs/database_visualization/face_attendance_data_1.png)
![data_2](docs/database_visualization/face_attendance_data_2.png)
![data_3](docs/database_visualization/face_attendance_data_3.png)

### Common Errors you can get :
- Error_1: If you see red lines or a lot problems in the debug/problems tab, just run **flutter pub get** in the terminal. This happens because on initial stage your projects doesn't have reference to the cached plugin.
- Error_2: If you see init SDK (number) error (on debugging). just uninstall and reinstall the app. it will fix the issue.
- Error_3: If you see some weird plugin errors run this command in terminal it will reset the plugin cache.
Expand Down Expand Up @@ -99,7 +106,7 @@ You can learn more about our sdk here **[faceonlive.com]**. We always encourage
> [Follow] this repo ❤️

If you liked our project you can give a star to let us know. Thank you for your time. Have a great day. ❤️


<!-- REFERENCES -->
[flutter]:https://docs.flutter.dev/get-started/install
Expand Down
Binary file removed cover_image.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/github_cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ service cloud.firestore {

/// Attendance Modification
match /users/{userID}/attendance/{spaceID}/data/{year}{
allow create: if isSpaceOwnerAttendance(spaceID, request.auth.uid) ||isAttendanceOwner(userID);
allow read: if isSpaceOwnerAttendance(spaceID, request.auth.uid) ||isAttendanceOwner(userID);
allow update: if isSpaceOwnerAttendance(spaceID, request.auth.uid) ||isAttendanceOwner(userID);
allow delete: if isSpaceOwnerAttendance(spaceID, request.auth.uid);
Expand Down
6 changes: 4 additions & 2 deletions lib/core/auth/views/pages/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import '../../../utils/form_verify.dart';
import '../../../themes/text.dart';
import '../../../widgets/app_button.dart';
import '../../controllers/login_controller.dart';
import 'login_page_face.dart';
import 'register_as_admin_page.dart';
import 'sign_up_page.dart';

Expand Down Expand Up @@ -91,11 +92,12 @@ class _LoginPageState extends State<LoginPage> {
appBar: AppBar(
leading: const SizedBox(),
actions: const [
// Face Login Button
// InkWell(
// onTap: () {
// Get.to(() => const LoginScreenAlt());
// Get.to(() => const LoginPageFace());
// },
// borderRadius: AppDefaults.defaulBorderRadius,
// borderRadius: AppDefaults.borderRadius,
// child: Padding(
// padding: const EdgeInsets.all(16.0),
// child: Image.asset(
Expand Down
2 changes: 1 addition & 1 deletion lib/core/auth/views/pages/login_page_face.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class _LoginPageFaceState extends State<LoginPageFace>
Column(
children: [
Text(
'Login With Face Verification',
'Face Login',
style: AppText.h5.copyWith(
fontWeight: FontWeight.bold,
color: AppColors.primaryColor,
Expand Down
3 changes: 1 addition & 2 deletions lib/features/05_members/views/pages/member_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ class MemberInfoScreen extends StatelessWidget {
],
),
Chip(
label: Text(
member.isCustom ? 'Member is Custom' : 'A User of this app'),
label: Text(member.isCustom ? 'Custom Member' : 'App User'),
),
member.isCustom
? AppButtonOutline(
Expand Down

0 comments on commit c06ae42

Please sign in to comment.