This single-click app presents BigCommerce merchants with the ability to generate product descriptions.
🌟 If you are hacking right now in the Google <> BigCommerce AI Hackathon event, check out our Hackpack for more detail on Vertex AI and BigCommerce App Extensions! 🌟
- Use Node 18+ and NPM 8+
- Install npm packages
npm install
To run the app locally, follow these instructions:
- Add and start ngrok. Note: use port 3000 to
match Next's server.
ngrok http 3000
- Get the
ngrok_id
from the Forwarding row. You will use it in the next step.
- Register a draft app.
- Enter app callbacks using the following syntax:
- Auth Callback URL:
https://{ngrok_id}.ngrok.app/api/app/auth
, for examplehttps://12345.ngrok.app/api/app/auth
- Load Callback URL:
https://{ngrok_id}.ngrok.app/api/app/load
- Uninstall Callback URL:
https://{ngrok_id}.ngrok.app/api/app/uninstall
- Auth Callback URL:
- Configure the following OAuth scopes as directed in Setup:
- Enter app callbacks using the following syntax:
- Copy
.env.example
to.env
. - Replace
CLIENT_ID
andCLIENT_SECRET
in.env
(fromView Client ID
in the dev portal). - Update
AUTH_REDIRECT
in.env
with the ngrokinstall
callback URL. - Enter a JWT secret in
.env
.- JWT key should be at least 32 random characters (256 bits) for HS256
- Replace FIRE_API_KEY, FIRE_DOMAIN and FIRE_PROJECT_ID in .env
- Replace GOOGLE_API_KEY= in .env
- Start your dev environment in a separate terminal from
ngrok
. Ifngrok
restarts, update callbacks in steps 2 and 5 with the new ngrok_id.npm run dev
- Install the app and launch.
Please feel free to ask questions or raise issues in GitHub Issues/Discussions.
To enhance security, include a CSRF token for sensitive actions (e.g., modifying product descriptions) or operations that might generate load or costs (such as AI prompts). This will provide an extra layer of protection and ensure proper authorization.
Looking to help the world's leading brands and the next generation of successful merchants take flight? To learn more about developing on top of the BigCommerce platform, take a look at the following resources:
- BigCommerce Developer Center - Learn more about BigCommerce platform features, APIs, and SDKs
- BigDesign - An interactive site for BigCommerce's React Components with live code editing
- Building BigCommerce Apps - Learn how to build apps for the BigCommerce marketplace
Copyright (c) 2017-present, BigCommerce Pty. Ltd. All rights reserved
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.