zuplo 7.8.7 → 7.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/docs/ai-gateway/custom-policies.mdx +2 -1
  2. package/docs/ai-gateway/integrations/claude-code.mdx +82 -180
  3. package/docs/ai-gateway/integrations/claude-desktop.mdx +61 -99
  4. package/docs/ai-gateway/integrations/codex.mdx +63 -57
  5. package/docs/ai-gateway/usage-limits.mdx +2 -2
  6. package/docs/api-management/overview.md +2 -2
  7. package/docs/articles/add-api-to-backstage.mdx +4 -3
  8. package/docs/articles/api-key-consumer-bucket-portal-ui.mdx +1 -1
  9. package/docs/articles/api-key-management.mdx +1 -1
  10. package/docs/articles/custom-domains.mdx +3 -2
  11. package/docs/articles/migrate-from-apigee.md +3 -3
  12. package/docs/articles/migrate-from-aws-api-gateway.md +3 -3
  13. package/docs/articles/migrate-from-azure-apim.md +3 -3
  14. package/docs/articles/migrate-from-kong.md +3 -3
  15. package/docs/articles/source-control-setup-github.mdx +2 -2
  16. package/docs/articles/source-control.mdx +4 -3
  17. package/docs/articles/testing.mdx +5 -5
  18. package/docs/articles/upstream-iam-auth.mdx +2 -2
  19. package/docs/cli/create-zuplo-api.mdx +4 -4
  20. package/docs/cli/openapi-merge.mdx +1 -1
  21. package/docs/cli/openapi-merge.partial.mdx +1 -1
  22. package/docs/concepts/ai-gateway.mdx +1 -1
  23. package/docs/concepts/how-zuplo-works.mdx +2 -1
  24. package/docs/concepts/mcp.mdx +4 -4
  25. package/docs/dedicated/architecture.mdx +1 -1
  26. package/docs/dev-portal/migration.mdx +2 -2
  27. package/docs/errors/not-found.mdx +1 -1
  28. package/docs/getting-started/ai-gateway/portal.mdx +181 -0
  29. package/docs/getting-started/dev-portal/agent.mdx +148 -0
  30. package/docs/getting-started/dev-portal/index.mdx +26 -0
  31. package/docs/getting-started/dev-portal/local.mdx +213 -0
  32. package/docs/getting-started/dev-portal/portal.mdx +146 -0
  33. package/docs/{articles/step-3-add-api-key-auth.mdx → getting-started/gateway/add-api-key-auth/index.mdx} +32 -23
  34. package/docs/{articles/step-3-add-api-key-auth-local.mdx → getting-started/gateway/add-api-key-auth/local.mdx} +28 -20
  35. package/docs/{articles/step-2-add-rate-limiting.mdx → getting-started/gateway/add-rate-limiting/index.mdx} +22 -13
  36. package/docs/{articles/step-2-add-rate-limiting-local.mdx → getting-started/gateway/add-rate-limiting/local.mdx} +24 -14
  37. package/docs/getting-started/gateway/agent.mdx +199 -0
  38. package/docs/{articles/step-4-deploying-to-the-edge.mdx → getting-started/gateway/deploy-to-the-edge/index.mdx} +39 -27
  39. package/docs/{articles/step-4-deploying-to-the-edge-local.mdx → getting-started/gateway/deploy-to-the-edge/local.mdx} +48 -17
  40. package/docs/{articles/step-5-dynamic-rate-limiting.mdx → getting-started/gateway/dynamic-rate-limiting/index.mdx} +24 -12
  41. package/docs/{articles/step-5-dynamic-rate-limiting-local.mdx → getting-started/gateway/dynamic-rate-limiting/local.mdx} +24 -12
  42. package/docs/getting-started/gateway/index.mdx +24 -0
  43. package/docs/{articles/step-1-setup-basic-gateway.mdx → getting-started/gateway/setup-a-basic-gateway/index.mdx} +33 -21
  44. package/docs/{articles/step-1-setup-basic-gateway-local.mdx → getting-started/gateway/setup-a-basic-gateway/local.mdx} +24 -15
  45. package/docs/getting-started/index.mdx +25 -0
  46. package/docs/getting-started/mcp-gateway/agent.mdx +161 -0
  47. package/docs/getting-started/mcp-gateway/index.mdx +25 -0
  48. package/docs/{mcp-gateway/quickstart-local.mdx → getting-started/mcp-gateway/local.mdx} +64 -38
  49. package/docs/{mcp-gateway/quickstart.mdx → getting-started/mcp-gateway/portal.mdx} +71 -54
  50. package/docs/getting-started/mcp-server/agent.mdx +152 -0
  51. package/docs/getting-started/mcp-server/index.mdx +25 -0
  52. package/docs/{articles/mcp-quickstart-local.mdx → getting-started/mcp-server/local.mdx} +24 -13
  53. package/docs/{articles/mcp-quickstart.mdx → getting-started/mcp-server/portal.mdx} +35 -15
  54. package/docs/getting-started/migrate/agent.mdx +129 -0
  55. package/docs/getting-started/migrate/index.mdx +25 -0
  56. package/docs/getting-started/migrate/local.mdx +141 -0
  57. package/docs/getting-started/migrate/portal.mdx +129 -0
  58. package/docs/home.mdx +6 -0
  59. package/docs/mcp-gateway/connect-clients/chatgpt.mdx +2 -1
  60. package/docs/mcp-gateway/connect-clients/claude-code.mdx +2 -1
  61. package/docs/mcp-gateway/connect-clients/claude-desktop.mdx +23 -20
  62. package/docs/mcp-gateway/connect-clients/cursor.mdx +2 -1
  63. package/docs/mcp-gateway/connect-clients/overview.mdx +2 -1
  64. package/docs/mcp-gateway/connect-clients/vs-code.mdx +2 -1
  65. package/docs/mcp-gateway/how-it-works.mdx +2 -2
  66. package/docs/mcp-gateway/how-to/connect-upstream-api-key.mdx +4 -3
  67. package/docs/mcp-gateway/how-to/curate-tools.mdx +3 -2
  68. package/docs/mcp-gateway/overview.mdx +3 -3
  69. package/docs/policies/ai-gateway-smart-router-inbound/doc.md +14 -0
  70. package/docs/policies/akamai-ai-firewall-v2-inbound/doc.md +7 -0
  71. package/package.json +5 -5
  72. package/docs/ai-gateway/getting-started.mdx +0 -307
  73. package/docs/dev-portal/local-development.mdx +0 -72
@@ -0,0 +1,199 @@
1
+ ---
2
+ category: API Management
3
+ disablePager: true
4
+ showLastModified: false
5
+ suggestEdit: false
6
+ title: Getting Started with API Gateway - Agent
7
+ description:
8
+ Create a Zuplo API gateway project, configure its coding agent, then review
9
+ and deploy the agent's changes.
10
+ ---
11
+
12
+ <WizardSteps build="gateway" method="agent" />
13
+
14
+ <MethodTabs build="gateway" method="agent" />
15
+
16
+ Put a managed gateway in front of any REST API. This path builds it with an AI
17
+ coding agent.
18
+
19
+ ## Create your project
20
+
21
+ :::note{title="Requirements"}
22
+
23
+ [Node.js](https://nodejs.org/en/download) 24.0.0 or higher, a
24
+ [Zuplo account](https://portal.zuplo.com), and an installed coding agent.
25
+
26
+ :::
27
+
28
+ <Stepper>
29
+
30
+ 1. **Create a local and hosted project**
31
+
32
+ Run:
33
+
34
+ ```bash
35
+ npx create-zuplo-api@latest example-project
36
+ cd example-project
37
+ ```
38
+
39
+ When prompted, choose **Yes** to create a matching Portal project, complete
40
+ sign-in, and select your Zuplo account. Select the coding agent you use when
41
+ asked. The CLI creates a project in the Portal and links your local
42
+ `example-project` directory to its working copy. The hosted project stores
43
+ the API key consumers and receives your deployment. If the CLI reports that
44
+ project creation failed, run
45
+ `npx zuplo project create --name example-project` from this directory. If
46
+ linking failed, or after creating the hosted project, run `npx zuplo link`
47
+ and select its working copy before continuing.
48
+
49
+ :::tip{title="Zuplo skills"}
50
+
51
+ The scaffold installs Zuplo skills in this project for Codex and Cursor and
52
+ configures the Claude Code plugin. If setup fails, follow
53
+ [Agent Skills](../../build-with-ai.mdx#agent-skills) from this directory
54
+ before starting your agent. The project's `.mcp.json` also configures the
55
+ Zuplo docs MCP server.
56
+
57
+ :::
58
+
59
+ 2. **Start the gateway**
60
+
61
+ ```bash
62
+ npm run dev
63
+ ```
64
+
65
+ Leave this running. The agent edits `config/` and `modules/`, and the dev
66
+ server hot-reloads.
67
+
68
+ </Stepper>
69
+
70
+ ## Hand it to the agent
71
+
72
+ One prompt covers the whole editor tutorial - forwarding, rate limiting, API key
73
+ authentication, and dynamic limits. Paste it into Claude Code, Cursor, or Codex
74
+ from inside your project directory.
75
+
76
+ <Stepper>
77
+
78
+ 1. **Copy the prompt**
79
+
80
+ ```text
81
+ Read this project's agent instructions and the bundled docs in node_modules/zuplo/docs before writing code.
82
+
83
+ Build a Zuplo API gateway in this project:
84
+ 1. Keep the default todo routes in config/routes.oas.json, but forward them to ${env.BASE_URL} and add BASE_URL=https://echo.zuplo.io to .env.zuplo.
85
+ 2. Add the rate-limiting inbound policy (rateLimitBy: ip, 2 requests / 1 minute) to every route.
86
+ 3. Add the api-key-inbound policy to every route, ordered before rate limiting.
87
+ 4. Make rate limiting dynamic: create modules/rate-limit.ts exporting rateLimit() that returns 1000 req/min for user.data.customerType === "premium", 5 for "free", 30 otherwise, and switch the policy to rateLimitBy: "function".
88
+ 5. Use the already-running dev server to verify with curl that GET /todos returns 401 without a key. I will create the free and premium keys in the Portal afterward; leave key-based tests for me.
89
+
90
+ Explain each config change in one line and stop before pushing to git.
91
+ ```
92
+
93
+ 1. **Review what it changed**
94
+
95
+ Expect edits to `config/routes.oas.json`, `config/policies.json`, a new
96
+ `modules/rate-limit.ts`, and `.env.zuplo`. Open the local
97
+ [Route Designer](../../articles/local-development-routes-designer.mdx) at
98
+ http://localhost:9100 to see the policies on each route.
99
+
100
+ :::tip
101
+
102
+ Ask the agent to explain any policy option you do not recognize. It has the
103
+ policy reference in `node_modules/zuplo/docs/policies/`.
104
+
105
+ :::
106
+
107
+ </Stepper>
108
+
109
+ ## Create an API key and test
110
+
111
+ The API key policy rejects everything until a consumer exists. Consumers live in
112
+ the Zuplo Portal, not in code.
113
+
114
+ <Stepper>
115
+
116
+ 1. **Create two consumers**
117
+
118
+ In the portal, open
119
+ [**Services**](https://portal.zuplo.com/+/account/project/services) › **API
120
+ Keys › Consumers › Create Consumer**. Create `free-consumer` with metadata
121
+ `{ "customerType": "free" }` and `premium-consumer` with
122
+ `{ "customerType": "premium" }`.
123
+
124
+ :::warning
125
+
126
+ Select the environment your local project is linked to with the **Dev /
127
+ Preview / Prod** switcher. With a single environment, pick **Prod**.
128
+
129
+ :::
130
+
131
+ 1. **Test both limits**
132
+
133
+ ```bash
134
+ # no key -> 401
135
+ curl -i http://localhost:9000/todos
136
+
137
+ # free key -> 429 on the 6th request within one minute
138
+ for i in 1 2 3 4 5 6; do
139
+ curl -i http://localhost:9000/todos \
140
+ --header 'Authorization: Bearer FREE_CONSUMER_KEY'
141
+ done
142
+
143
+ # premium key -> 1000 requests per minute
144
+ curl http://localhost:9000/todos \
145
+ --header 'Authorization: Bearer PREMIUM_CONSUMER_KEY'
146
+ ```
147
+
148
+ Replace `FREE_CONSUMER_KEY` and `PREMIUM_CONSUMER_KEY` with the keys from the
149
+ Portal. The premium request should succeed; its limit is 1000 requests per
150
+ minute, so a single request doesn't test the threshold.
151
+
152
+ </Stepper>
153
+
154
+ ## Deploy
155
+
156
+ Zuplo deploys from Git. The agent can do the push; the connection happens in the
157
+ portal.
158
+
159
+ <Stepper>
160
+
161
+ 1. **Ask the agent to push**
162
+
163
+ ```text
164
+ Commit everything, create an empty GitHub repo called example-project with gh, add it as origin and push main.
165
+ ```
166
+
167
+ 1. **Connect the repository in Zuplo**
168
+
169
+ ```bash
170
+ npx zuplo info
171
+ ```
172
+
173
+ Open the source-control link from the output, or **Settings › Source
174
+ Control** in the portal. Click **Connect to GitHub**, then **Connect** on
175
+ your repository. Zuplo deploys `main` immediately. Run `zuplo info` again to
176
+ confirm.
177
+
178
+ :::tip{title="Branch environments"}
179
+
180
+ Every branch you push gets its own isolated environment. See
181
+ [Branch-Based Deployments](../../articles/branch-based-deployments.mdx).
182
+
183
+ :::
184
+
185
+ </Stepper>
186
+
187
+ ## Wrapping up
188
+
189
+ You have built an API protected by API key authentication, dynamically rate
190
+ limited, deployed to the edge, and documented in your developer portal - with an
191
+ agent doing the configuration while you reviewed each change.
192
+
193
+ ### Next steps
194
+
195
+ - Customize your [developer portal](../../dev-portal/overview.mdx) or explore
196
+ [integrations](https://zuplo.com/integrations)
197
+ - [Grab time](https://zuplo.com/meeting) with the Zuplo team
198
+ - Start generating revenue with the
199
+ [monetization tutorial](../../articles/monetization/index.mdx)
@@ -1,24 +1,34 @@
1
1
  ---
2
- title: Step 4 - Deploying to the Edge
3
- sidebar_label: "4 - Deploy"
2
+ category: API Management
3
+ disablePager: true
4
+ showLastModified: false
5
+ suggestEdit: false
6
+ title: Deploy to the edge - Portal
7
+ description:
8
+ Connect your project to Git and deploy the gateway to more than 300 edge
9
+ locations, with an environment for every branch in the Zuplo Portal.
4
10
  ---
5
11
 
12
+ <WizardSteps build="gateway" method="portal" step="deploy-to-the-edge" />
13
+
14
+ <MethodTabs build="gateway" method="portal" step="deploy-to-the-edge" />
15
+
6
16
  In this guide we'll show you how to deploy your gateway to the edge, at over 300
7
17
  data-centers around the world. The act of deployment creates new
8
- [environments](./environments.mdx) and it's worth familiarizing yourself with
9
- [how environments work](./environments.mdx).
18
+ [environments](../../../articles/environments.mdx) and it's worth familiarizing
19
+ yourself with [how environments work](../../../articles/environments.mdx).
10
20
 
11
21
  In this tutorial we'll show the default workflow via GitHub, but note that we
12
22
  also support GitLab, BitBucket
13
23
  ([enterprise plan only](https://zuplo.com/pricing)) and
14
- [custom CI/CD](./custom-ci-cd.mdx).
24
+ [custom CI/CD](../../../articles/custom-ci-cd.mdx).
15
25
 
16
26
  To follow this tutorial you'll need
17
27
 
18
28
  - a GitHub account (it's free, sign up at [github.com](https://github.com)).
19
- - a zuplo project - complete [Step 1](./step-1-setup-basic-gateway.mdx),
20
- [Step 2](./step-2-add-rate-limiting.mdx) and
21
- [Step 3](./step-3-add-api-key-auth.mdx) for a great start!
29
+ - a zuplo project - complete [Step 1](../setup-a-basic-gateway/index.mdx),
30
+ [Step 2](../add-rate-limiting/index.mdx) and
31
+ [Step 3](../add-api-key-auth/index.mdx) for a great start!
22
32
  - to install the
23
33
  [Zuplo GitHub deployment](https://github.com/apps/zuplo/installations/new) to
24
34
  GitHub - you can
@@ -37,14 +47,14 @@ Let's get started:
37
47
  the auth flow. You'll need to grant permissions for any GitHub organizations
38
48
  you want to work with.
39
49
 
40
- ![Connect GitHub](../../public/media/step-4-deploying-to-the-edge/image-1.png)
50
+ ![Connect GitHub](../../../../public/media/step-4-deploying-to-the-edge/image-1.png)
41
51
 
42
52
  Next, a dialog will open asking you to authorize Zuplo. Click the **Authorize
43
53
  Zuplo** button.
44
54
 
45
55
  <Framed size="sm">
46
56
 
47
- ![Zuplo GitHub connection](../../public/media/step-4-deploying-to-the-edge/d6194a80-b6d6-429e-85a6-ae1cb4a3375e.png)
57
+ ![Zuplo GitHub connection](../../../../public/media/step-4-deploying-to-the-edge/d6194a80-b6d6-429e-85a6-ae1cb4a3375e.png)
48
58
 
49
59
  </Framed>
50
60
 
@@ -66,7 +76,7 @@ Let's get started:
66
76
 
67
77
  <Framed size="sm">
68
78
 
69
- ![Installing Zuplo app](../../public/media/step-4-deploying-to-the-edge/eef76bd7-4d26-4f86-96e8-89ebede03beb.png)
79
+ ![Installing Zuplo app](../../../../public/media/step-4-deploying-to-the-edge/eef76bd7-4d26-4f86-96e8-89ebede03beb.png)
70
80
 
71
81
  </Framed>
72
82
 
@@ -76,7 +86,7 @@ Let's get started:
76
86
 
77
87
  <Framed size="sm">
78
88
 
79
- ![Choosing repository to install](../../public/media/step-4-deploying-to-the-edge/ff482269-9aa2-44c3-8266-b2682b3d6ea5.png)
89
+ ![Choosing repository to install](../../../../public/media/step-4-deploying-to-the-edge/ff482269-9aa2-44c3-8266-b2682b3d6ea5.png)
80
90
 
81
91
  </Framed>
82
92
 
@@ -91,7 +101,7 @@ Let's get started:
91
101
  already a member of an account that has authorized Zuplo. To add Zuplo to a
92
102
  new organization click **Add GitHub Account** in the org picker list.
93
103
 
94
- ![Connect Org](../../public/media/step-4-deploying-to-the-edge/image-2.png)
104
+ ![Connect Org](../../../../public/media/step-4-deploying-to-the-edge/image-2.png)
95
105
 
96
106
  1. Connect GitHub to your Project
97
107
 
@@ -101,7 +111,7 @@ Let's get started:
101
111
  repository** button. You will be prompted that this will open GitHub. Click
102
112
  to continue.
103
113
 
104
- ![Create Repository](../../public/media/step-4-deploying-to-the-edge/image-3.png)
114
+ ![Create Repository](../../../../public/media/step-4-deploying-to-the-edge/image-3.png)
105
115
 
106
116
  In the GitHub UI, you can rename your repository if you want. Click the
107
117
  **Create repository** button at the bottom of the page and return to the
@@ -110,11 +120,11 @@ Let's get started:
110
120
  The portal will reload and you will see your new repository listed. Click
111
121
  **Connect** to connect Zuplo to that repository.
112
122
 
113
- ![Connect](../../public/media/step-4-deploying-to-the-edge/image-4.png)
123
+ ![Connect](../../../../public/media/step-4-deploying-to-the-edge/image-4.png)
114
124
 
115
125
  After the connection succeeds you will see a link to your GitHub repository.
116
126
 
117
- ![Connected Repository](../../public/media/step-4-deploying-to-the-edge/image-5.png)
127
+ ![Connected Repository](../../../../public/media/step-4-deploying-to-the-edge/image-5.png)
118
128
 
119
129
  Click the link to return to GitHub. You should see a little brown dot next to
120
130
  the commit hash (1). When you hover your mouse over that you'll see the Zuplo
@@ -123,12 +133,12 @@ Let's get started:
123
133
  This shows that your deployment is in progress, it will take about 50
124
134
  seconds.
125
135
 
126
- ![Zuplo deployment run](../../public/media/step-4-deploying-to-the-edge/brown-dot.png)
136
+ ![Zuplo deployment run](../../../../public/media/step-4-deploying-to-the-edge/brown-dot.png)
127
137
 
128
138
  On the deployment page, you will see **Deployment has Completed!!** and below
129
139
  that's the link to your new environment.
130
140
 
131
- ![Zuplo deployment run result](../../public/media/step-4-deploying-to-the-edge/26fa58b6-7a5a-4627-bd9f-246972639f12.png)
141
+ ![Zuplo deployment run result](../../../../public/media/step-4-deploying-to-the-edge/26fa58b6-7a5a-4627-bd9f-246972639f12.png)
132
142
 
133
143
  1. Deploy another Environment
134
144
 
@@ -138,7 +148,7 @@ Let's get started:
138
148
 
139
149
  Let's create a branch called `development`
140
150
 
141
- ![Create new branch](../../public/media/step-4-deploying-to-the-edge/60cdeb36-ab7d-42f9-a8c2-1f7931f80ca6.png)
151
+ ![Create new branch](../../../../public/media/step-4-deploying-to-the-edge/60cdeb36-ab7d-42f9-a8c2-1f7931f80ca6.png)
142
152
 
143
153
  Wait about 20s and head back to Zuplo - you should see a new entry in the
144
154
  environment dropdown called `development`.
@@ -149,18 +159,18 @@ Let's get started:
149
159
  something simple like capitalize the **Summary** field from 'Get all todos'
150
160
  to 'Get All Todos'. It doesn't really matter what the change is.
151
161
 
152
- ![Changes Summary](../../public/media/step-4-deploying-to-the-edge/image-6.png)
162
+ ![Changes Summary](../../../../public/media/step-4-deploying-to-the-edge/image-6.png)
153
163
 
154
164
  Save your changes. Click the GitHub button at bottom left and choose **Commit
155
165
  & Push**.
156
166
 
157
- ![Commit & Push](../../public/media/step-4-deploying-to-the-edge/image-7.png)
167
+ ![Commit & Push](../../../../public/media/step-4-deploying-to-the-edge/image-7.png)
158
168
 
159
169
  Enter a description of your change in the dialog that pops up:
160
170
 
161
171
  <ModalScreenshot>
162
172
 
163
- ![Change Summary](../../public/media/step-4-deploying-to-the-edge/image-8.png)
173
+ ![Change Summary](../../../../public/media/step-4-deploying-to-the-edge/image-8.png)
164
174
 
165
175
  </ModalScreenshot>
166
176
 
@@ -169,7 +179,7 @@ Let's get started:
169
179
 
170
180
  <ModalScreenshot>
171
181
 
172
- ![Create PR](../../public/media/step-4-deploying-to-the-edge/image-9.png)
182
+ ![Create PR](../../../../public/media/step-4-deploying-to-the-edge/image-9.png)
173
183
 
174
184
  </ModalScreenshot>
175
185
 
@@ -177,21 +187,21 @@ Let's get started:
177
187
  Pull Request. Change the **base** branch to `development` (since that's the
178
188
  environment we want to update first). Click **Create pull request**.
179
189
 
180
- ![GitHub PR](../../public/media/step-4-deploying-to-the-edge/875b164d-b7ef-4f46-9cdb-8d59354b5b93.png)
190
+ ![GitHub PR](../../../../public/media/step-4-deploying-to-the-edge/875b164d-b7ef-4f46-9cdb-8d59354b5b93.png)
181
191
 
182
192
  When ready, click **Merge pull request**.
183
193
 
184
- ![Merge PR](../../public/media/step-4-deploying-to-the-edge/e8c68072-35dc-462a-8161-7a44e40fa1df.png)
194
+ ![Merge PR](../../../../public/media/step-4-deploying-to-the-edge/e8c68072-35dc-462a-8161-7a44e40fa1df.png)
185
195
 
186
196
  Once merged, you'll want to delete that temporary branch.
187
197
 
188
- ![Delete branch](../../public/media/step-4-deploying-to-the-edge/51a25aa0-cdce-4112-ba2e-e56f42a9044d.png)
198
+ ![Delete branch](../../../../public/media/step-4-deploying-to-the-edge/51a25aa0-cdce-4112-ba2e-e56f42a9044d.png)
189
199
 
190
200
  The successful merge will trigger a rebuild and deployment of `development`
191
201
  with your change. You can check this by choosing the environment
192
202
  `development` in Zuplo and navigating to the **read only** Route Designer.
193
203
 
194
- ![Navigating Environments](../../public/media/step-4-deploying-to-the-edge/image.png)
204
+ ![Navigating Environments](../../../../public/media/step-4-deploying-to-the-edge/image.png)
195
205
 
196
206
  This shows how you can use widely recognized GitOps practices to manage how
197
207
  code flows through your environments using Pull Requests and protected
@@ -220,3 +230,5 @@ when running commits, pulls or try to open a pull request.
220
230
  - If the GitHub repository has been renamed or moved to a different
221
231
  organization, try disconnecting and reconnecting to it. You can do this by
222
232
  going to your Zuplo project's settings > Source Control section
233
+
234
+ <TutorialPager build="gateway" method="portal" step="deploy-to-the-edge" />
@@ -1,22 +1,52 @@
1
1
  ---
2
- title: Step 4 - Deploy to the Edge
3
- sidebar_label: "4 - Deploy"
2
+ category: API Management
3
+ disablePager: true
4
+ showLastModified: false
5
+ suggestEdit: false
6
+ title: Deploy to the edge - Editor
7
+ description:
8
+ Connect your project to Git and deploy the gateway to more than 300 edge
9
+ locations, with an environment for every branch with the Zuplo CLI and your
10
+ editor.
4
11
  ---
5
12
 
13
+ <WizardSteps build="gateway" method="local" step="deploy-to-the-edge" />
14
+
15
+ <MethodTabs build="gateway" method="local" step="deploy-to-the-edge" />
16
+
6
17
  In this guide we'll deploy your locally-developed gateway to the edge, at over
7
18
  300 data-centers around the world. Zuplo deploys from Git source control — once
8
19
  your project is connected to a GitHub repository, every push deploys
9
20
  automatically, with no CI/CD configuration required.
10
21
 
11
- The act of deployment creates new [environments](./environments.mdx), so it's
12
- worth familiarizing yourself with [how environments work](./environments.mdx).
22
+ The act of deployment creates new
23
+ [environments](../../../articles/environments.mdx), so it's worth familiarizing
24
+ yourself with [how environments work](../../../articles/environments.mdx).
13
25
 
14
- To follow this tutorial you'll need a GitHub account (it's free, sign up at
15
- [github.com](https://github.com)).
26
+ To follow this tutorial, you need a [GitHub account](https://github.com) and a
27
+ Zuplo account. Your local project directory must also be linked to a hosted
28
+ Zuplo project in the Portal. The local files alone cannot receive a deployment.
16
29
 
17
30
  <Stepper>
18
31
 
19
- 1. **Check your project status**
32
+ 1. **Create and link a hosted project if needed**
33
+
34
+ If you answered **Yes** when `create-zuplo-api` asked to create a matching
35
+ Portal project, the CLI already created and linked its hosted project.
36
+ Otherwise, from your local project directory, create one and link its working
37
+ copy:
38
+
39
+ ```bash
40
+ npx zuplo project create --name example-project
41
+ npx zuplo link
42
+ ```
43
+
44
+ Sign in and select your Zuplo account when prompted. If you already created a
45
+ hosted project in the Portal, run only `npx zuplo link` and select that
46
+ project and its working copy. See
47
+ [Creating a matching portal project](../../../cli/create-zuplo-api.mdx#creating-a-matching-portal-project).
48
+
49
+ 2. **Check your project status**
20
50
 
21
51
  From your project directory, run `zuplo info` to see how your local project
22
52
  maps to Zuplo:
@@ -37,13 +67,13 @@ To follow this tutorial you'll need a GitHub account (it's free, sign up at
37
67
  connected to a repository yet. The next steps walk through connecting one so
38
68
  your changes deploy automatically.
39
69
 
40
- 1. **Create a GitHub repository**
70
+ 3. **Create a GitHub repository**
41
71
 
42
72
  In GitHub, [create a new repository](https://github.com/new). Leave it
43
73
  **empty** — don't add a README, `.gitignore`, or license — since your project
44
74
  already contains those files.
45
75
 
46
- 1. **Push your project to GitHub**
76
+ 4. **Push your project to GitHub**
47
77
 
48
78
  `create-zuplo-api` already initialized your project as a Git repository.
49
79
  Stage and commit your work (if you haven't already), then point your local
@@ -57,14 +87,15 @@ To follow this tutorial you'll need a GitHub account (it's free, sign up at
57
87
  git push -u origin main
58
88
  ```
59
89
 
60
- 1. **Connect the repository in Zuplo**
90
+ 5. **Connect the repository in Zuplo**
61
91
 
62
92
  Open the source-control settings link from the `zuplo info` output, or in the
63
93
  Zuplo Portal open **Settings → Source Control**.
64
94
 
65
95
  If this is your first time, click **Connect to GitHub** and authorize the
66
- Zuplo GitHub app — see [GitHub Setup](./source-control-setup-github.mdx) for
67
- a detailed walkthrough of the authorization flow and permissions.
96
+ Zuplo GitHub app — see
97
+ [GitHub Setup](../../../articles/source-control-setup-github.mdx) for a
98
+ detailed walkthrough of the authorization flow and permissions.
68
99
 
69
100
  Once the app has access to your repositories, find the repository you just
70
101
  pushed to in the list and click **Connect**.
@@ -78,7 +109,7 @@ To follow this tutorial you'll need a GitHub account (it's free, sign up at
78
109
 
79
110
  :::
80
111
 
81
- 1. **Verify your deployment**
112
+ 6. **Verify your deployment**
82
113
 
83
114
  As soon as the repository is connected, Zuplo deploys your `main` branch. In
84
115
  GitHub you'll see a status check next to your commit; when it succeeds, the
@@ -95,12 +126,12 @@ To follow this tutorial you'll need a GitHub account (it's free, sign up at
95
126
 
96
127
  Every branch you push gets its own isolated environment. Create a
97
128
  `development` branch, push it, and Zuplo deploys a matching environment
98
- automatically. See [Branch-Based Deployments](./branch-based-deployments.mdx)
99
- to learn how branches map to environments.
129
+ automatically. See
130
+ [Branch-Based Deployments](../../../articles/branch-based-deployments.mdx) to
131
+ learn how branches map to environments.
100
132
 
101
133
  :::
102
134
 
103
135
  </Stepper>
104
136
 
105
- **NEXT** Try
106
- [Step 5 - Add Dynamic Rate Limiting](./step-5-dynamic-rate-limiting-local.mdx).
137
+ <TutorialPager build="gateway" method="local" step="deploy-to-the-edge" />
@@ -1,15 +1,25 @@
1
1
  ---
2
- title: Step 5 - Dynamic Rate Limiting
3
- sidebar_label: "5 - Dynamic Rate Limiting"
2
+ category: API Management
3
+ disablePager: true
4
+ showLastModified: false
5
+ suggestEdit: false
6
+ title: Dynamic rate limiting - Portal
7
+ description:
8
+ Move past a single fixed limit by setting rate limits per customer, so each
9
+ consumer of your API gets its own quota in the Zuplo Portal.
4
10
  ---
5
11
 
12
+ <WizardSteps build="gateway" method="portal" step="dynamic-rate-limiting" />
13
+
14
+ <MethodTabs build="gateway" method="portal" step="dynamic-rate-limiting" />
15
+
6
16
  Fortune favors the bold. In this bonus getting started guide - we'll show you
7
17
  how to add dynamic rate limiting to your API.
8
18
 
9
19
  To follow this tutorial you'll need to have completed
10
- [Step 1](./step-1-setup-basic-gateway.mdx) for a Zuplo project,
11
- [Step 2](./step-2-add-rate-limiting.mdx) to add rate limiting to that route, and
12
- [Step 3](./step-3-add-api-key-auth.mdx) to add API key authentication to that
20
+ [Step 1](../setup-a-basic-gateway/index.mdx) for a Zuplo project,
21
+ [Step 2](../add-rate-limiting/index.mdx) to add rate limiting to that route, and
22
+ [Step 3](../add-api-key-auth/index.mdx) to add API key authentication to that
13
23
  same route.
14
24
 
15
25
  :::info{title="What's Dynamic Rate Limiting?"}
@@ -28,7 +38,7 @@ Let's get started.
28
38
  1. Add Consumer Metadata
29
39
 
30
40
  Let's make our rate-limiting policy more dynamic, based on properties of the
31
- customer. [Create a new consumer](./step-3-add-api-key-auth.mdx) (Services ->
41
+ customer. [Create a new consumer](../add-api-key-auth/index.mdx) (Services ->
32
42
  API Key Service -> Configure -> Create Consumer), and in the Metadata field,
33
43
  set the following:
34
44
 
@@ -47,7 +57,7 @@ Let's get started.
47
57
  }
48
58
  ```
49
59
 
50
- ![Customer Metadata](../../public/media/step-3-add-rate-limiting/image-2.png)
60
+ ![Customer Metadata](../../../../public/media/step-3-add-rate-limiting/image-2.png)
51
61
 
52
62
  Now that there are users with different `customerType`, this information can
53
63
  be used to rate limit them differently.
@@ -58,7 +68,7 @@ Let's get started.
58
68
  clicking the `+` next to the **modules** folder and choose new empty module.
59
69
  Name the module `rate-limit.ts`.
60
70
 
61
- ![New module](../../public/media/step-3-add-rate-limiting/image-3.png)
71
+ ![New module](../../../../public/media/step-3-add-rate-limiting/image-3.png)
62
72
 
63
73
  :::info{title="What's a Module?"}
64
74
 
@@ -109,7 +119,7 @@ Let's get started.
109
119
  Now we'll reconfigure the rate-limiting policy to wire up our custom
110
120
  function. Find the policy in the **Route Designer** and click **Edit**.
111
121
 
112
- ![Edit Policy](../../public/media/step-3-add-rate-limiting/image-4.png)
122
+ ![Edit Policy](../../../../public/media/step-3-add-rate-limiting/image-4.png)
113
123
 
114
124
  Update the configuration to
115
125
 
@@ -138,7 +148,7 @@ Let's get started.
138
148
 
139
149
  Using the Test modal, you can try your dynamic rate limiting. You can grab
140
150
  the key for each consumer from **Services → API Keys → Consumers** where you
141
- created them. Like [Step 3](./step-3-add-api-key-auth.mdx), you can fill in
151
+ created them. Like [Step 3](../add-api-key-auth/index.mdx), you can fill in
142
152
  the keys into the `Authorization` header and start making calls until you hit
143
153
  your rate limit. Try out the other key and observe the difference in rate
144
154
  limits.
@@ -160,9 +170,11 @@ less than an hour.
160
170
  ### Next Steps
161
171
 
162
172
  - Continue exploring our docs to learn about customizing your
163
- [Developer Portal](../dev-portal/overview.mdx), or explore our various
173
+ [Developer Portal](../../../dev-portal/overview.mdx), or explore our various
164
174
  [Integrations](https://zuplo.com/integrations)
165
175
  - [Grab time](https://zuplo.com/meeting) with the Zuplo team to have your
166
176
  questions answered
167
177
  - Start generating revenue from your new API with our
168
- [Monetization tutorial](./monetization/index.mdx)
178
+ [Monetization tutorial](../../../articles/monetization/index.mdx)
179
+
180
+ <TutorialPager build="gateway" method="portal" step="dynamic-rate-limiting" />
@@ -1,16 +1,26 @@
1
1
  ---
2
- title: Step 5 - Dynamic Rate Limiting
3
- sidebar_label: "5 - Dynamic Rate Limiting"
2
+ category: API Management
3
+ disablePager: true
4
+ showLastModified: false
5
+ suggestEdit: false
6
+ title: Dynamic rate limiting - Editor
7
+ description:
8
+ Move past a single fixed limit by setting rate limits per customer, so each
9
+ consumer of your API gets its own quota with the Zuplo CLI and your editor.
4
10
  ---
5
11
 
12
+ <WizardSteps build="gateway" method="local" step="dynamic-rate-limiting" />
13
+
14
+ <MethodTabs build="gateway" method="local" step="dynamic-rate-limiting" />
15
+
6
16
  Fortune favors the bold. In this bonus getting started guide we'll show you how
7
17
  to add dynamic rate limiting to your API, all from your local project.
8
18
 
9
19
  To follow this tutorial you'll need to have completed
10
- [Step 1](./step-1-setup-basic-gateway-local.mdx) for a Zuplo project,
11
- [Step 2](./step-2-add-rate-limiting-local.mdx) to add rate limiting to a route,
12
- and [Step 3](./step-3-add-api-key-auth-local.mdx) to add API key authentication
13
- to that same route.
20
+ [Step 1](../setup-a-basic-gateway/local.mdx) for a Zuplo project,
21
+ [Step 2](../add-rate-limiting/local.mdx) to add rate limiting to a route, and
22
+ [Step 3](../add-api-key-auth/local.mdx) to add API key authentication to that
23
+ same route.
14
24
 
15
25
  :::info{title="What's Dynamic Rate Limiting?"}
16
26
 
@@ -29,8 +39,8 @@ Let's get started.
29
39
 
30
40
  Let's make our rate-limiting policy more dynamic, based on properties of the
31
41
  customer. In the Zuplo Portal,
32
- [create a new consumer](./step-3-add-api-key-auth-local.mdx) (Services → API
33
- Key Service → Configure → Create Consumer), and in the Metadata field set the
42
+ [create a new consumer](../add-api-key-auth/local.mdx) (Services → API Key
43
+ Service → Configure → Create Consumer), and in the Metadata field set the
34
44
  following:
35
45
 
36
46
  ```json
@@ -132,8 +142,8 @@ Let's get started.
132
142
  :::tip
133
143
 
134
144
  Dynamic rate limiting reads from `request.user`, so the API key
135
- authentication policy from [Step 3](./step-3-add-api-key-auth-local.mdx) must
136
- run **before** the rate-limiting policy.
145
+ authentication policy from [Step 3](../add-api-key-auth/local.mdx) must run
146
+ **before** the rate-limiting policy.
137
147
 
138
148
  :::
139
149
 
@@ -172,9 +182,11 @@ less than an hour.
172
182
  ### Next Steps
173
183
 
174
184
  - Continue exploring our docs to learn about customizing your
175
- [Developer Portal](../dev-portal/overview.mdx), or explore our various
185
+ [Developer Portal](../../../dev-portal/overview.mdx), or explore our various
176
186
  [Integrations](https://zuplo.com/integrations)
177
187
  - [Grab time](https://zuplo.com/meeting) with the Zuplo team to have your
178
188
  questions answered
179
189
  - Start generating revenue from your new API with our
180
- [Monetization tutorial](./monetization/index.mdx)
190
+ [Monetization tutorial](../../../articles/monetization/index.mdx)
191
+
192
+ <TutorialPager build="gateway" method="local" step="dynamic-rate-limiting" />