Skip to content

Gustaavo-404/healthtrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HealthTrack

HealthTrack is a full stack web platform for personal health monitoring and habit tracking.
The application allows users to register, define personal goals, track daily habits, and visualize key health metrics through an interactive dashboard.

The project focuses on combining data-driven health insights with a modern and optimized user interface.


Features

  • User authentication (username, email, password)
  • Initial profile setup via modal:
    • Age, gender, body measurements
    • Personal goals
    • Health recommendations (training frequency, water intake, sleep, diet)
  • Interactive health dashboard with calculated metrics:
    • BMI (Body Mass Index)
    • Basal Metabolic Rate (BMR)
    • Body fat percentage
    • Muscle mass percentage
  • Daily habit reports:
    • Number of meals
    • Training sessions
    • Water intake (liters)
    • Sleep duration (hours)
  • Streak system:
    • Current streak (consecutive login days)
    • Highest streak achieved
  • Modern UI with optimized 3D elements using Three.js
    • Single 3D model
    • FPS limitation for performance optimization

Tech Stack

Frontend

  • React.js
  • JavaScript
  • Bootstrap
  • Three.js (performance-optimized usage)

Backend

  • Node.js
  • RESTful APIs

Database

  • MySQL

Database Schema

Before running the application, create the database and tables using the SQL script below:

CREATE DATABASE dbht;
USE dbht;

CREATE TABLE usuarios (
    id_usuario INT PRIMARY KEY AUTO_INCREMENT,
    nome VARCHAR(45),
    sexo VARCHAR(15),
    idade INT,
    email VARCHAR(75),
    senha VARCHAR(100),
    data_cadastro DATE,
    streak_atual INT,
    maior_streak INT,
    ultimo_login DATE
);

CREATE TABLE metas (
    id_meta INT PRIMARY KEY AUTO_INCREMENT,
    id_usuario INT,
    tipo VARCHAR(15),
    valor_meta DOUBLE,
    data DATE
);

CREATE TABLE objetivos (
    id_objetivo INT PRIMARY KEY AUTO_INCREMENT,
    nome VARCHAR(45),
    id_usuario INT
);

CREATE TABLE historico_medidas (
    id_medida INT PRIMARY KEY AUTO_INCREMENT,
    id_usuario INT,
    data DATE,
    peso DOUBLE,
    imc DOUBLE,
    percentual_gordura FLOAT,
    percentual_musculo FLOAT,
    tmb DOUBLE,
    altura DOUBLE,
    cintura DOUBLE,
    quadril DOUBLE,
    pescoco DOUBLE
);

CREATE TABLE historico_habitos (
    id_habito INT PRIMARY KEY AUTO_INCREMENT,
    id_usuario INT,
    data DATE,
    qtd_refeicoes INT,
    qtd_agua DOUBLE,
    qtd_sono DOUBLE,
    qtd_treinos INT
);

CREATE TABLE treinos (
    id_tipo_treino INT PRIMARY KEY AUTO_INCREMENT,
    id_usuario INT,
    nome VARCHAR(45)
);

Project Structure

healthtrack/
├── backend/
│   ├── index.js
│   ├── package.json
│   └── src/
├── frontend/
│   ├── package.json
│   └── src/
├── .gitignore
└── README.md

Step-by-step

1. Navigate to the project root

cd healthtrack

2. Start the backend

cd backend
node index.js

3. Start the frontend

cd frontend
npm run dev

Academic Context

This project was developed as the final project for the Web Programming course, with the objective of applying full stack web development concepts, including frontend-backend integration, database modeling, user authentication, and data-driven dashboards.


Disclaimer

This project was developed for educational purposes and is not intended to replace professional medical or health advice.

About

A comprehensive health tracking platform where users monitor and analyze their health metrics including weight, BMI, body fat percentage, muscle mass, and more. The system provides personalized recommendations based on user data and goals.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors