{"id":13489418,"url":"https://github.com/bigcommerce/channels-app","last_synced_at":"2025-03-28T04:31:11.879Z","repository":{"id":44842295,"uuid":"201667109","full_name":"bigcommerce/channels-app","owner":"bigcommerce","description":null,"archived":true,"fork":false,"pushed_at":"2024-02-13T14:02:49.000Z","size":937,"stargazers_count":14,"open_issues_count":3,"forks_count":9,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-31T02:33:39.796Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigcommerce.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-10T18:16:38.000Z","updated_at":"2024-02-13T14:03:09.000Z","dependencies_parsed_at":"2024-10-31T02:31:21.588Z","dependency_job_id":"43890424-53ab-4b95-98e8-c0e4520c3968","html_url":"https://github.com/bigcommerce/channels-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fchannels-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fchannels-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fchannels-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fchannels-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigcommerce","download_url":"https://codeload.github.com/bigcommerce/channels-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245970534,"owners_count":20702435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:00:27.214Z","updated_at":"2025-03-28T04:31:10.889Z","avatar_url":"https://github.com/bigcommerce.png","language":"TypeScript","funding_links":[],"categories":["Open source example apps"],"sub_categories":["Other or no framework"],"readme":"# Overview\n\nThe Channels App serves two main purposes, as:\n\n -  A reference implementation for:\n\t- Channel, Sites, and Routes APIs \n\t- BigDesign React Components\n -\tA way to manage the channels connected to a BC storefront and their corresponding sites and routes\n\n## App Installation\n\nIt can be installed on a BC storefront [here](https://apps.bigcommerce.com/details/18212).\n\n## Local Development \u0026 Testing\n\nTo get the app running locally, you'll need the following dependencies:\n\n - A BigCommerce Store: you can sign up for a trial [here](https://www.bigcommerce.com/essentials/) or use an existing store / sandbox store\n - Create API credentials: you can find instructions [here](https://developer.bigcommerce.com/api-docs/getting-started/authentication#authentication_getting-api-credentials)\n - A Netlify account: Sign Up for netlify [here](https://app.netlify.com/signup)\n - ngrok: You can install using homebrew `brew cask install ngrok`\n\n### Setup Project\n\nRun the following commands:\n\n 1. `npm install netlify-cli -g`\n\n 2. `netlify init`\n\n\tNotes:  \n\n\t - You can use most of the specified defaults when prompted\n\t - Build command should be `yarn build`\n\t - Directory should be `packages/app-react/build`\n\n 3. `netlify addons:create fauna`\n\n 4. `netlify addons:auth fauna`\n\n\t Notes:\n\n\t  - You need to agree to import the database\n\t  \n### Setup FaunaDB DB and Index\n\n 1. Log into FaunaDB and go to the db that was created from netlify\n 2. Create a collection named `bigcommerce_stores` using defaults. To create a collection, click on the name of the database\n\n![Create Collection Image](./instructions/create_collection.png)\n\n 3. Create Index `store_hash` in `bigcommerce_stores`\n\n![Create Index Image](./instructions/create_index.png)\n\n\t Notes:\n\n\t  - Make sure to add data.store_hash to both terms and values\n\t  - Select the unique checkbox\n\n### Setup ngrok tunnel for app\n\n 1. `cp ngrok-sample.yml ngrok.yml` \n 2. Retrieve and replace the auth token in the `ngrok.yml` file\n 3. Set `authtoken` in `ngrok.yml` file with value from https://dashboard.ngrok.com/get-started\n 4. Set hostname to `\u003cusername\u003echannelsdevapp.ngrok.io` in the `ngrok.yml` file.\n\n\t Notes: \n\n\t  - The username can be whatever you like\n\n### Setup BC App\n\n 1. Log into your store's [dev tools](https://devtools.bigcommerce.com/my/apps)\n 2. Create an app and in the \"Technical\" section, set the following URLs:\n\n\t  - Auth Callback URL: `https://\u003cusername\u003echannelsdevapp.ngrok.io/.netlify/functions/bigcommerce_auth`\n\t  - Load Callback URL: `https://\u003cusername\u003echannelsdevapp.ngrok.io/.netlify/functions/bigcommerce_load`\n\t  - Uninstall Callback URL: `https://\u003cusername\u003echannelsdevapp.ngrok.io/.netlify/functions/bigcommerce_uninstall`\n\n 3. Select \"modify\" permissions for the following scopes:\n\n\t  - Channel Settings\n\t  - Sites \u0026 Routes\n\n### Setup .env\n\n 1. `cp .env-sample .env`\n\n 2. Update and replace the following in `.env`:\n\n\t- BC_CLIENT_ID: BigCommerce App Client Id\n\t- BC_CLIENT_SECRET: BigCommerce App Secret\n\n\t- BC_AUTH_CALLBACK: Replace with Auth Callback URL from above\n\t- APP_URL= Replace with ngrok hostname from above `https://\u003cusername\u003e_channelsappdev.ngrok.io/`\n\nNote: The environment variables in `.env` will also need to be set in Netlify in order for the deployed version to work. [TODO]\n\n### Start Service\n\nIn a terminal, execute the following in the root of the project directory to start ngrok: \n\n`ngrok start --config ngrok.yml site`\n\n*Note*: if you stop and restart this process, it will give you a new host domain that you will need to update for each of the 3 Callback URLs in your app's dev tools section\n\nIn another terminal execute in the root of the project directory to start the service: \n\n`yarn netlify:dev`\n\nThe service will live reload on saved changes.  If you want to restart simply stop the `yarn netlify:dev` process and restart it, \nthere should be no need to restart ngrok.\n\nReference: \n- https://docs.fauna.com/fauna/current/start/netlify\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fchannels-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigcommerce%2Fchannels-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fchannels-app/lists"}