Code Monkey home page Code Monkey logo

Lightning Sale Point of Sale

Set up the .env file or environment variables for database and LND config! Or use github.com/lightningsale/LightningSale and docker-compose up

This software is alpha only, do not use with real money!

Known issues:

  • closeChannel doesn't work
    • Also missing force close functionality
  • lookupInvoice doesnt work

Milestone 1

  • Set up users and authentication
  • 2-Factor auth
  • Configure (Local currency, invoice timeout)
  • Funding
  • Peers
  • Channels (Missing open/close channel, missing support in LND REST)
  • Transactions
  • Invoices
    • Create invoice
    • Pending invoices
    • Remove old unpaid invoices
    • Invoice details (missing support in LND REST)
  • Status
    • LND starting up (wait for sync),
    • Wallet is encrypted
    • ask for decryption key etc

Milestone 2

  • Design / UX
  • Local currency
  • Realtime information
  •  Secure deployments / Auditing
  •  Streamline deployments (collect all env variables in docker-compose.yml etc)
  • Backups and Recovery
  • Encrypted wallet

Milestone 3

  1.  Email notifications

First setup:

  • git clone https://github.com/lightningsale/LightningSale
  • Copy .env.dist to .env and modify EXTERNALIP
  • docker-compose up
  • docker-compose exec pos composer install
  • docker-compose exec pos php bin/console doctrine:database:create
  • docker-compose exec pos php bin/console doctrine:schema:update --force
  • docker-compose exec pos php bin/console app:create:user <-- Create first user

Production Docker-compose.yml file (not yet!)

version: "2.1"

services:
  lnd:
    image: lightningsale/docker-lnd
    environment:
      - EXTERNALIP=92.221.98.237
      - EXTERNALPORT=9736
      - RPCUSER=lightningsale
      - RPCPASS=lightningsale
      - NETWORK=testnet
      - CHAIN=bitcoin
      - DEBUG=info
      - REDIS_URL=redis
    volumes:
      - lnd:/root/.lnd
    ports:
      - 9736:9736
      - 127.0.0.1:10009:10009
    expose: ["8080"]
    entrypoint: ["./start-lnd.sh"]
    hostname: lnd
    command:
      - "--neutrino.active"
      - "--neutrino.connect=faucet.lightning.community"
      - "--autopilot.active"
      - "--no-macaroons"
      - "--peerport=9736"
  pos:
    image: lightningsale/lightning-sale
    ports:
      - 80:80
    environment:
      - APP_ENV=prod
      - APP_DEBUG=false
      - APP_SECRET=22375fd9fdfe7235fb7386334f6e9632
      - DATABASE_URL=mysql://root:abcd1234@mysql:3306/lightningsale
      - LND_HOST=lnd
      - LND_PORT=8080
      - EXTERNALIP=92.221.98.237
      - EXTERNALPORT=9736
      - RPCUSER=lightningsale
      - RPCPASS=lightningsale
      - REDIS_URL=redis
    depends_on:
      - mysql
      - lnd
    volumes:
      - .:/var/www
      - lnd:/var/www/var/lnd
  mysql:
    image: mysql
    ports:
      - 127.0.0.1:3307:3306
    volumes:
      - mysql:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=abcd1234
  redis:
    image: redis
volumes:
  lnd: ~
  mysql: ~

LightningSale TODO:

Components:

  • -LND gRPC Client- Use LND Rest Client
  •  Auth Component (Handle owners and Users)
  •  QR Code
  •  Payments Dashboard

Setup

  • Setup a database
  • Configure settings with environment variabelse or configure them in the .env file
  • Configure wallet / kommunikasjon med LND
  • Configure exchange
    • Select Currency
    • Select transaction fee (for customer)
    • Settlement address
    • Settlement (immediatly, on demand, periodic)
  • Create first user
  • Setup script?

Pages / TODO:

  • Login
  •  2-Factor authentication
  • Customer details (whitelabel stuff
    • Node/Wallet details/Status
      • Channe funding
      • Wallet funding
    • Setup user accounts
  • User details
  • Dashboard
    • Create payment request (invoice)
    • List payments (status) (Select wich payment to show on screen)
    • Payment details
    • Screen ID (and what is displayed)
  • Payment request details screen (Consumer facing)
    • Login (With screen ID)
    • Whitelabel "default" screen
    • Payment request details:
      • QR-Code
      • Whitelabel
      • Serialized payment request
      • Price in Bitcoin / Selected currency

Domain model

  • User (base, Cashier, Merchant)
  • Screens (one pr logged in user?)
  • Payments

Lightning Sale's Projects

lightningsale icon lightningsale

A Point of Sale application, a frontend for the LND lightning node

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.