Coder Social home page Coder Social logo

ai-app-foundation's Introduction

AI App Foundation

This single-click app presents BigCommerce merchants with the ability to generate product descriptions. It's also listed in our app marketplace.

๐ŸŒŸ This was originally open sourced as part of the Google <> BigCommerce AI Hackathon. Check out that event's hackpack for more detail on Vertex AI and BigCommerce App Extensions. ๐ŸŒŸ

Install

  1. Use Node 18+ and NPM 8+
  2. Install npm packages
    • npm install

Usage

To run the app locally, follow these instructions:

  1. 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.
  2. Register a draft app.
    • Enter app callbacks using the following syntax:
      • Auth Callback URL: https://{ngrok_id}.ngrok.app/api/app/auth, for example https://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
    • Configure the following OAuth scopes as directed in Setup:
  3. Copy .env.example to .env.
  4. Replace CLIENT_ID and CLIENT_SECRET in .env (from View Client ID in the dev portal).
  5. Update AUTH_REDIRECT in .env with the ngrok install callback URL.
  6. Enter a JWT secret in .env.
    • JWT key should be at least 32 random characters (256 bits) for HS256
  7. Replace FIRE_API_KEY, FIRE_DOMAIN and FIRE_PROJECT_ID in .env
  8. Replace GOOGLE_API_KEY= in .env
  9. Start your dev environment in a separate terminal from ngrok. If ngrok restarts, update callbacks in steps 2 and 5 with the new ngrok_id.
    • npm run dev
  10. Install the app and launch.

Deploy with Vercel

Deploy with Vercel

Contributing

Please feel free to ask questions or raise issues in GitHub Issues/Discussions.

Security

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.

Learn more

The BigCommerce platform

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:

ai-app-foundation's People

Contributors

bc-rmalyavc avatar bc-stephen-hilliard avatar bc-traciporter avatar becomevocal avatar dependabot[bot] avatar jdschmitt avatar pascalzajac avatar solofeed avatar stanzikratelbc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ai-app-foundation's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.