Skip to content

UltimateHealth is an innovative open source project that serves as an online library and article management application focused on health.

License

Notifications You must be signed in to change notification settings

SB2318/UltimateHealth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UltimateHealth

About:

UltimateHealth is an innovative open-source project that aims to provide a comprehensive online library and article management application focused on health. The project is designed to cater to users looking for reliable and trustworthy information on various health-related topics.

Features:

From the beginner's perspective, the]is project consists of three main modules: Article Section, Chat Section, and Podcasts. The Article Section includes:

  • Diseases-related information
  • General health-related guidance
  • Survival experiences from critical diseases
  • Backend Development

Users can also listen to articles(audio features) if they prefer. The Chat Section features a guide bot that helps users solve health-related problems.

Hello! Congratulations to all the GSSOC'24 contributors and mentors!🎉 I'm thrilled to be a part of this amazing team and excited to work together to make the Ultimate Health project a huge success. Let's collaborate, learn, and grow together!

Project Requirements:

  • Java Installed on your machine. (Java version: 17)
  • Android Studio installed on your machine.

Install JDK:

To ensure that your project runs smoothly, make sure you have Java 17 installed on your system. You can follow these steps to set up Java 17:

  • Visit the Oracle website or the OpenJDK website to download the Java 17 JDK (Java Development Kit) for your operating system.
  • Follow the installation instructions provided for your specific operating system.

Installing JDK 17 on macOS:

  • Visit the Oracle JDK download page or the AdoptOpenJDK website.
  • Download the JDK 17 installer for macOS (e.g., .dmg or .pkg file).
  • Open the downloaded installer and follow the installation instructions.
  • After the installation is complete, you can verify the installation by opening a Terminal window and running the command java -version. It should display the installed JDK version.

Setting JAVA_HOME on macOS:

  • Open a Terminal window.

  • Determine the installation path of JDK 17. You can use the java_home command to find the path by running /usr/libexec/java_home -v 17.

  • Copy the JDK installation path.

  • Create or edit the .zshrc file in your user home directory by running nano ~/.zshrc in the Terminal.

  • Add the following line to the file, replacing <JDK_PATH> with the copied JDK installation path:

    export JAVA_HOME=<JDK_PATH>

  • Save the file and exit the text editor.

  • Close the Terminal window and open a new one to apply the changes.

  • To verify that JAVA_HOME is set correctly, run the command echo $JAVA_HOME in the Terminal. It should display the JDK installation path.

Installing JDK 17 on Windows:

  • Visit the Oracle JDK download page or the AdoptOpenJDK website.
  • Download the JDK 17 installer for Windows (e.g., .exe file).
  • Run the downloaded installer and follow the installation instructions.
  • After the installation is complete, you can verify the installation by opening a Command Prompt window and running the command java -version. It should display the installed JDK version.

Setting JAVA_HOME on Windows:

  • Right-click on the Windows Start button and select "System".
  • In the System window, click on "Advanced System Settings" on the left sidebar.
  • Click the "Environment Variables" button.
  • Under the "System Variables" section, click "New".
  • Enter JAVA_HOME as the Variable name.
  • Enter the path to the JDK 17 installation directory (e.g., C:\Program Files\Java\jdk-17) as the Variable value.
  • Click "OK" to save the variable.
  • Click "OK" again to close the Environment Variables window.
  • Close and reopen any Command Prompt windows for the changes to take effect.
  • To verify that JAVA_HOME is set correctly, run the command echo %JAVA_HOME% in a Command Prompt window. It should display the JDK installation path.

Setting ANDROID_HOME Environment Variable:

To set the ANDROID_HOME variable for both Windows and macOS, you can follow the instructions below:

Windows:

  • Open the System Properties window by right-clicking on the Computer icon and selecting "Properties".
  • Click on "Advanced system settings" on the left-hand side.
  • In the System Properties window, click on the "Environment Variables" button.
  • In the Environment Variables window, under the "System variables" section, click on the "New" button.
  • Enter ANDROID_HOME as the variable name.
  • Enter the path to the Android SDK directory as the variable value. (Default Path: C:\Users\User_Name\AppData\Local\Android\Sdk)
  • Click "OK" to save the changes.

macOS:

  • Open a terminal window.
  • Open the .bash_profile file in a text editor by running the command nano ~/.bash_profile.
  • Add the following line to the file:
  • export ANDROID_HOME=/path/to/android/sdk
  • Replace /path/to/android/sdk with the actual path to the Android SDK directory.
  • Press Control + O to save the file, then press Enter to confirm the file name, and finally press Control + X to exit the text editor.
  • Close the terminal window and reopen it for the changes to take effect.

Please note that the exact path to the Android SDK directory may vary depending on how you installed it. Make sure to replace /path/to/android/sdk with the correct path on your system.

Getting Started:

Follow these steps to get started with UltimateHealth:

Clone the repository:

https://github.com/SB2318/UltimateHealth.git

Change the directory

cd  UltimateHealth

Checkout the develop branch and select your preferences (backend or frontend).

 git checkout develop

If u couldn't find the 'develop' branch in your own forked repository , Please go to CONTRIBUTING.md and follow the instructions written in detail.

For Frontend:

Install dependencies:

npm install --legacy-peer-deps

Configure the application: (For IOS and Backend)

Update the configuration files if necessary. Ensure the Ethereum wallet connection details are set.

Run the applications.

To run the frontend server use:

For android: npm run android

For ios: npm run ios

For Backend:

MongoDB Installation

  1. Install MongoDB

    • Download the appropriate MongoDB installation package for your operating system from the official MongoDB website: https://www.mongodb.com/try/download
    • Follow the installation instructions for your specific platform.
  2. Set up a MongoDB database

    • After installation, start the MongoDB server by running the mongod command.
    • MongoDB will create a default data directory to store your databases.
    • Use the mongo shell or a GUI client like MongoDB Compass to interact with your databases.
  3. Follow the Steps to Initialize the backend server

Setting up a Backend Server

Follow the steps to set backend in your system

 cd backend

Create .env file if not present and add the following variables in the file

PORT=
MONGODB_URL=""
JWT_SECRET=""

Install necessary dependency from package.json

npm install -s

Once dependencies are installed, run the server using the following command

npm run dev

Alternate Command to run the server once

node server.js

Backend API URL

 http://localhost:{PORT}/api/

Make Sure to replace the proper PORT value for Backend API

Access the application: Open your web browser and navigate to (LOCAL_HOST_URL). If you would like to contribute to the project, please follow the contribution guidelines.

Testing Frontend with Localhost Backend Server

When working with a backend server running on localhost, frontend developers can follow these guidelines to test their application:

  1. Start the backend server

    • Before testing the frontend application, ensure that the backend server is running on localhost.
    • Navigate to the backend project directory and start the server (e.g., node server.js for a Node.js server).
    • The server should be listening on a specific port (e.g., http://localhost:{PORT}).
  2. Configure the frontend application

    • In the frontend application, locate the configuration file or the section where the API base URL is defined.
    • Set the API base URL to point to the local backend server.
  3. Use appropriate HTTP clients

    • During development, frontend developers can use browser tools like the Network tab in the developer tools or dedicated HTTP clients like Postman or Insomnia to test the backend API endpoints.
    • Send HTTP requests to the local backend server and observe the responses.
  4. Handle CORS (Cross-Origin Resource Sharing)

    • If the frontend application is running on a different port or domain than the backend server, the browser may block the requests due to CORS restrictions.
    • To handle CORS, the backend server should be configured to allow cross-origin requests from the frontend application's origin.
    • CORS is handled in the current backend server
  5. Proxy requests (optional)

    • Some frontend frameworks (e.g., Create React App, Vue CLI) provide a built-in proxy feature that forwards requests from the frontend application to the backend server.
    • Configure the proxy in the frontend application's development settings to automatically forward API requests to the local backend server.
  6. Use environment variables

    • Avoid hardcoding the backend server URL in the frontend application.
    • Instead, use environment variables to store the backend server URL and read it during runtime.
  7. Test different scenarios

    • Test various user flows and interactions with the backend API, such as creating, reading, updating, and deleting data.
    • Simulate different scenarios, including error cases and edge cases, to ensure the frontend application and backend server handle them correctly.

Access the application: Open your web browser and navigate to (LOCAL_HOST_URL). If you would like to contribute to the project, please follow the contribution guidelines.

Contribution Guidelines:

  • Checkout and make your changes for the develop branch only: When working on your contributions, switch to the develop branch in your local repository. This ensures that you are working on the latest version of the codebase.

  • Create pull requests only for the develop branch: When you are ready to submit your changes, create a pull request (PR) targeting the develop branch. This allows the maintainers to review and merge your code into the main development branch.

  • Maintain contribution guidelines: Each project may have its specific contribution guidelines. It's important to familiarize yourself with these guidelines before submitting your contributions. Adhering to these guidelines ensures consistency and helps maintain the quality of the codebase.

  • Format your commit message with the issue number: When making commits related to an issue, follow the format Fixes: #32 in your commit message. Replace 32 with the issue number you are addressing. This helps track and manage issues more efficiently.

  • Attach a Postman response screenshot for backend tasks: For tasks related to the backend, it is recommended to include a screenshot of the Postman response along with your pull request. This provides additional context and helps reviewers understand the changes made and their impact on the backend functionality.

  • Make your pull request descriptive and include examples: When creating a pull request, provide a clear and descriptive explanation of the changes you made. This helps reviewers understand the purpose and significance of your contribution. Additionally, including at least one example that demonstrates the intended usage or effect of your changes can be beneficial.

  • Rebase your commits and optimize file changes: When submitting your pull request, consider rebasing your commits into one commit and optimizing your file changes. This helps keep the commit history clean and makes it easier for reviewers to understand your changes.

Remember, following these guidelines will help ensure a smooth and efficient contribution process. Happy coding!

Contact:

Discord Server (Susmita Bhattacharya, user_name: susmita_)

Our Contributors ❤️

Thank you for contributing to our repository

Contributors

About

UltimateHealth is an innovative open source project that serves as an online library and article management application focused on health.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published