What is Health App1
Health App1 aims to provide an easy way to streamline a fine control on all aspects of your health. Combining the control of various metrics such as dieting habits with workout routines, users can make informed decisions about dieting that will compliment their exercise habits, and vice versa.
Health App1 is designed with FOSS in mind, with an added focus on staying free of external dependencies. So with little and trivial setup a user can have an offline and locally hosted version of the application.
In addition to a full assortment of pre-created exercises, users can add new ones for easy customization.
If you're exercising on a whim you can add a quickly add a single wokrout without starting a full routine.
Interactive charts make it simple to visualize your progress over different lengths of time.
Frontend
Backend
The following setup assumes that you have PostgreSQL installed and have permissions to add a new user. Documentation can be found here.-
Clone repository & install Node dependencies
-
Clone the project with:
git clone https://github.com/bryanlancy/HealthApp.git
-
In the root project directory run the command:
npm run install
-
-
Setup the backend environment
-
Make a copy of the
.env.example
file found in thebackend
folder and rename it to.env
. -
In the
.env
file, replace all values surrounded in< >
with the corresponding information. Unless you have already done so, you can generate these values now.DB_USERNAME
- PostgreSQL user nameDB_PASSWORD
- PostgreSQL user passwordDB_DATABASE
- PostgreSQL database name- database will be created in a later step.
JWT_SECRET
- JSON Web Token Secret- should be unique and secure.
⚠️ The.env.example
is tracked by git version control, do not save any sensitive information in this file. -
Create PostgreSQL user.
- In your terminal run,
psql
, to start PostgreSQL's interactive terminal. CREATE USER <DB_USERNAME> WITH PASSWORD '<DB_PASSWORD>' CREATEDB;
. Remember to replace the values in< >
with the values we created in the previous step.
- In your terminal run,
-
-
Create & seed the database
- In your terminal, navigate to the
backend
folder found in the main project directory. - Then run,
npm run db-setup
. This will run a series of commands that should automatically set up your database. If any errors occur, you can run the commands individually, in this order.npm run db-create
npm run db-migrate
npm run db-seed
- In your terminal, navigate to the
-
Start the application
- In your terminal, navigate to the main project folder.
- Then run
npm start
. This will start the backend and frontend server.
- Each server can be started manually by navigating to the respective folder,
frontend
andbackend
, and running the commandnpm start
.
- Each server can be started manually by navigating to the respective folder,
- In your browser navigate to localhost:3000
1 Pending better name 😓