From f267dc4e9c9e75f31c73cd39943732162d5352a0 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Thu, 20 Oct 2022 06:10:20 +0000 Subject: [PATCH] fix: resync github docs with contentstack Signed-off-by: Brent Hoover --- guides/build-api-plugin.md | 10 +--- guides/quick-start-windows.md | 19 -------- guides/quick-start.md | 88 +++++++++++++++++++++-------------- 3 files changed, 54 insertions(+), 63 deletions(-) delete mode 100644 guides/quick-start-windows.md diff --git a/guides/build-api-plugin.md b/guides/build-api-plugin.md index adfd67e..d554dca 100644 --- a/guides/build-api-plugin.md +++ b/guides/build-api-plugin.md @@ -18,8 +18,6 @@ In this guide, we’ll create a new plugin from the template provided by Open Co * An [Open Commerce installation](/developer/open-commerce/guides/quick-start/) - * The [Open Commerce CLI](https://github.com/reactioncommerce/cli) installed - * [Docker](https://www.docker.com/) * [npm](https://www.npmjs.com/get-npm) @@ -28,13 +26,9 @@ In this guide, we’ll create a new plugin from the template provided by Open Co ## Create your custom plugin -Navigate to where you have created your api project (called `myapiserver` in the getting started doc). From there -you can execute `reaction create-plugin api ` where "mypluginname" is the name of the plugin you want -to create. This will create new plugin from the plugin template and place it in the `custom-packages` directory. The local instance of the plugin has automatically been added to `plugins.json` so that you can work on it locally +We’ll be creating a plugin that extends our products schema to include a volume attribute for our backpacks. To build our custom plugin, we’ll first navigate to where we created our API project (called `myapiserver` in the [Quick Start Guide](/developer/open-commerce/guides/quick-start/)). From there we'll execute `reaction create-plugin api ` where `mypluginname` is the name of the plugin we want to create. This creates a new plugin from the plugin template and places it in the `custom-packages` directory. The local instance of the plugin is automatically added to `plugins.json` so that we can work on it locally. -Next, we’ll edit the `package.json` and `src/index.js` files to replace the template defaults with information about -our volume attribute plugin; the information in these files will be used when installing, registering and publishing -the plugin. We’ll name our plugin Product Volume, with an npm name of `@leaderpack/api-plugin-products-volume`. +Next, we’ll edit the `package.json` and `src/index.js` files to replace the template defaults with information about our volume attribute plugin; the information in these files will be used when linking, installing, and registering the plugin. We’ll name our plugin Product Volume, with an npm name of `@leaderpack/api-plugin-products-volume`. > **Note**: To keep things organized, it’s a good idea to name plugins after their “parent” plugins. In our case, we’re customizing aspects of `api-plugin-products`, so we named our plugin `api-plugin-products-volume`. diff --git a/guides/quick-start-windows.md b/guides/quick-start-windows.md deleted file mode 100644 index c1812cb..0000000 --- a/guides/quick-start-windows.md +++ /dev/null @@ -1,19 +0,0 @@ -## Install Mailchimp Open Commerce on Windows 10/11 - -### Install WSL2 - - https://docs.microsoft.com/en-us/windows/wsl/install-win10 - - -> **Note**: The automatic Windows Insider install comes with the Ubuntu distro. If you have manually installed WSL2, you can pick another Linux distro. This guide assumes you picked Ubuntu. - -### Install Docker Desktop WSL2 backend - - https://docs.docker.com/desktop/windows/wsl/ - - Open Docker, goto `Settings>Resources>WSL Integration` and verify that everything on that page is activated. - - Under `Experimental Features` enable `Use Docker Compose v2 candidate` - -### Start Ubuntu and install Open Commerce - - You should be able to follow the instructions in the [Quick Start Guide] - (/developer/open-commerce/guides/quick-start/) to install the CLI and install the corresponding projects - - - diff --git a/guides/quick-start.md b/guides/quick-start.md index 2a17190..f9c94a5 100644 --- a/guides/quick-start.md +++ b/guides/quick-start.md @@ -1,9 +1,8 @@ ## At a glance -There are two main routes to getting started with Mailchimp Open Commerce: installing the system on your local computer -or on a server. This guide will focus on the former, which will allow you to explore the main features of Open Commerce. +There are two main routes to getting started with Mailchimp Open Commerce: installing the platform on your local computer or on a server. This guide will focus on the former, which will allow you to explore the main features of Open Commerce. -In this guide, we’ll set up a full local instance of the Open Commerce platform, including core plugins provided by Mailchimp. We’ll walk you through installing the CLI, creating your first server project and local admin and storefront instances, registering an account, and creating your first shop. +In this guide, we’ll set up a full local instance of the Open Commerce platform, including core plugins provided by Mailchimp. We’ll walk through installing the command line interface, creating the various projects, registering an account, and creating your first shop. ## What you’ll need @@ -20,47 +19,64 @@ In this guide, we’ll set up a full local instance of the Open Commerce platfor In addition, you need to have your system setup for [SSH authentication with GitHub](`https://docs.github. com/en/authentication/connecting-to-github-with-ssh`) -## Install the CLI +## Windows install + +If you're using Windows 10/11, you'll need to take a few extra steps before you can continue with the Open Commerce installation process. (If you're not using Windows, you can skip to the next section.) + +First, you'll need to Install [WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10). Note that the +automatic Windows Insider install comes with the Ubuntu distro. +If you manually install WSL2, you can choose any Linux distro but this guide is written for Ubuntu. + +Next, install the [Docker Desktop WSL2 backend.](https://docs.docker.com/desktop/windows/wsl/) Once that's completed, open Docker and navigate to Settings>Resources>WSL Integration. Verify that everything on that page is activated. + +Under Experimental Features, enable Use Docker Compose v2 candidate. + +Finally, start Ubuntu. You're now ready to install the CLI and the OC projects. + +## Install the command line interface `npm install -g reaction-cli` -## Create your first API Server project +## Install the API server -This will create a project that is your version of the project that you can commit to git and build a Docker image -from. By default, it is all the stock Mailchimp Open Commerce plugins plus the one example one (which you can remove). +Your next task is to install the API server. -- _(optional)_ Create a directory for your entire project using `mkdir myproject` and then `cd` into it -- Create the project server by running `reaction create-project api `, (_you can substitute any directory - name for ``_) -- Change directory into your newly created server directory and run `npm install` -- Once this is complete run `reaction develop`. This will start the Open Commerce server in development mode. The - server will automatically restart on every code change. When you are ready to stop press Ctrl+C. -- **Congratulations** you have created your Mailchimp Open Commerce API server project. You can now - optionally proceed to install the Storefront and Admin applications. You can view the GraphQL playground locally - `http://localhost:3000/graphql` +Create a directory for your entire project using `mkdir myproject`, and then `cd` into it. + +Create an API server by running `reaction create-project api `. You can substitute any directory name for ``. + +Change directory into your newly created server directory and run `npm install`. + +Once this is complete, run `reaction develop`. This will start the Open Commerce server in development mode. + +Congrats! You've installed the Mailchimp Open Commerce API server. Next, you can install the storefront and admin applications. You can view the graphQL playground locally at `http://localhost:3000/graphql`. ## Install the Storefront -- Open a new terminal window -- Change to the root of the project directory you created above -- Execute `reaction create-project storefront ` (like above you can name this directory whatever you like) -- Change directory into the newly created storefront by doing `cd ` -- Now run `yarn install` to install the dependencies -- Then run `reaction develoop` to start the storefront in development mode. The app automatically will restart whenever - you make changes. -- Congratulations, you have installed the default storefront for Mailchimp Open Commerce. You can access the - storefront from http://localhost:4000 - -## Install the Reaction Admin -- Open a new terminal window -- Change to the root of the project directory you created above -- Execute `reaction create-project admin ` (like above you can name this directory whatever you like) -- Change into your newly created directory by doing `cd ` -- Now run `npm install` -- Then run `reaction develop` which will start the Admin in development mode (Note: The admin can take a little - while to start up the first time) -- Once the server has started you can access it by going to `http://localhost:4080`. The instructions below cover - how to create your first user and first shop. +Next on your list is to install the storefront app. + +Open a new terminal window and change to the root of the project directory you created earlier. + +Execute `reaction create-project storefront `. As before, you can name this directory to suit your needs. We'll use `` for this example. + +Change directory into the newly created storefront with `cd ` and run `yarn install` to install the dependencies. + +Run `reaction develop` to start the storefront in development mode. + +Congratulations! You've installed the default storefront for Mailchimp Open Commerce. You can access the storefront from `http://localhost:4000`. + +## Install the admin app +Next, you'll install the admin app. + +Open a new terminal window and change to the root of the project directory you created previously. + +Execute `reaction create-project admin `. As before, you can name this directory however best fits your needs. + +Change into your newly created directory and then run `npm install`. + +Finally, run `reaction develop` which will start the admin app in development mode. Note that the admin app can take a little time to start up the first time because it's in Meteor. + +Once the server has started, you can access it at `http://localhost:4080`. ## Access the dashboard, playground, and storefront