Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Point-of-Sale App
\*\*# Point-of-Sale App

![Point of sale app screenshot](docs/screenshot.png)

Expand All @@ -8,7 +8,7 @@ This point-of-sale (POS) app, with its administrative panel, was meant to be a s

This app was built with Go 1.18, so make sure you have that installed.

``` sh
```sh
git clone https://github.com/wisepythagoras/pos-system && cd pos-system
make current_arch
```
Expand All @@ -21,7 +21,7 @@ If the build completes without any issues, you should have an executable file in

Then build the front end apps:

``` sh
```sh
yarn build && yarn build-admin
```

Expand All @@ -31,7 +31,7 @@ Now you can access the POS app via `http://localhost:8088`.

The only dependency that this application has is `wkhtmltopdf` (you can find information about it [here](https://wkhtmltopdf.org/)), if you want to be able to print receipts (which you should). The website provides [downloadable](https://wkhtmltopdf.org/downloads.html) packages for many systems. However, if you are using Ubuntu or Debian, you can install it by running the following command:

``` sh
```sh
sudo apt install wkhtmltopdf
```

Expand All @@ -45,7 +45,7 @@ You can create a dedicated Wi-Fi network and connect the Raspberry Pi directly t

This app was built to use a CUPS server. You can connect your thermal printer to the Raspberry Pi you have this server running on, or to some other machine, and tell the POS app where to find it via the [config file](https://github.com/wisepythagoras/pos-system/blob/main/config.example.yaml#L27-L33).

Make sure that your printer settings are valid. You can check the settings by navifating to to http://your-server-ip:631 and under the "Printers" tab select your printer. From there, click on the second dropdown menu and click on "Set Default Options", as shown in the screenshot below.
Make sure that your printer settings are valid. You can check the settings by navigating to http://your-server-ip:631 and under the "Printers" tab select your printer. From there, click on the second dropdown menu and click on "Set Default Options", as shown in the screenshot below.

<p align="center">
<img src="docs/cups-1.png" alt="CUPS screenshot" height="320"/>
Expand All @@ -59,7 +59,7 @@ There is an admin panel for creating and deleting users, but updating them is no

You can fully manage your products from the "Products" tab in the admin page, as well as create new ones. However, you also have the flexibility of doing this through the API. The following curl is an example of how to create a new product.

``` sh
```sh
curl -X POST http://localhost:8088/api/product -d 'name=Product Name&price=$9.99&type=<ID_OF_PRODUCT_TYPE>' -H 'x-auth-token: YOUR_ADMIN_AUTH_TOKEN'
```

Expand All @@ -83,3 +83,4 @@ Read [this](/startup/README.md) guide.
Although the license for the source code is GNU GPL v3, I prohibit the use of the code herein for the training of any kind of AI model.

The GNU GPL v3 license excludes the files in `src/components/`, which retain whatever license they come with.
\*\*