Coder Social home page Coder Social logo

highlandstech / pos-system Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wisepythagoras/pos-system

0.0 0.0 0.0 846 KB

A free, open source, and simple to use and set-up POS app.

License: GNU General Public License v3.0

Shell 0.09% JavaScript 2.27% Go 33.67% TypeScript 60.78% Makefile 0.19% HTML 2.99%

pos-system's Introduction

Point-of-Sale App

Point of sale app screenshot

This point-of-sale (POS) app, with its administrative panel, was meant to be a simple to use alternative to all the restrictive paid apps for small shops, street fairs, and neighborhood festivals. My goal is to slowly build this into a WordPress for point of sales apps.

Building

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

git clone https://github.com/wisepythagoras/pos-system && cd pos-system
make current_arch

If the build completes without any issues, you should have an executable file in ./bin. Also, create a config based on config.example.yaml and then run:

./bin/pos-system

Then build the front end apps:

yarn build && yarn build-admin

Now you can access the POS app via http://localhost:8088.

Runtime Dependencies

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

sudo apt install wkhtmltopdf

Deploying

If you wish to deploy the app, you can use a $35 Raspberry Pi running Raspberry Pi OS Lite or Ubuntu Server, if you wish to have a 64-bit version.

You can create a dedicated Wi-Fi network and connect the Raspberry Pi directly to the router. After that, you'll have to drop this source directory somewhere (see the [Building] section) and create a config.yaml file following the example in config.example.yaml. Then direct your tablet(s) to http://localhost:8088. That's it!

Printing

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.

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.

CUPS screenshot

User Management

There is an admin panel for creating and deleting users, but updating them is not supported at the moment. You can either delete the previous user and re-create one, or update the user record in the database. Simply open pos.db with SQLite Database Browser, or any other app that can open sqlite databases, and then click on the "Execute SQL" tab or go to the "Browse" tab and update the record you wish.

Product Management

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.

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'

You can create any number of product types/categories via the PUT endpoint /api/product/type. An admin form for creating and managing these is being built.

Startup Service

Read this guide.

What's missing

  1. Receipt printer support.
  2. Manage products from the admin panel.
  3. Manage users through the admin panel.
  4. Allow cashiers to select between multiple printers.
  5. Separate app/page for stations to fulfill orders.
  6. Extension/module engine.

License

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.

pos-system's People

Contributors

wisepythagoras avatar foobar2016 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.