Giter VIP home page Giter VIP logo

eatthis's Introduction

Eat This!

v2 underway

Up and Running Locally

Setup MongoDB

You will first need an instance of MongoDB available for the backend api. The easiest way to accomplish that is to use Docker. You can run the following commands to run the latest version of MongoDB.

docker pull mongo
docker run -p 27017:27017 -d mongo

Running the Projects

  • Clone the repo
  • In both the frontend and backend directories run npm install
  • From the root of the project run npm run start

eatthis's People

Contributors

jaecen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

jaecen

eatthis's Issues

Departments are customizable

As a user, I would like to be able to customize my departments, the order they are displayed, and the food items that are mapped to them. As a new user, I should already have a set of default departments and mappings that I can start with and customize later.

Combined ingredients and grocery items need to include unitsof measure

As a grocery list user, I need units of measures included when combining ingredients or grocery items. Right now adding 1 tbs of flour and 1 cup of flour results in 2 tbs of flour.

Possible solutions are to include duplicate items in the list, 1 for each type of measure. Ideally, we should do the actual calculation based on the unit of measure. Optionally, we could just add multiple measures to a grocery item.

Meal planner for mobile

As a user on a phone creating a meal plan, I need a way to add recipes to days. Currently, the drag and drop functionality does not work.

Recipe data comes from the database

As an application maintainer, I need an easy way to update data without re-compiling the application and deploying. Items such as food data, preparation, and units of measure all need to come from the database.

Add new vue project to front-end

Add a new front-end vue app to the project using TS, routing, pinia, and testing. Create a docker file and wire up the docker-compose.yml file.

Images can be uploaded or referenced

As a user creating a recipe, I would like to be able to either reference an image online or upload the image. Images should be resized to something appropriate for a light-weight app being displayed on mobile. Image names should adhere to some standards.

On hand items are flagged on the grocery list

As a user building a grocery list from a meal plan, I would like to see what items I usually have on hand and can remove from the list. Things like flour and salt are common to find in the cupboard. These types of items should be flagged on the list, or at least prompted to the user when the list is being created so they can easily remove them if they don't need them.

Recipes have keywords

As a user looking for recipes, I would like to search for recipes by keywords such as breakfast or beef. As a user creating recipes, I should be displayed a list of common keywords that are appropriate for my dish as well as adding my own.

Add copy recipe button

Add a button to the recipe display page that will copy the recipe json to the clipboard.

Add recipe export

Add a recipe export to the account page that will export all of the user's recipes to a JSON file.

Add meal side-dish

Add the ability to specify an item on the side of a recipe when creating a meal.

Setup nginx in docker

EatThis.app is currently being hosted on my Digital Ocean box with completely manual setup and deployment process. I would like to get a docker image setup that is based on Nginx and Lets Encrypt so setup and deployment are much easier and less error-prone.

Some useful resources:

And notes from jaecen:

version: "3"

services:
  nginx-proxy:
    image: jwilder/nginx-proxy:alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "/var/run/docker.sock:/tmp/docker.sock:ro"
      - "/etc/certs:/etc/nginx/certs:ro"
      - "nginx-vhost:/etc/nginx/vhost.d"
      - "nginx-html:/usr/share/nginx/html"
      - ./proxy.nginx.conf:/etc/nginx/conf.d/proxy.nginx.conf:ro 
    environment:
      - "ENABLE_IPV6=true"
      - "SSL_POLICY=Mozilla-Modern"
    labels:
      com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: ""

  letsencrypt-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion
    depends_on:
      - nginx-proxy
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "/etc/certs:/etc/nginx/certs:rw"
      - "nginx-vhost:/etc/nginx/vhost.d"
      - "nginx-html:/usr/share/nginx/html"

  uninitialized-net:
    image: sebp/lighttpd
    depends_on:
      - nginx-proxy
      - letsencrypt-companion
    volumes:
      - "/var/www/uninitialized-net/htdocs:/var/www/localhost/htdocs"
    environment:
      - "VIRTUAL_HOST=uninitialized.net,www.uninitialized.net"
      - "LETSENCRYPT_HOST=uninitialized.net,www.uninitialized.net"
      - "[email protected]"
      - "SSL_POLICY=Mozilla-Modern"

  node-uninitialized-net:
    image: "node:10-alpine"
    depends_on:
      - nginx-proxy
      - letsencrypt-companion
    user: "node"
    working_dir: "/home/node/app"
    volumes:
      - "/var/www/node-uninitialized-net:/home/node/app"
    ports:
      - "8080"
    command: "npm start"
    environment:
      - "NODE_ENV=production"
      - "VIRTUAL_HOST=node.uninitialized.net"
      - "VIRTUAL_PORT=8080"
      - "LETSENCRYPT_HOST=node.uninitialized.net"
      - "[email protected]"
      - "SSL_POLICY=Mozilla-Modern"

  netcore-uninitialized-net:
    image: "jaecen/asp-dot-net-core-docker:latest"
    depends_on:
      - nginx-proxy
      - letsencrypt-companion
    environment:
      - "VIRTUAL_HOST=netcore.uninitialized.net"
      - "LETSENCRYPT_HOST=netcore.uninitialized.net"
      - "[email protected]"
      - "SSL_POLICY=Mozilla-Modern"

  cardnex-us:
    image: sebp/lighttpd
    depends_on:
      - nginx-proxy
      - letsencrypt-companion
    volumes:
      - /var/www/cardnex-us/htdocs:/var/www/localhost/htdocs
    environment:
      - "VIRTUAL_HOST=cardnex.us,www.cardnex.us"
      - "LETSENCRYPT_HOST=cardnex.us,www.cardnex.us"
      - "[email protected]"
      - "SSL_POLICY=Mozilla-Modern"

  bitwarden-uninitialized-net:
    image: mprasil/bitwarden
    depends_on:
      - nginx-proxy
      - letsencrypt-companion
    volumes:
      - /var/bitwarden:/data
    environment:
      - "SIGNUPS_ALLOWED=false"
      - "DOMAIN=https://bitwarden.uninitialized.net"
      - "VIRTUAL_HOST=bitwarden.uninitialized.net"
      - "LETSENCRYPT_HOST=bitwarden.uninitialized.net"
      - "[email protected]"
      - "SSL_POLICY=Mozilla-Modern"
  
# MariaDB, memcached, and seafile are all to support Seafile
  mariadb:
    image: mariadb:10.1
    container_name: seafile-mariadb
    environment:
      - MYSQL_ROOT_PASSWORD=****                  # Requested, set the root's password of MySQL service.
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - /opt/seafile-mysql/db:/var/lib/mysql      # Requested, specifies the path to MySQL data persistent store.
  
  memcached:
    image: memcached:1.5.6
    container_name: seafile-memcached
    entrypoint: memcached -m 256

  seafile:
    image: seafileltd/seafile-mc:latest
    container_name: seafile
    expose:
      - 80
    volumes:
      - /opt/seafile-data:/shared                 # Requested, specifies the path to Seafile data persistent store.
      - ./seafile.nginx.conf.template:/templates/seafile.nginx.conf.template:ro
    environment:
      - DB_HOST=mariadb
      - DB_ROOT_PASSWD=****                       # Requested, the value shuold be root's password of MySQL service.
      - TIME_ZONE=America/Los_Angeles             # Optional, default is UTC. Should be uncomment and set to your local time zone.
      - SEAFILE_ADMIN_EMAIL=****                  # Specifies Seafile admin user, default is '[email protected]'.
      - SEAFILE_ADMIN_PASSWORD=****               # Specifies Seafile admin password, default is 'asecret'.
      - SEAFILE_SERVER_LETSENCRYPT=false          # Whether to use https or not.
      - SEAFILE_SERVER_HOSTNAME=docs.seafile.com  # Specifies your host name if https is enabled.
      - "VIRTUAL_HOST=seafile.uninitialized.net"
      - "LETSENCRYPT_HOST=seafile.uninitialized.net"
      - "[email protected]"
      - "SSL_POLICY=Mozilla-Modern"
    depends_on:
      - mariadb
      - memcached

volumes:
  nginx-vhost:
  nginx-html:

So this is how I run my personal "apps" server. It's where I host everything except my VPN. I have that on a separate machine to reduce the attack surface.
Everything I use is in that docker-compose or in one of the mapped volumes. When I want to start a new service, I add it to the docker-compose file, set the four environment variables, and docker-compose up -d

The parts you'll be interested in are nginx-proxy and letsencrypt-companion. nginx-proxy is the reverse proxy. All requests on :80 and :443 come in to that. It then does a lookup on the host header and routes it to the service with the matching VIRTUAL_HOST environment variable. So, for example, the node-uninitialized-net service is configured with a VIRTAL_HOST of node.uninitialized.net. All requests to that domain get routed to that container.

The letsencrypt-companion service just watches nginx-proxy and sets up Let's Encrypt certs for any container with LETSENCRYPT_HOST and LETSENCRYPT_EMAIL environment variables. It periodically checks the cert expiration and automatically renews as needed. letsencrypt-companion has a tight dependency on nginx-proxy.

You can see that I'm running my own apps for things like netcore-uninitialized-net, lighttpd instances for static sites like cardnex-us, and third-party services like bitwarden and seafile (which depends on mariadb and memcached).
Notably, there is zero infrastructure configuration outside of that docker-compose file except for my firewall configuration, which is just :22, :80, and :443.

Account page shows basic information

As a user of the application, I should be able to update my password and see basic account information like email, first name, and last name.

Common grocery items are added to new grocery lists

As a user creating a grocery list, I want common items that I always need to automatically be added to the list. Things like fruit, coffee, and string cheese. I need a way to add these items to a list and be able to maintain that list periodically.

Requirements:

  • We only need to enable writes to create and update.

  • Add a new repository for common items

  • Add a new controller for common items

  • Add a new route for common items

  • Add postman scripts to update common items

  • Add front-end service to update common items

  • Add new settings route for common items

  • Add editor to update common items

  • Update grocery editor to automatically add common items

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.