Fastify POS (Point-of-sale) app that provides transaction, product and user management by making use of Sequelize (ORM) and MySQL (database).
Munchies provides the following key features:
- Users are able to register and login using an email address and password
- CRUD operations of Products
- Link and unlink a product to another as an upsell product
- Create and fetch transactions
Please note, this README does not include the installation and setup of a local MySQL server.
Clone the munchies repo:
git clone https://github.com/codecventer/munchies.git
Install munchies with npm:
cd munchies
npm i
Run the provided SQL script, located at assets/Munchies_DB_Script.sql
, in your running local MySQL server.
- Rename the
example.env
file to.env
- Inside, replace the string value of the
DB_CONNECTION_STRING
variable with your own connection string
Run the munchies app:
npm run dev
Beware, for maintenance purposes, all unit tests must pass before running the application locally.
Open Postman and import the Munchies Collection, located at assets/Munchies_Collection.postman_collection.json
.
A valid JWT token is required for any product or transaction related requests. To obtain this:
- Send a Register User POST request:
POST /users/register
Parameter | Type |
---|---|
emailAddress |
string |
password |
string |
- Send a Login User POST request:
POST /users/login
Parameter | Type |
---|---|
emailAddress |
string |
password |
string |
- From the response, copy the value of the token and paste it in the (Postman) Development environment's 'token' variable
- Now you should have authenticated access for product and transaction related requests.
Access granted! Now that you have authenticated access, you are able to send all other requests. The complete Postman documentation can be found here.