Giter VIP home page Giter VIP logo

recipes's People

Contributors

akiraheid avatar dependabot[bot] avatar

Watchers

 avatar  avatar

recipes's Issues

make search case-insensitive

Searching is currently case-sensitive and makes it annoying to search for recipes. Searches should not be case-sensitive because the intent is the same.

Modify recipe ratios

On the recipe page, let user modify an amount of an ingredient. When the amount for an ingredient is modified, the ratios for other ingredients automatically adjust to the modified value to retain the original ratios.

This also affects the serving amount in #199

master cannot handle bad response from slave

The master cannot resolve the promise when:

  1. Master is tracking a slave
  2. Master queries slave for data
  3. Slave responds with crap data/format
  4. Master fails to handle bad data/format

Add logging

Add logging capability to write run logs to a file for debugging.

Securely transmit data between nodes

Encrypt communications between nodes. HTTPS is unlikely because each node would have to obtain an SSL certificate and that's just a pain for users.

Recipe database plugin

The package should allow the specification for database plugins in the package config and provide a template interface for plugins to adhere to.

The interface should be semver'd.

Research/record decentralization methods

Research decentralized storage. Is the current idea of simply using interest in a recipe a good enough method of determining if a node keeps/provides the recipe?

Record decisions/reasoning in docs/Decentralization.md

pantry not updated when ingredient added

Adding a recipe to the db doesn't update the client-side db so searching doesn't show the newly added ingredient in the pantry.

The client needs to query for the pantry again once they add an ingredient to the pantry.

Convert into single-page webapp

Load the home page immediately and try to load js after the fact. Single page is just a pretty front end for the back end and requires less maintenance than separate webpages... right?

Limit stored recipes

Limit number of recipes stored in memory by file database (dbAdapters/file.js) determined by configuration file. Default to 1000 recipes.

Store received recipes

Instances should store recipes they've received so they don't have to be retrieved in the future and can be read offline.

Add tor integration

Add tor integration to transmit data over data between server and client.

Create JS-less implementation of the webpage.

For those that wish to browse recipes via Tor, a JS-less implementation is required. One method of implementing this is to initially send a JS-less implementation with a loader script. If JS is enabled, then the loader script loads the other scripts and modifies the DOM to use JS.

It'd probably be best to use a framework for this to avoid increasing workload.

add pantry

be able to store the following about ingredients:

  • amount
  • unit
  • ingredient ID
  • expiration date

App crash on missing recipe.json for fileDb

FileDB fails to keep the app alive when the file is not found. Desired behavior is keeping the app alive and simply printing an error to the console. This allows the server to still use the slaves.

If using slaves is disabled, the app should still stay up and respond with no data to recipe requests.

Edit amounts in pantry

Users should be able to manually reduce the amount in the pantry from the pantry display page instead of relying on the feature implemented in #67

routers/data.js delete route doesn't use promise syntax

routers/data.js doesn't handle the promise returned by localDB.delete(). It is currently used as follows

router.delete('/', (req, res) => {                                               
    if (req.query.title && localDB.delete(req.query.title)) {                    
        res.status(200)                                                          
    } else {                                                                     
        res.status(404)                                                          
    }                                                                            
})

Make slave notification option

Notifying a master instance that the instance is willing to be a slave should be opt-in. Make it an option in the config.

Use relative URI for posting to server

Client-side script tries to POST to example.com/data but if the server is hosted on a different root, the client query fails. E.g. server is hosted on example.com/root but requests still go to example.com/data when it should be example.com/root/data.

Remove concept of master and slaves

Make all instances the same, essentially making all instances a slave and master combined. People can "subscribe" to all the servers they want to use as databases. This will require a nice way to identify servers (look into scuttlebutt)

Tell user if recipe being added already exists

Instead of simply ignoring the recipe being added if the title already exists as the following code does in dbAdapters/file.js

recipes.forEach((recipe) => {                                                
    if (data.recipes.every(_recipe => recipe.title !== _recipe.title)) {     
        data.recipes.push(recipe)                                            
    }                                                                        
})

Display the recipes that already exist as errors on the client-side.

Document how searches work

Document slave and local search methods in a general sense so that new people know, generally, how recipes are retrieved.

Add tests to db

Add tests to the file db for all of its functions that manipulate data (not file loading).

This will help avoid regression.

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.