Code Monkey home page Code Monkey logo

tinycalorie's Introduction

TinyCalorie

Simplest possible calorie counter, as a web-app. Rust (back) + HTML/CSS/vanillajs (front).
No frameworks! Very fast.

Dockerfile

You can use the provided dockerfile for easier deployment. This will expose it on port 8080, and store the SQLite db.db in /path/to/storage.

docker build -t tinycalorie .
docker run -p 8080:80 -v /path/to/storage:/storage tinycalorie

Dockerfile on Dockerhub

Use the prebuild image on Dockerhub

Docker Hub Image

docker pull uriopass/tinycalorie:1.1

Use Docker-Compose File

  1. Install Docker and Docker-Compose
  2. Clone Repository or copy the file below to docker-compose.yml
  3. run docker-compose up -d

How to install Docker-Compose

version: "3.1"

services:
  tiny-calorie:
    image: uriopass/tinycalorie:1.1
    container_name: tiny-calorie
    volumes: 
      - /path/to/storage:/storage
    networks:
      - network
    ports: 
      - 8080:80
    restart: unless-stopped
networks:
    network:

Integration with Authelia und Traefik

  1. Install Docker and Docker-Compose
  2. Clone Repository
  3. Switch to folder Authelia-Traefik-Integration or copy the file below to docker-compose.yml
  4. run docker-compose up -d

Learn about Authelia Learn about Traefik

version: "3.1"

services:
  tiny-calorie:
    image: uriopass/tinycalorie:1.1
    container_name: tiny-calorie
    volumes: 
      - /path/to/storage:/storage
    networks:
      - network
    expose: 
      - 80
    restart: unless-stopped
    labels:
      # Authelia-Traefik Config
      - "traefik.enable=true"
      - 'traefik.http.routers.tinycalorie.tls=true'
      - "traefik.http.routers.tinycalorie.rule=Host(`domain.TLD`)"
      - "traefik.http.routers.tinycalorie.entrypoints=websecure"
      - "traefik.http.routers.tinycalorie.service=tinycalorie"
      - "traefik.http.services.tinycalorie.loadbalancer.server.port=80"
      - "traefik.http.routers.tinycalorie.tls.certresolver=leresolver"
      - 'traefik.http.routers.tinycalorie.middlewares=authelia@docker'

networks:
  network:
    external: true

Features

  • Daily calorie counter
  • Fuzzy search in history
  • Budget/metabolism with weight tracking
  • Very simple UI, quick to add/manage food items
  • Mobile support, fully responsive
  • Activities as negative calorie spending
  • Calendar showing weight loss
  • Browse history through calendar (and add items if forgotten)

Want

  • Edit name of items (content-editable?)
  • Internationalization

Doesn't want

  • Plugging complex food APIs to find how much calorie is a food, use the numbers at the back of the product, or infer it yourself.
  • Cluttering the interface

Screenshot

screenshot.png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.