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 (opens in a new tab) (required to register apps)
- BigCommerce partnership (opens in a new tab) (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 (opens in a new tab) that runs our Node / React / Next.js sample app (opens in a new tab).
Alternatively, you can clone the GitHub repo for your preferred stack:
- Node / React / Next.js (opens in a new tab)
- Python / Flask (opens in a new tab)
- PHP / Silex (opens in a new tab)
- Ruby / Sinatra (opens in a new tab)
- Laravel / React (opens in a new tab)
Testing locally with ngrok
You can use ngrok (opens in a new tab) to test apps locally. It's easy to install and works well with Express (opens in a new tab):
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 app
For step-by-step instructions, see How to Test App Authentication Locally with ngrok (opens in a new tab) on our developer blog (opens in a new tab).
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 (opens in a new tab) using the app's callback URLs. Use the following steps to register:
- Sign in to the Developer Portal (opens in a new tab).
- 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_id
andclient_secret
.
Installing a draft app
Any store registered to the same email as your Developer Portal (opens in a new tab) 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 (opens in a new tab).
- Click the draft app thumbnail to install the draft.
- Once you click Install, BigCommerce will begin the OAuth flow by making a
GET
request to the app's/auth
callback 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
- Node / React / Next.js (opens in a new tab)
- Python / Flask (opens in a new tab)
- PHP / Silex (opens in a new tab)
- Ruby / Sinatra (opens in a new tab)
- Laravel / React (opens in a new tab)
Tools
- Node API Client (opens in a new tab)
- Python API Client (opens in a new tab)
- PHP API Client (opens in a new tab)
- Ruby API Client (opens in a new tab)
- Ruby OmniAuth Gem (opens in a new tab)
- BigDesign Developer Playground (opens in a new tab)
- Figma UI Kit (opens in a new tab)
Blog posts
- How to Test App Authentication Locally with ngrok (opens in a new tab)
- Building a BigCommerce App Using Laravel and React (opens in a new tab)
- BigDesign Tutorial (opens in a new tab)