top of page

Week-19: Coding Phase

This week was considered as the coding week. This week we talked about our code, programming languages used, challenges faced, and troubleshooting.


Firebase Authentication:

This section covers the code for the user authentication part of the application. FirebaseAuth , a backend end service provided by the Firebase, is used for handling the user authentication and storing the record of authenticated users.


User Logged In:

This is the code to navigate the splash screen based on the login status of the user. If the user is logged in, then it would be navigate to the Homepage of the application, else, it navigates to the Welcome Screen, through which the user could login.

In this code, '_auth' is set a an instance of FirebaseAuth, 'user' i s a declared to check the current logged in user. If 'user' is null, after a duration of 3 seconds, the application would navigate to HomePage through 'NavigationMenu', which would in turn direct to the Homepage else, the application would navigate to 'WelcomeScreen'


Login:


This part handles the user authentication process of the application. Upon successful authentication, the user would be directed to the HomePage.

In this code, '_auth' is set a an instance of FirebaseAuth and two TextEditingControllers have been added that would be used to store the user inputs to the TextFields.

  • 'emailController' is used to get the email address entered by the user

  • 'passwordController' is used to get the password entered by the user

The 'login()' function handles the login process of the application. Once the enters the desired inputs, it tries to sign the user into the application using the email and password provided by the user using the 'signInWithEmailAndPassword()' method. If the user is authenticated, the application would navigate to HomePage through 'NavigationMenu'. if the application fails to authenticate the user, error would be displayed as a toast message.


Signup:

This part handles the signup process of the application. Upon successful registeration, the user would be directed to the Registeration Page where the user will have to enter their personal and medical details.

In this code, '_auth' is set a an instance of FirebaseAuth and two TextEditingControllers have been added that would be used to store the user inputs to the TextFields.

  • 'emailController' is used to get the email address entered by the user

  • 'passwordController' is used to get the password entered by the user

The 'signUp()' function handles the signup process of the application. Once the enters the desired inputs, it creates the user using the email and password provided by the user through the 'createUserWithEmailAndPassword()' method. If the user is created and the credentials are met, the application would navigate to 'RegisterationForm'. If the application fails to create the user, an error will be displayed as a toast message.


Project Development:

This week, I worked on the chatbot implementation for the application. After rigorous research I decided to use, the Falcon-7B model for creating the backend interface for my chatbot. The backend system was built using Python and the API was designed using Flask. Furthermore, I worked on adding the Medical Profile section of the application to the Home page. This feature would mainly keep track of all the patient's medical reports and medical history.

Recent Posts

See All

Week 22:

This week, Mr. Roshan gave us the format of our final Presentation for our final demo. Along with sharing the structure, he also shared...

Week 21: Implementation Week

This week Mr. Roshan explained the structure of our final report and what information needs to be added to it. He also shared a sample to...

Comments


bottom of page