Grocery API 

Preview of the Grocery-API project

  API

An API for inventory management, scoped to a small grocery store.

Live link here!

Tech stack

express

mocha-chai

mongodb

mongoose

nodejs

Project

The current project is built with Express, a Node.js framework for backend code. Mongoose is used as Object Document Mapper along with the NoSQL database MongoDB. Unit tests are modeled with Chai and run with Mocha. As authentication mechanism, a local strategy is implemented with Passport. Finally, the API is deployed to Heroku.

Project requirements

Users

  • Admin: Super user that can generate reports, manage inventory and users.
  • Manager: Logged in user that can manage the inventory and cashier users.
  • Cashier: User that can make, edit and close sales.

Models

  • Product:
    • Name, category, stock, price, code.
  • User:
    • Username, name, email, password, role.
  • Sale:
    • Products, quantity, subtotal, total.

API Documentation

The Grocery API documentation can be consulted in Swagger Hub.

Team