Build instructions and informations
Software prerequisites
Installation
Clone the cashregister repository and run the following commands:
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
Configuration
To run the application you need to provide a .env
file to configure all required settings. Here is a list of all environnement variables:
# default hostname
VUE_APP_HOST=0.0.0.0
# current environnement { production || development }
NODE_ENV=development
# default urls to communicate to the one x backend services { dev || staging || prod }
VUE_APP_GATEWAY_URL=https://api.dev.{***}.onex.run/
VUE_APP_HUBREGISTRY_URL=https://hubregistry.dev.{***}.onex.run/
# paths for the one x backend services
VUE_APP_CART_PATH=cart
VUE_APP_PAYMENT_PATH=payments
VUE_APP_RETURN_PATH=returns
VUE_APP_RESERVATION_PATH=reservations
VUE_APP_DISCOUNT_PATH=discounts
VUE_APP_RECEIPT_PATH=receipts
VUE_APP_CASHBOOK_PATH=settlements
VUE_APP_AUTH_PATH=oauth
VUE_APP_GIFTCARD_PATH=loyalty
VUE_APP_DEVICEHUB_PATH=devicehub
VUE_APP_STOREINFO_PATH=stores
VUE_APP_USER_PATH=users
# client-token for datadog, the app is also running without the token
# in that case, no logs will be send to datadog
VUE_APP_DATADOG_CLIENT_TOKEN={ token }
# for dev only
# autofilled username and password for faster login
DEV_USER_NUMBER = 11111
DEV_USER_PIN = 111
Recommended tools
Vue-Devtools
Vue Browser extension to debug and inspect your Vue.js website.
For Opera you have to install the "Install Chrome Extensions" add-on and than you can use the Chrome Extension in your Opera browser.
Recommended Editor
This project is built with Visual Studio Code and all needed / recommended extensions will be listed for this editor.
Editor-Extensions
Must have:
- ESLint
- Vetur
- vue
Recommended:
- Vue2 snippets
- VueHelper
- TODO Highlight
- Path Intellisense
- HTML Snippets
Noteworthy dependencies
- body-scroll-lock - Enables body scroll locking (for iOS Mobile and Tablet, Android, desktop Safari/Chrome/Firefox) without breaking scrolling of a target element.
- datadog - Datadog browser logs library.
- date-fns - Provides the most comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.
- dotenv - Zero-dependency module that loads environment variables from a .env file into process.env.
- pdfmake - PDF document generation library for server-side and client-side in pure JavaScript.
- sockjs-client - SockJS is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between
- stompjs - Provides a STOMP over WebSocket client for Web browser or node.js. applications. the browser and the web server.
- vue - Progressive framework for building user interfaces. It is designed from the ground up to be incrementally adoptable, and can easily scale between a library and a framework depending on different use cases. It consists of an approachable core library that focuses on the view layer only, and an ecosystem of supporting libraries that helps you tackle complexity in large Single-Page Applications.
- vuex - Centralized State Management for Vue.js.
- vue-awesome - Awesome SVG icon component for Vue.js, with built-in Font Awesome icons.
- vue-barcode - Barcode component for Vue.js, based on JsBarcode. Currently used project is deprecated, has to be replaced with
@fengyuanchen/vue-barcode
- vue-resource - The plugin for Vue.js provides services for making web requests and handle responses using a XMLHttpRequest or JSONP.
- vue-router - The official router for Vue.js. It deeply integrates with Vue.js core to make building Single Page Applications with Vue.js a breeze.
- vue-swipe-actions - iOS style swipe actions for Vue.js.
- vue-touch - Hammer.js wrapper for Vue.js. Currently used project is deprecated, has to be replaced with
@jerrybendy/vue-touch-events