Skip to content

uzii9/Runergy-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Runergy Logo

Runergy

Runergy is an open‑source wellness web app that lets you track meals, workouts, water, sleep and weight in a single dashboard.
Built with React + Vite (front‑end) and Node + MySQL (back‑end), it stores everything in a fully‑normalised relational schema for quick analytics and reliable data integrity.


📌 Problem Statement

With obesity rates climbing in North America and limited access to personalized nutrition tools, individuals struggle to make healthy eating decisions. Many existing tools are either tedious, behind paywalls, or fragmented in functionality. Personally, our team has witnessed the struggles of friends and family members with existing nutrition tools, inspiring us to create a more effective solution.


🚀 Features

Category Key Functions
👤 User Profile Secure signup/login, baseline stats (BMI / BMR)
🎯 Goals Lose / Maintain / Gain goal tracking (user_goals)
🍽️ Meals Quick add of food + macros; live daily totals
💧 Water amount of water per day
💤 Sleep Duration, quality & notes tracker
🏃 Workouts Log activity type, duration, calories
📊 Analytics Recharts graphs for weight & macro trends
🔧 Admin admin edits, audit log (admin_edit)

🧠 Tech Stack

Layer Tools
Front‑end React 18, Vite, React Router, Axios, Formik + Yup, Recharts
Back‑end Node 18, Express, RESTful JSON API, JWT auth
Database MySQL – Normalization & foreign key constraints

Visual Interface Description

  • Dark, high‑contrast palette (#1A1A2E bg / #E94560 accent) ensures readability in bright or dim rooms.
  • Responsive grid adapts to phones, tablets and desktops without scroll‑jank.
  • Intuitive Page design
  • Inline validation (Formik + Yup) highlights errors in real time; submit is disabled until the form is correct.
  • Instant charts (Recharts) redraw <50 ms after each save, reinforcing progress visually.
  • Accessibility first: full keyboard nav, WCAG‑AA colour contrast, aria‑labels on every button.
  • Admin panel is role‑gated; destructive changes prompt confirmation and are logged to admin_edit for traceability.

📁 Project Structure

Runergy/
├── client/               # Frontend source code (React + Vite)
│   ├── public/           # Static assets
│   ├── src/              # React components, pages, and logic
│   ├── index.html        # HTML entry point
│   └── package.json      # Frontend dependencies and scripts
│
├── server/               # Backend source code (Node.js + Express)
│   ├── config/           # Database and environment config
│   ├── models/           # Database models
│   ├── routes/           # API route handlers
│   ├── index.js          # Express app entry point
│   └── package.json      # Backend dependencies and scripts
│
└── README.md             # Project overview and documentation

🛠️ Getting Started

Requirements: Node ≥ 18, npm, MySQL 8+

  1. Clone the repository

    git clone https://github.com/<your‑org>/runergy.git
    cd runergy
  2. Install dependencies

    npm install
  3. Create database

    mysql -u <user> -p -e "CREATE DATABASE runergy;"
    
  4. Insert default admin user

    INSERT INTO admin (AdminID, credentials) VALUES (1, 123456789);
  5. Configure environment

    cp server/.env.example server/.env
    # Edit DB credentials in .env
  6. Start backend server

    cd server
    npm start
    # Runs on http://localhost:3001
  7. Start frontend

    cd client
    npm run dev
    # Runs on http://localhost:5173
  8. Log in or register at localhost:5173


🗞 Database Schema

Table Purpose
fitness_enthusiast User profiles
goals Goal types
user_goals User-goal relationships
meal Meal logs with macros
water Daily water intake
sleep Sleep duration and quality
fitness_level Workout logs
weight_entry Weight/BF/BM history
admin, admin_edit Admin roles and audit trail

Full SQL definitions available in Final report


📚 Documentation

This repository includes:

  • 📝 Code-level documentation and comments
  • 📄 In-app documentation page (see /docs page)
  • 🗂️ Project structure and setup instructions

📄 License

This project is licensed under the MIT License.


👥 Team Members (CPSC 471)

  • Hunter Halvorson
  • Sheikh Falah Sheikh Hasan
  • Kosisochukwu Igbokwe
  • Uzair Kamran

University of Calgary, Winter 2025

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors