Wellness Wise is a comprehensive Health and Wellness Tracker designed to empower users by tracking their physical activities, diet, sleep, mood, and goals, while offering personalized insights and recommendations through advanced analytics.
Wellness Wise is a comprehensive Health and Wellness Tracker that allows users to track their physical activities, diet, sleep, mood, and goals. The project showcases user-centric application development, integrating various types of data into a cohesive and useful tool.
Before you start, ensure you have the following software installed:
npm install -g @angular/cli
git clone https://github.com/chrispsang/Wellness-Wise.git
cd Wellness-Wise
Navigate to the backend directory:
cd health-tracker-backend
2.1 Install Dependencies
npm install
2.2 Set Up Environment Variables
Create the .env
file:
touch .env
Add the following configuration to the .env file:
DB_HOST=localhost
DB_USER=new_user
DB_PASSWORD=new_password
DB_NAME=health_wellness
DB_PORT=5432
PORT=3000
ACCESS_TOKEN_SECRET=your_jwt_secret
2.3 Set Up PostgreSQL Database
Before running the schema script, follow these steps to create a new PostgreSQL user and set up the health_wellness database:
Create a New PostgreSQL User:
Open your terminal and connect to the PostgreSQL server using the default postgres superuser:
psql -U postgres -d postgres
Create a new user:
CREATE USER new_user WITH PASSWORD 'new_password';
Grant the new user the privilege to create databases:
ALTER USER new_user CREATEDB;
Exit psql:
\q
Create the health_wellness Database:
Connect to PostgreSQL as the new user:
psql -U new_user -d postgres
Create the database:
CREATE DATABASE health_wellness;
Exit psql:
\q
Run the Schema Script:
Now that the health_wellness database has been created, run the schema script:
psql -U new_user -d health_wellness -f ./schema.sql
2.4 Run the Backend
node src/server.js
Open your browser and go to http://localhost:3000 to access the backend.
Navigate to the frontend directory:
cd health-tracker-frontend
4.1 Install Dependencies
npm install
4.2 Run the Frontend
ng serve
Open your browser and go to http://localhost:4200 to access Wellness Wise.
The application is deployed and accessible via the following links: