GithubHelp home page GithubHelp logo

nugest-api's Introduction

Nugest

A basic web menu suggester written in PHP and Laravel 5.1. It uses machine learning to suggest dishes based on past experiences.

NEW: A RESTful version of this project is being developed. You may have a look at the code checking out the API branch for the server-side implementation and nugest-web repository to check the client-side code, powered by AngularJS.

Notes

app/Meal

Recommendations are calculated based on a month worth of meals (30 days x 2 meals = 60 meals), having preference for the most consumed dish(es) while trying not to repeat any of last meal's dish (7 days x 2 meals = 14 meals). If all dishes are repeated then the least used will be recommended in order to create some balance between most/less used dishes. Null is returned if no meals are found (usually due to lack of data to compute).

app/Http/Controllers/Controller

A setFlashMessage($type, $message) function was added to make it easier to set a message along with twitter's bootstrap .class-type, e.g.: $this->setFlashMessage('danger', 'Oops! Something went wrong...');

app/Http/Controllers/Auth/Auth controller

Only Signin and Signout built-in traits are being used since I needed to costumize user registration action.

app/Http/Controllers/User/User controller

Email confirmation expires after 7 days as a security measure. Only valid confirmations will affect the user and be persisted to database.

Custom validators

  • checkauth: Checks if given field value matches encrypted user password. Mainly used when updating important information such as password or email address.

Tests

Unit/functional tests run using SQLite's memory database to speed the process.

nugest-api's People

Contributors

ricardosncosta avatar

Watchers

 avatar

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.