Beginning App Development
The BigCommerce team has developed an array of sample apps and tools to assist developers in the initial phase of app development. In this article, we’ll introduce those tools and go over how to begin app development by installing and registering a draft app.
Getting started
Here’s a few things you’ll need before beginning app development:
- BigCommerce sandbox store (required to test app installation)
- Developer Portal Account (required to register apps)
- BigCommerce partnership (required to publish apps to marketplace)
Beginning quickly
The fastest way to begin app development is by starting with one of our sample apps. You can follow our Building Apps Quick Start Tutorial, either alone or in conjunction with spinning up a Heroku instance that runs our Node / React / Next.js sample app .
Alternatively, you can clone the GitHub repo for your preferred stack:
Testing locally with ngrok
You can use ngrok to test apps locally. It’s easy to install and works well with Express :
npm install express-generator -g # install express generate
express myapp # generate new express app
cd myapp # move into app dir
brew install ngrok/ngrok/ngrok # install ngrok using homebrew
ngrok config add-authtoken <TOKEN> # Obtain your authtoken by going to https://dashboard.ngrok.com/get-started/your-authtoken
npm install # install dependencies
ngrok http http://localhost:8080 # start appFor step-by-step instructions, see How to Test App Authentication Locally with ngrok on our developer blog .
Registering a draft app
Once you’ve exposed your app to the internet, you can register it as a draft app in the Developer Portal using the app’s callback URLs. Use the following steps to register:
- Sign in to the Developer Portal .
- Click Create an App.
- Name your app.
- Click Technical.
- Enter your app’s callback URLs. If you’re using ngrok, they’ll look like this:
- Auth:
https://4022ffe4.ngrok.io/auth - Load:
https://4022ffe4.ngrok.io/load - Uninstall:
https://4022ffe4.ngrok.io/uninstall
- Auth:
- Click Update & Close.
- Click View Client ID to view the app’s
client_idandclient_secret.
Installing a draft app
Any store registered to the same email as your Developer Portal account can install your draft apps. Use the following steps to install:
- Sign in to the store and navigate to Apps > My Apps > My Draft Apps.
- Click the draft app thumbnail to install the draft.
- Once you click Install, BigCommerce will begin the OAuth flow by making a
GETrequest to the app’s/authcallback URL. If the app handles all the requests successfully, the app has been installed and you can begin feature development.
Next steps
Resources
Related articles
Sample apps
Tools
- Node API Client
- Python API Client
- PHP API Client
- Ruby API Client
- Ruby OmniAuth Gem
- BigDesign Developer Playground
- Figma Component Library
Blog posts
- How to Test App Authentication Locally with ngrok
- Building a BigCommerce App Using Laravel and React
- BigDesign Tutorial