![]() |
![]() |
---|
🎥 Watch our project demo on YouTube: Wellness 360 Demo
This project analyzes various health reports, such as blood glucose, CRP, FBC, lipid panel, liver function, and thyroid function. It uses Ballerina for the backend and React.js for the frontend. Key features include user authentication, profile management, and report download functionality.
- React.js (for frontend)
- Ballerina (for backend)
- MySQL Database (Aiven.io or local setup)
- Java KeyStore and related files for encryption
The backend is built using Ballerina and contains the following modules:
bloodGlucoseAnalysis
crpAnalysis
fbcAnalysis
lipidPanelAnalysis
liverFunctionTestAnalysis
thyroidFunctionTestAnalysis
The frontend is built with React.js and includes pages for user login, report analysis, and health tips for maintaining well-being.
git clone https://github.com/InduwaraRathnayake/iwb121-code-stormers.git
cd iwb121-code-stormers
If you haven't installed Ballerina yet, download and install it.
Create a Config.toml
file in the backend folder and configure the database:
📦backend
┣ 📂modules
┣ 📂resources
┣ 📜.devcontainer.json
┣ 📜.gitignore
┣ 📜api.bal
┣ 📜auth.bal
┣ 📜Ballerina.toml
┣ `📜Config.toml`
┣ 📜dbModels.bal
┣ 📜Dependencies.toml
┣ 📜models.bal
┣ 📜request.http
┗ 📜schema.sql
[databaseConfig]
host ="mysql-2c283d8b-wellness-360.l.aivencloud.com"
user= "avnadmin"
password="AVNS_X8HnFao5MMcXB5Pg9cn"
database="wellness"
port=24836
- Create a MySQL database and execute the
schema.sql
file located in the backend folder to set up the necessary tables. - Modify the
Config.toml
file to add your local database configurations:
[databaseConfig]
host= "localhost"
user= "root"
password= "your_local_password"
database= "wellness"
port= 3306
Navigate to the backend
folder and run:
bal run
This will start the backend server with all health report analysis endpoints and authentication functionality.
Navigate to the frontend
folder and install dependencies:
cd frontend
npm install
Once the dependencies are installed, start the frontend development server:
npm run dev
This will start the React.js app on localhost:5173
(by default).
To run backend tests for each module, navigate to the backend
folder and use:
bal test
Refer to api.bal
for REST API details on CRUD operations for user data, health report analysis, and authentication.
- User authentication with RSA encryption and JWT
- Multiple health report analyses: blood glucose, CRP, FBC, lipid panel, liver function, and thyroid function
- Generated report download functionality
- Responsive frontend UI built with React.js, Tailwind CSS, and Material UI
- Ensure that your
Ballerina.toml
andConfig.toml
files are properly configured with database, keystore, and other configurations. - Use
request.http
for testing API requests in VS Code.
This project was developed by the following team members:
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.