Giter Club home page Giter Club logo

stockcubes_rails's Introduction

Stockcubes

This is the now deprecated and no longer maintained prototype for the Stockcubes application

Project purpose

The application was design to help users manage their food at home, with inventory systems, automatic shopping list creation and meal planning.

Tech stack

The code of the application is a mix of Ruby on Rails for the backend and React components for the frontend

  • Ruby version >=2.5.0

Running the project

I recommend using Homebrew to manage your packages and Ruby environment (if you're on a Mac).

If you're using Homebrew on Mac then you use it to install PostgresQL (the database type) with the command brew install postgres - there are many guides out there to explain this process in more detail eg this one

Steps to run

  1. Pull down repo
  2. Copy .env.template to create a new .env file and fill with your details
  3. Run bundle install to install Gems
  4. Run rake db:create to create the databases
  5. Run rake db:migrate to migrate the databases . Run rake db:seed to seed the databases with data (make sure you have the .env file setup first with a personal email, password and Rails environment variable)
  6. Run rails server (or rails s) to run server
  7. See app at http://localhost:3000

Steps to run with Browser Sync

  1. Run the app as described above with rails server (or rails s)
  2. Open a new terminal window
  3. Naviagte to the '/browser-sync' folder inside this repo
  4. For first use, run npm install && npm start
  5. At all other times, only run npm start
  6. Use proxy address provided, shown in terminal window

License

This project is licensed under the terms of the MIT license.

stockcubes_rails's People

Contributors

joshharrington avatar

Watchers

 avatar  avatar  avatar

stockcubes_rails's Issues

Stock Cube site

  • Decide what to put up on stockcub.es domain or whether to wait for full launch
  • Decide how to advertise site

Cupboard functionality

  • When setting up cupboards there should be a quick add feature to let the user add common stock with predetermined amounts and use by dates (Eg Milk, Bread, Cheese, Eggs)
  • Subscribers to cupboards should be able to add, not delete stock
  • Double check whether race conditions possible, caused by multiple editors on the same cupboard
  • Solution to mitigate issues with race conditions
  • If recipe was added to shopping list then stock from shopping list added to cupboard recipe should be associated and easily accessible

Recipe functionality

  • Setup recipe search, to search by description / title / cuisine
  • Extend search to allow searching by associated ingredients
  • Setup prefilled recipe search in cupboard to see quickly what recipes are possible with available ingredients
  • Method to edit a recipes Ingredients and Portions
  • Method to favourite a set of recipes
  • Default recipes page would be user's favourite recipes, not a listing of all recipes
  • Allow all users to suggest recipes, let them be checked by admin and added to database if they pass
  • Search form on index page, pass value through to search page
  • Should not be able to get to recipe edit pages when not logged in
  • Logic to present if recipe is vegetarian / vegan
  • Decide whether recipe search needed both in cupboards and in recipe section
  • New recipes need to allow ingredients to be added to them, along with Prep time, cook time, cuisine
  • (@chantymarie) When possible, begin adding new recipes with applicable ingredients and amounts for those ingredients

Portions functionality

  • Allow user to predetermine their default portion amount
  • All recipes should automatically show this portion amount with correctly calculated amounts
  • Portion amount should be able to be picked for each recipe and the recipe should adjust the portions accordingly

Stock Cube branding

  • Create vector of Stock Cube logo
  • Create variants of logos to use in different scenarios in app, eg cupboard cube
  • Create icons for different sections of the app, eg shopping lists
  • Colours need defining, adding as css variables

Shopping List functionality

  • Create table for shopping list, owned by a particular user
  • Join to recipes so that recipes can be added
  • Shopping list should combine same (or similar?) ingredients into one item
  • Individual ingredients should be able to be added too ie bread, milk, eggs
  • Ready meals and snacks should be able to be added as an ingredient without a recipe (or portion?)
  • History of previous shopping list should exist and be reuseable
  • Allow portions of ingredients in shopping lists to be increased (not decreased as this could negatively impact a recipe)
  • Should reference cupboard to make sure user is not buying stock already in cupboard
  • 'Keep' style functionality to tick off items in shopping list and see them struck-through under list
  • Shopping list should show all portions as totals for that ingredient
  • Check if ingredients in shopping list already exist in Cupboard (had been noted as completed, check whether done or not)

Responsive, accessible navigation

  • Setup responsive navigation to show slide in nav on mobile
  • Ensure navigation functions correctly, closing after new page opened
  • Style navigation correctly
  • Add relevant quick link on mobile in top right of bar to link through to stock going out of date or recently change to cupboard or shopping list
  • Add notification update to menu icon on mobile
  • Fix test sizing issues
  • Set min-height of inner page block to 100vh

When importing recipes, fix double mentioned ingredients

Check if ingredients added twice are actually used in the recipe in two different amounts?
If yes then add the amounts together, assuming the unit is the same and update portion of relevant ingredient in recipe.

  • Setup logic in /seeds.rb to find when ingredients added twice in recipe
  • Write logic to add ingredient to portion amount for that recipe, when ingredient unit matches
  • Check if ingredients of different units ever included in same recipe
  • Write (or use existing) logic to convert ingredients to correct portion unit for existing portion

Ingredients functionality

  • Edit 'searchability' of ingredient
  • (@chantymarie) Now editable, go through ingredients and make only common ingredients searchable - eg "Beef Shank", "Beef rib" wouldn't be searchable if "Beef" is searchable (as both will fall under the "Beef" title)
  • Method for admin to combine the duplicate / very similar ingredients

Elements page

Build elements page to style from elements (plus all others) in similar style

  • Create static elements page template
  • Create partials to include in elements page
  • Style elements

Add basic recipes

  • Breakfast
  • Lunch
  • Dinner
  • Dessert

Some gluten free/vegan/veggie options

5 of each

Account management

  • Allow sign in from Google / Twitter
  • Setup database changes needed for users to be able to own or subscribe (and leave) a cupboard
  • Setup notification for cupboard invite, first check whether user currently has account
  • Send out invite to Stock Cube if no account found
  • Send invite to cupboard if account found then subscribe user on email confirmation
  • Setup time limit to stop invitations to cupboards being available forever (1 week?)

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.