This is a boilerplate for a Point of Sale (POS) system. It provides a starting point for building a POS system using Next.js, Docker, and other technologies.
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of Docker.
- You have a Windows/Linux/Mac machine with a recent version of Node.js and npm installed.
To start the application, follow these steps:
- Clone this repository.
- Navigate to the project directory.
- Run the following command to start the Docker container:
docker-compose up --build
This command will start all the services defined in docker-compose.yml.
Once the server is up and running, you can access it at:
http://localhost:3000
For the database
http://localhost:8000
Use the following credentials to access into the database:
Username: admin
Password: password
This section provides a step-by-step guide on how to use the application.
First, choose the member and the menu items you want to order. For each menu item, specify the quantity you want to order.
After selecting items, you can review your order and the total price.
Please note the following discount conditions:
- Members receive a 10% discount on their orders.
- Orders that include double quantities of the Orange, Pink, or Green sets receive a 5% discount.
Once you've reviewed your order, you can submit it. The order will be stored in the database for record-keeping.
This project uses Jest for testing. Tests are used to verify the correctness of the price calculation logic among other functionalities.
To run the tests, you need to have Node.js and npm installed on your machine. Once you have these installed, navigate to the project directory in your terminal and run the following command:
npm run test