ch4ot1c / nanopos

A simple Lightning :zap: point-of-sale system, powered by Lightning Charge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nanopos

npm release MIT license Pull Requests Welcome IRC

A simple Lightning ⚡ point-of-sale system with a clean & minimal web UI.

  • Optimized for places selling fixed-price items (like coffee shops, falafel stands or barber shops), but also has an option for billing custom amounts.
  • Small codebase (~60 server-side LoC + ~70 client-side LoC), great starting point for developing your own Lightning Charge apps!

Powered by ⚡ Lightning Charge.

See demo video here ➤

Setup

$ npm install -g nanopos

$ edit items.yaml # see file format below

$ nanopos --items-path items.yaml --charge-token mySecretToken --currency USD
HTTP server running on localhost:9116

That's it! The web server should now be running on port 9116 and ready to accept payments.

Example items.yaml file

tea:
  price: 0.02 # denominated in the currency specified by --currency
  title: Green Tea # title is optional, defaults to the key

coffee:
  price: 1

bamba:
  price: 3

beer:
  price: 7

hat:
  price: 15

tshirt:
  price: 25

CLI options

$ nanopos --help

  A simple Lightning point-of-sale system, powered by Lightning Charge.

  Usage
    $ nanopos [options]

  Options
    -c, --charge-url <url>      lightning charge server url [default: http://localhost:9112]
    -t, --charge-token <token>  lightning charge access token [required]

    -y, --items-path <path>     path to yaml file with item config [default: ./items.yaml, file is required]
    -x, --currency <currency>   currency to use for item prices [default: BTC]
    -m, --theme <name>          pick theme from bootswatch.com [default: yeti]
    -l, --title <name>          website title [default: Lightning Nano POS]

    -p, --port <port>           http server port [default: 9115]
    -i, --host <host>           http server listen address [default: 127.0.0.1]
    -h, --help                  output usage information
    -v, --version               output version number

  Example
    $ nanopos -t chargeSecretToken -x EUR -y items.yaml

License

MIT

About

A simple Lightning :zap: point-of-sale system, powered by Lightning Charge

License:MIT License


Languages

Language:JavaScript 75.7%Language:HTML 22.0%Language:Shell 2.3%