A sample retail demo application built on top of NCR's APIs.
Demo // Features // Overview // How to Use // Support // Contributing // License
- Catalog API Integration
- User registration/authentication
- Adding to/viewing Cart
- Management of Sites
- Management of Categories & Catalog
- Singule store management
- Catalog Search
MART integrates with multiple NCR APIs including Order, Catalog, Sites, Security, & Provisioning. The demo application showcases one possible way to utilize one or many of the available APIs.
This repository showcases an imaginary retail company with multiple stores in different location. The company can be managed globally as well as at the individual store level.
🚧 Important 🚧
If this is the first time using a project with the generated keys, you will most likely not see any data.
Why? When using the Test Drive feature, each application is a fresh installation with no data. See Seed the Database to populate the database with test data and get started quickly.
-
First, clone the repository for local development.
git clone https://github.com/NCR-Corporation/ncr-retail-demo.git
-
Secondly, open the repository in an editor and rename
.env copy.local
to.env.local
. -
After renaming, open
.env.local
and update the variablesREACT_APP_BSP_SECRET_KEY
,REACT_APP_BSP_ORGANIZATION
,REACT_APP_BSP_SHARED_KEY
with data found in the NCR Developer Portal. To learn more about receiving access, create an account on the NCR Developer Portal and visit the Test Drive Documentation. Useopenssl rand -base64 32
to generate a random value to be used for the fieldNEXTAUTH_SECRET
. -
Next, install all npm packages in the project directory:
yarn install
-
Finally, run the development server:
next dev
-
Open http://localhost:3000 with your browser to see the sample demo application generated with your keys.
This is a Next.js project bootstrapped with
create-next-app
. To learn more about Next.js, visit the Next.js Documentation.
Every new application built with NCR is a blank installation with no data. If you are looking to become familiar with the APIs and see the application in action locally, you will need to either:
- Create your own Sites, Categories, Groups, and Catalog
- Seed the database.
To seed the database, visit the Admin Dashboard by clicking "⚙ Manage" in the top of the homepage or visiting /admin/dashboard
. From there, near the top is a blue button "⬇ Build Sample Database". You will still have to have a valid Organization, Secret, and Shared key in your .env.local
.
Seeding the database is Experimental at this time. To learn more about how it works visit /pages/api/export.js
. You may run into issues and this is the best place to start debugging. To view the data being generated, visit the /data/
folder.
Note: The Retail Demo currently uses NCR's Staging environment while certain APIs are not in production yet. If you are looking for more help, please reach out to the #developer-advocate-team
in Slack.
Feel free to open an issue! If there are any bugs you find or any features you would like to see implemented, create the appropriate issue on the repository.
This sample app project is released under the Apache 2.0 license. The license's full text can be found here.