Skip to content

Commit

Permalink
docs: update README.md for more details about my project
Browse files Browse the repository at this point in the history
docs: add screenshots
fix: fix some bug about avatar
  • Loading branch information
dungngminh committed Dec 28, 2021
1 parent b3d947d commit 6e9e838
Show file tree
Hide file tree
Showing 51 changed files with 250 additions and 28 deletions.
206 changes: 200 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,205 @@
# happy_care
# Happy-Care

A new Flutter project.
Online health consultation application built with Flutter for Client, ExpressJs for Backend Server.

## Getting Started
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/6ade1e4b31d343f7863ddf652c17d7be)](https://www.codacy.com/gh/komkat-studio/happy-care-mobile/dashboard?utm_source=github.com&utm_medium=referral&utm_content=komkat-studio/happy-care-mobile&utm_campaign=Badge_Grade)
[![Flutter](https://img.shields.io/badge/Made%20with-Flutter-blue.svg)](https://flutter.dev/)

-
## Features

This project is a starting point for a Flutter application.
- Finding doctors, specializations by symptoms. <b>(Currently, the feature is based on database, will upgrade with machine learning later)</b>
- Getting online doctors, busy doctors.
- Asking member user about feeling today for finding doctor (30 mins loop).
- Chatting, sending image 1v1 between doctors and members.
- Doctors can create a new prescription for members.
- Finding doctors by specialization.
- User information CRUD.

A few resources to get you started if this is your first Flutter project:
## Technology used

- Flutter GetX pattern, [GetX](https://pub.dev/packages/get) for state management.
- Authentication and Authorization using JWT.
- Backend using NodeJS, MongoDB.
- Realtime event using Socket.io.
- Cloudinary for storing images.

## Directory structure

```
project
│ README.md
└───lib
│ |
│ └───core
│ | |
│ │ └───helpers <--[Helpers function like customShowDialog(context)]
│ | |
│ │ └───themes <--[Colors]
│ | |
│ │ └───utils <--[logger, validator, cache manager, sharedPref,..]
│ │
│ └───data
│ | |
│ │ └───api <-[Provider data from remote]
│ | |
│ │ └───models
│ | |
│ │ └───repositories
│ | |
│ │ └───services
│ | |
│ │ └───socket_io_service.dart <--[Socket.io service]
│ │ |
│ │ └───cloudinary_service.dart <--[Cloudinary service]
│ │
│ └───modules <-[Screens, Controllers, Binding,... support modules]
│ |
│ └───routes <-[Define routes and pages for named navigator, binding]
│ |
│ └───widgets <-[Common widgets for reusing]
│ |
│ └───main.dart
└───assets
└───icons
|
└───images
|
└───logos
|
└───lottie <-[lottie animation]
|
└───.env <-[.env for environment]
```

## Setup and run

<details>
<summary>Click to expand</summary>
<br>

- Download APK
- [APK - arm64](https://drive.google.com/file/d/1NBD3iTm6hxryz5kGPIbyQLOaGl7lI4kH/view)
- Setup and run
- Flutter
- Install [Flutter](https://flutter.dev/docs/get-started/install).
- Using **`stable`** channel:
```bash
❯ flutter channel stable
❯ flutter upgrade
```
- Flutter doctor:
```bash
❯ flutter doctor
```
- Install all the packages by:
```bash
❯ flutter pub get
```
- Create .env file `assets/.env` has following structure:
```bash
BASE_URL=https://komkat-happy-care.herokuapp.com
```
- Run app on real devices or emulator by:
```bash
❯ flutter run
```
or debug mode in VSCode or some IDEs

</details>

## Screenshots (Running Stable in Mi 9)

Sorry for some UIs are not designed in advance, not as beautiful as the intro, sign in, sign up because there is no time, just code in mind :(

### Splash, Intro, SignIn, SignUp

<details>
<summary>View Screenshots</summary>
<br>

| | | |
| :-------------------------: | :-------------------------: | :-------------------------: |
| Splash Screen | Intro1 | Intro2 |
| ![](screenshots/splash.png) | ![](screenshots/intro1.png) | ![](screenshots/intro2.png) |
| Intro3 | Intro4 | |
| ![](screenshots/intro3.png) | ![](screenshots/intro4.png) | ![]() |
| Sign In | Sign Up | |
| ![](screenshots/signin.png) | ![](screenshots/signup.png) | ![]() |

</details>

### Main Screen (Member Role)

<details>
<summary>View Screenshots</summary>
<br>

| | | |
| :-----------------------------------------------------: | :------------------------------------: | :-------------------------------------------: |
| Home Screen | Choose if you feel good | Choose if you feel bad to finding doctor |
| ![](screenshots/home_user.png) | ![](screenshots/if_choose_good.png) | ![](screenshots/if_choose_not_good.png) |
| More Symptoms | Result for choosing symptoms | Choose Doctor |
| ![](screenshots/more_symptom.png) | ![](screenshots/result.png) | ![](screenshots/choose_doctor_by_symptom.png) |
| Search | Chat Screen | Chat Room |
| ![](screenshots/search.png) | ![](screenshots/chat_user_history.png) | ![](screenshots/chat_room.png) |
| Chat With Typing Event Socket | Image Preview Before Sending | All Prescriptions |
| ![](screenshots/chat_with_typing_event_socket_user.png) | ![](screenshots/image_user.png) | ![](screenshots/prescription_member.png) |
| Detail Prescription | Detail Information Member role | Edit Information |
| ![](screenshots/detail_prescription.png) | ![](screenshots/detail_user.png) | ![](screenshots/edit_user_detial.png) |
| Detail Information Doctor | Change password dialog | Dialog choose avatar |
| ![](screenshots/detail_doctor.png) | ![](screenshots/change_pass.png) | ![](screenshots/dialog_image_choose_edit.png) |

</details>

### Main Screen (Doctor Role)

<details>
<summary>View Screenshots</summary>
<br>

| | | |
| :------------------------------------------------: | :--------------------------------------: | :-----------------------------------------------: |
| Home Screen | Chat Screen | Chat Room |
| ![](screenshots/home_doctor.png) | ![](screenshots/chat_doctor_history.png) | ![](screenshots/chat_room_doctor.png) |
| Chat With Typing Event Socket | Create Precription | Image Preview Before Sending |
| ![](screenshots/chat_with_typing_event_socket.png) | ![](screenshots/create_precription.png) | ![](screenshots/send_mess_with_image_preview.png) |
| All Prescriptions | Detail Prescription | Edit a Prescription |
| ![](screenshots/prescription.png) | ![](screenshots/detail.png) | ![](screenshots/edit_detail.png) |
| Detail Information Doctor role | Edit Information | Dialog choose avatar |
| ![](screenshots/user_doctor.png) | ![](screenshots/edit_user.png) | ![](screenshots/dialog_image_choose_edit.png) |

</details>

### Some gif(s)

<details>
<summary>View gif(s)</summary>
<br>

| |
| :------------------------------------------------------------------------------: |
| Finding Doctor By Symptoms |
| <img src="screenshots/finding_doctor_by_symptom.gif" width="200" height="450" /> |

</details>

## Contributors ✨

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><img src="https://avatars.githubusercontent.com/u/63831488?v=4" width="100px;" alt=""/><br /><sub><b>Nguyễn Minh Dũng</b></sub></a><br /><a href="https://github.com/komkat-studio/happy-care-mobile/commits?author=dungngminh" title="Code">💻</a> <a href="https://github.com/komkat-studio/happy-care-mobile/commits?author=dungngminh" title="Documentation">📖</a>
</tr>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
2 changes: 2 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ android {
signingConfig signingConfigs.debug
}
}

}

flutter {
Expand All @@ -66,3 +67,4 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

2 changes: 1 addition & 1 deletion lib/core/utils/custom_cache_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class CustomCacheManager {
static final customCacheManager = CacheManager(Config(
cacheKey,
stalePeriod: const Duration(days: 2),
maxNrOfCacheObjects: 50,
maxNrOfCacheObjects: 25,
repo: JsonCacheInfoRepository(databaseName: cacheKey),
fileService: HttpFileService(),
));
Expand Down
7 changes: 5 additions & 2 deletions lib/data/services/my_cloudinary_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ class MyCloudinaryService {
Future<String?> uploadFileOnCloudinary({required String filePath}) async {
try {
var response = await cloudinary!.uploadFile(
CloudinaryFile.fromFile(filePath,
folder: "Image", resourceType: CloudinaryResourceType.Image),
CloudinaryFile.fromFile(
filePath,
folder: "Image",
resourceType: CloudinaryResourceType.Image,
),
);
print("URL is" + response.secureUrl);
return response.secureUrl;
Expand Down
19 changes: 13 additions & 6 deletions lib/modules/home/home_doctor_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,19 @@ class HomeDoctorScreen extends GetView<HomeController> {
child: Padding(
padding: const EdgeInsets.all(2.0),
child: CircleAvatar(
backgroundColor: kSecondColor,
backgroundImage: CachedNetworkImageProvider(
controller.user.value.profile!.avatar!,
cacheManager:
CustomCacheManager.customCacheManager,
),
backgroundColor: Colors.white,
backgroundImage:
controller.user.value.profile?.avatar ==
null
? Image.asset(
"assets/images/doctor.png")
.image
: CachedNetworkImageProvider(
controller.user.value.profile!
.avatar!,
cacheManager: CustomCacheManager
.customCacheManager,
),
),
),
),
Expand Down
14 changes: 10 additions & 4 deletions lib/modules/home/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,16 @@ class HomeScreen extends GetView<HomeController> {
child: Padding(
padding: const EdgeInsets.all(2.0),
child: CircleAvatar(
backgroundImage: CachedNetworkImageProvider(
userController
.user.value.profile!.avatar!,
),
backgroundColor: Colors.white,
backgroundImage: userController
.user.value.profile?.avatar ==
null
? Image.asset("assets/images/blank.png")
.image
: CachedNetworkImageProvider(
userController
.user.value.profile!.avatar!,
),
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/sign_in/sign_in.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class SignInScreen extends GetView<SignInController> {
color: kMainColor,
fontWeight: FontWeight.w500,
textBaseline: TextBaseline.alphabetic,
),
),
),
onFieldSubmitted: (value) {
controller.btnController.start();
Expand Down
7 changes: 5 additions & 2 deletions lib/modules/user/edit_information/edit_infomation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ class EditInformationScreen extends GetView<EditInformationController> {
.customCacheManager,
))
: CircleAvatar(
backgroundColor: Colors.white,
backgroundImage: Image.asset(
"assets/images/blank.png")
.image);
controller.user.role == "doctor"
? "assets/images/doctor.png"
: "assets/images/blank.png",
).image);
} else {
return CircleAvatar(
backgroundColor: kSecondColor,
Expand Down
3 changes: 2 additions & 1 deletion lib/modules/user/user_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ class UserScreen extends GetView<UserController> {
GetBuilder<UserController>(builder: (controller) {
return controller.user.value.profile?.avatar == null
? CircleAvatar(
backgroundColor: Colors.white,
backgroundImage:
Image.asset("assets/images/icon.png")
Image.asset("assets/images/blank.png")
.image,
)
: CircleAvatar(
Expand Down
1 change: 1 addition & 0 deletions lib/modules/user/user_screen_doctor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class UserDoctorScreen extends GetView<UserController> {
GetBuilder<UserController>(builder: (controller) {
return controller.user.value.profile?.avatar == null
? CircleAvatar(
backgroundColor: Colors.white,
backgroundImage:
Image.asset("assets/images/doctor.png")
.image,
Expand Down
15 changes: 10 additions & 5 deletions lib/widgets/custom_card_scroll.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,16 @@ class CustomCardScroll extends StatelessWidget {
child: Stack(
fit: StackFit.expand,
children: <Widget>[
CachedNetworkImage(
imageUrl: list[i].profile!.avatar!,
fit: BoxFit.cover,
cacheManager: CustomCacheManager.customCacheManager,
),
list[i].profile?.avatar == null
? Image.asset(
"assets/images/doctor.png",
fit: BoxFit.cover,
)
: CachedNetworkImage(
imageUrl: list[i].profile!.avatar!,
fit: BoxFit.cover,
cacheManager: CustomCacheManager.customCacheManager,
),
Align(
alignment: Alignment.bottomLeft,
child: Padding(
Expand Down
Binary file added screenshots/change_pass.png
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 screenshots/chat_doctor_history.png
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 screenshots/chat_room.png
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 screenshots/chat_room_doctor.png
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 screenshots/chat_user_history.png
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 screenshots/chat_with_typing_event_socket.png
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 screenshots/choose_doctor_by_symptom.png
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 screenshots/create_precription.png
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 screenshots/detail.png
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 screenshots/detail_doctor.png
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 screenshots/detail_prescription.png
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 screenshots/detail_user.png
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 screenshots/dialog_image_choose_edit.png
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 screenshots/edit_detail.png
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 screenshots/edit_user.png
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 screenshots/edit_user_detial.png
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 screenshots/finding_doctor_by_symptom.gif
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 screenshots/home_doctor.png
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 screenshots/home_user.png
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 screenshots/if_choose_good.png
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 screenshots/if_choose_not_good.png
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 screenshots/image_user.png
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 screenshots/intro1.png
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 screenshots/intro2.png
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 screenshots/intro3.png
Binary file added screenshots/intro4.png
Binary file added screenshots/more_symptom.png
Binary file added screenshots/prescription.png
Binary file added screenshots/prescription_member.png
Binary file added screenshots/result.png
Binary file added screenshots/search.png
Binary file added screenshots/search_by_spec.png
Binary file added screenshots/send_mess_with_image_preview.png
Binary file added screenshots/sign_out_change_pass.png
Binary file added screenshots/signin.png
Binary file added screenshots/signup.png
Binary file added screenshots/splash.png
Binary file added screenshots/user_doctor.png
Binary file added screenshots/webview.png

0 comments on commit 6e9e838

Please sign in to comment.