Skip to content

simplyzee/kilokeeper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

KiloKeeper

A simple weight tracking application with a web-based interface that allows users to log their weight over time and visualize it using a chart.

Features

  • Log weight entries with date validation.
  • View a historical graph of weight changes over time.
  • Weight over time is displayed in a chart.
  • Data is persisted in a JSON file (weights.json).

Demo

See below screenshot for example

demo

Technologies Used

  • Backend: Go (net/http)
  • Frontend: HTML, JavaScript, Chart.js
  • Data Storage: JSON files

Setup and Installation

Prerequisites

  • Go installed (1.16+ recommended)
  • A working web browser

Steps to Run

  1. Clone the repository:
    git clone https://github.com/thomaschaplin/kilokeeper.git
    cd kilokeeper
  2. Create required files and directories:
    mkdir data
    touch data/weights.json
  3. Initialize the weights.json file:
    []
  4. Run the application:
    go run main.go
  5. Access the web app: Open http://localhost:8080 in your browser.

API Endpoints

Get All Weights

GET /weights

Add a New Weight Entry

POST /weights/add

Request Body (JSON):

{
  "date": "DD/MM/YYYY",
  "kilograms": 75.5
}

Future Improvements

  • Store data in a database instead of JSON files.
  • Implement user authentication.
  • Add BMI calculation.
  • Add age to chart based on global date of birth

License

MIT License


Made with ❤️ by Thomas Chaplin

About

⚖️ Keep track of your weight, one kilo at a time

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 74.5%
  • Go 18.0%
  • Dockerfile 7.5%