A simple and interactive CRUD application that mimics the behavior of a vending machine. This application was built as a learning project and serves as an introduction to the PERN stack (PostgreSQL, Express.js, React.js, Node.js).
-
Customer:
- Make purchases by selecting an item and entering the total amount. The application will calculate the change for you.
-
Vendor:
- Add, delete and update items available in the machine.
- Get a record of all customer transactions.
- Add funds to the machine by setting the total fund.
- Get the current items available in the machine.
- PostgreSQL
- Express.js
- React.js
- Node.js
- Clone the repository to your local machine.
- Install the dependencies by running npm install in both client and server directories.
- Set up the database by following the instructions in the server/src/db/database.sql file (Make sure to configure the db.js file).
- Start the server by running npm start or npm run dev for development mode in both client and server directories.
- Access the application by navigating to http://localhost:3000 in your browser.
The application is ready to use. You can switch between the customer and vendor interfaces to perform different actions. Enjoy!