Alma Self-Checkout application (fork) that can run in a contact-free environment (using a scanner).
This web app utilizes the Alma API to power a self checkout station. There are two components to the selfcheck app: a client and a server.
The (node) server proxies ALMA api requests so that secrets don't have to be shared with clients. The server also filters ip addresses so that access is limited to intended sources.
The (react + tailwind) client facilitates touchless interaction, given the availability of a barcode scanner. This application has been built with the aim of making the library covid-safe by supporting touch free interactions for all user input.
- Clone the repository to your machine.
- Run
npm install
in the cloned directory. - Copy
example_config.js
, rename it toconfig.js
, and set the configuration variables. - Set your node env port if you don't want it to run on 3000 (recommended).
- Optionally, set up an Apache reverse proxy, and limit to the IP address(es) of your kiosk(s). The server can only handle requests from IPs in the configuration file.
- Navigate to the
/client
directory - Run
npm install
andnpm run build
to set up the client. The server will serve the client directly from/client/build/
which is generated in thenpm run build
step.
Once you have completed the installation steps:
node main.js
To get the benefits of hot reloading that come with create-react-app, this workflow works:
- Modify
client/src/api/apiConstants.js
so that port is hardcoded to 3000 (never push this change). - Run
node main.js
(now listening on 3000). - In
/client
, instead ofnpm run build
, runnpm start
. This will probably try to host on port 3000 and ask if you'd like to use a different port. Choose yes (it will probably host on 3001).
Now, http://localhost:3001 is the create-react-app webpack hosted version of the client (it's not being served by the server). This means that client side code updates hot-reload and server requests continue working (because you hardcoded the port and started the server to begin with).