Giter Site home page Giter Site logo

api's Introduction

waiterio/api 🌐

Build Status Code Climate CodeCov Dependencies

The api for the frontend of the waiter service build with postgres and node. To get started, read the installation instructions below. If would like to request a feature or report a bug, please submit an issue.

Installation

There are two ways to get the api up and running. The simplest way is to press this magical 🌈 button that deploys the project to your one of your heroku dynos.

Deploy

If you'd rather get your hands dirty and do it yourself, you first of all need to clone this repository. After you have done that, you need to install the required dependencies using npm. During the installation of the required modules you might as well grab a cup of coffee (depending on your internet connection this might take a little longer).

$ npm install

After the dependencies are installed, all that's left is configuring the applications settings to your liking. You can find the settings in the settings.js file in the projects root directory.

{
	"port": 8081,
	"saltRounds": 10,
	"environment": "development",
	"secret": "SuperSecretWaiterIOStuff",
	"expireDays": 7,
	"database": "waiter.db"
}

Try it yourself

There's a live demo of this api at: https://waiterio-api.herokuapp.com/

api's People

Contributors

snapsnapturtle avatar greenkeeperio-bot avatar vitaly-t avatar

Stargazers

 avatar William Majanja avatar CHEWTOYS avatar Jonas Reitmann avatar  avatar

Watchers

James Cloos avatar Jonas Reitmann avatar Sebastian Rühmann avatar  avatar Hani Tawil avatar William Majanja avatar

api's Issues

LIMIT Filter for DB Queries

There should be a limit filter of how many items are returned to the api user. This should be done in the same manner as the sorting parameter.

/api/orders?limit=100

The above would result in a limit of 100 orders. It should work on every endpoint that returns more than on element.

DELETE Orders Endpoint

This endpoint will not really delete the order, but rather deactivate it and it's order items, so the reports will not be messed up.

Automatic Unit Tests

To maintain code quality and product reliability, automatic tests help to test weather new features work and if existing features did not break. There are a number of different Frameworks that are widely available, such as MochaJS and Sinon.

Auth service for the admin-login

Potentially later it is also used for a multiple user login. I think about a registration form for new users which get access on our servers with waiterio. This differs from our currently "self hosted open source" approach. What do you think? Maybe a free plan for developers and a cheap one for non technicians?

Sorting Options for all Data Endpoints

Like the /orders/ endpoint, all other endpoints such as /dishes/ and /users/ deserve the same sorting capabilities. This can be easily achieved by using the already common function getOrderByQuery from the DBHelpers.

dishes: POST file upload

The dishes POST endpoint have to accept and process the dishes->image. The process should check if the image is valid (eg. image size...) and save it to a image database. Maybe a AWS service could be senseful for this!?

Authentication Rate Limit

To improve security and protect the api against basic brute force attracts, a rate limit should be enforced on all /auth endpoints

"Deploy to Heroku" Button

Allowing anyone to deploy a working copy of this project to their Heroku Account with the push of a button. Instructions can be found here: https://devcenter.heroku.com/articles/heroku-button

Essentially it is adding an app.json file to the root of this project containing information about the project

{
  "name": "Node.js Sample",
  "description": "A barebones Node.js app using Express 4",
  "repository": "https://github.com/heroku/node-js-sample",
  "logo": "https://node-js-sample.herokuapp.com/node.png",
  "keywords": ["node", "express", "static"]
}

Also the Button must be included in the README.md File, like so

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

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.