Skip to content

WellAI789/Smart-Health-Predictive

Repository files navigation

WellAI logo

WellAI - Smart Health Predictive

Smart Health Predictive empowers individuals to take control of their well-being through data-driven insights. Using AI-powered health analytics, WellAI helps you understand potential health risks early and make informed lifestyle choices for a better, healthier future.

Prerequisites

How to Build

  1. To build the project:
# Navigate to https://github.com/A-Axisa/Smart-Health-Predictive

# Ensure Git is installed
# Open a terminal (Command Prompt or PowerShell for Windows, Terminal for macOS or Linux)

# Clone the repository
git clone https://github.com/A-Axisa/Smart-Health-Predictive.git

# Navigate to the project directory and run the services
docker compose up -d

Services

Installing Dependencies (Manual)

Note

The docker-compose file already runs these commands automatically.

Client

  1. Navigate to root/client and run:
npm install

Server

  1. Navigate to root/server and run:
pip3 install -r requirements.txt

Generating Dummy Data

The script will generate random data directly into the database. The amount of data generated can be modified at the head of the script.

  1. Navigate to the project directory:
python -m server.tools.generate_dummy_data

Using Alembic

To update your database to the latest migration run:

alembic upgrade head

To remove all tables and data run:

alembic downgrade base

Adding a Migration

  1. Navigate to root/server/models/dbmodels.py and modify/ create tables as necessary.
  2. Navigate to root/server and run:
alembic upgrade head
alembic revision --autogenerate -m "Your migration description."

# This will auto-generate a version in /root/server/alembic/versions/

Refer to the Alembic Docs for more detail.

Testing

To run all integration tests, navigate to root/server:

# Run the tests
pytest

End-to-end Testing

  1. If not already installed, run the command:
npx playwright install
  1. Navigate to the root/client:
npx playwright test

Tests will now begin running and the terminal will log the status of completed tests. Following this it will open a window in your browser with a more detailed overview. This can also be accessed directly on http://localhost:9323/.

Load Testing

  1. If not already install k6 on your machine
  2. Navigate to the project directory:
# There are currently a number of test types you can run:
# - average
# - breakpoint
# - smoke
# - soak
# - spike
# - stress

# To ensure that k6 is operational, run:

k6 run \
  -e BASEURL=http://localhost:8000 \
  -e ADMIN_EMAIL=SHP_Admin@example.com -e ADMIN_PASSWORD=password12345678 \
  -e MERCHANT_EMAIL=service@example.com -e MERCHANT_PASSWORD=thisismypassword \
  -e USER_EMAIL=audrey.young@example.com -e USER_PASSWORD=whyaretherebirds \
  load-tests/tests/smoke.js

Return to top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors