@lukoweb/apitogo 0.2.54 → 0.2.57

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 (82) hide show
  1. package/dist/cli/cli.js +2196 -1352
  2. package/dist/declarations/cli/platform/client/platform-api.d.ts +29 -0
  3. package/dist/declarations/cli/platform/helpers/platform-plan-catalog.d.ts +6 -0
  4. package/dist/declarations/config/validators/ZudokuConfig.d.ts +2 -0
  5. package/dist/declarations/lib/authentication/providers/openid.d.ts +2 -1
  6. package/dist/declarations/lib/plugins/markdown/index.d.ts +2 -1
  7. package/dist/flat-config.d.ts +1 -0
  8. package/docs/cli/commands.md +50 -32
  9. package/docs/cli/go-live.md +66 -93
  10. package/docs/cli/overview.md +18 -17
  11. package/docs/cli/setup.md +130 -141
  12. package/docs/cli/shape.md +94 -11
  13. package/docs/cli/walkthrough.md +1 -1
  14. package/docs/components/slot.mdx +116 -119
  15. package/docs/configuration/api-reference.md +98 -397
  16. package/docs/configuration/authentication.md +118 -159
  17. package/docs/configuration/footer.mdx +89 -118
  18. package/docs/configuration/make-config.mdx +2 -2
  19. package/docs/configuration/overview.md +97 -166
  20. package/docs/configuration/plans.md +100 -110
  21. package/docs/configuration/portal.md +116 -0
  22. package/docs/customization/colors-theme.mdx +255 -278
  23. package/docs/customization/fonts.md +105 -110
  24. package/docs/customization/landing-page.md +189 -188
  25. package/docs/deploy/apitogo.md +13 -17
  26. package/docs/deployment.md +15 -9
  27. package/docs/guides/stripe-setup.mdx +123 -0
  28. package/docs/markdown/frontmatter.md +172 -173
  29. package/docs/mcp/go-live.md +100 -100
  30. package/docs/mcp/overview.md +76 -76
  31. package/docs/quickstart.md +88 -72
  32. package/docs/writing.mdx +68 -72
  33. package/package.json +1 -1
  34. package/src/config/v2/docs-navigation.ts +7 -2
  35. package/src/config/v2/index.ts +1 -0
  36. package/src/config/v2/resolve.ts +28 -0
  37. package/src/config/v2/rules.ts +32 -1
  38. package/src/config/v2/schema.ts +9 -0
  39. package/src/config/v2/services.ts +90 -15
  40. package/src/config/v2/starter-landing.ts +41 -0
  41. package/src/config/v2/wrapper.ts +141 -7
  42. package/src/config/validators/ZudokuConfig.ts +794 -792
  43. package/src/lib/authentication/providers/openid.tsx +6 -1
  44. package/src/lib/plugins/markdown/index.tsx +86 -82
  45. package/src/vite/dev-server.ts +9 -1
  46. package/src/vite/dev-ssr-config.ts +32 -0
  47. package/src/vite/plugin-config.ts +4 -2
  48. package/src/vite/plugin-docs.ts +213 -205
  49. package/docs/concepts/auth-provider-api-identities.md +0 -105
  50. package/docs/configuration/ai-assistants.md +0 -65
  51. package/docs/configuration/api-catalog.md +0 -109
  52. package/docs/configuration/authentication-auth0.md +0 -181
  53. package/docs/configuration/authentication-azure-ad.md +0 -245
  54. package/docs/configuration/authentication-clerk.md +0 -117
  55. package/docs/configuration/authentication-firebase.md +0 -69
  56. package/docs/configuration/authentication-pingfederate.md +0 -143
  57. package/docs/configuration/authentication-supabase.md +0 -233
  58. package/docs/configuration/build-configuration.mdx +0 -147
  59. package/docs/configuration/docs.md +0 -282
  60. package/docs/configuration/llms.md +0 -90
  61. package/docs/configuration/manifest.md +0 -129
  62. package/docs/configuration/navigation.mdx +0 -415
  63. package/docs/configuration/protected-routes.md +0 -150
  64. package/docs/configuration/search.md +0 -164
  65. package/docs/configuration/sentry.mdx +0 -44
  66. package/docs/configuration/site.md +0 -124
  67. package/docs/configuration/slots.mdx +0 -125
  68. package/docs/configuration/vite-config.md +0 -18
  69. package/docs/custom-plugins.md +0 -285
  70. package/docs/deploy/apache-nginx.md +0 -41
  71. package/docs/deploy/cloudflare-pages.md +0 -74
  72. package/docs/deploy/direct-upload.md +0 -17
  73. package/docs/deploy/github-pages.md +0 -49
  74. package/docs/deploy/vercel.md +0 -101
  75. package/docs/extending/events.md +0 -124
  76. package/docs/guides/environment-variables.md +0 -94
  77. package/docs/guides/managing-api-keys-and-identities.md +0 -89
  78. package/docs/guides/navigation-rules.mdx +0 -203
  79. package/docs/guides/processors.mdx +0 -234
  80. package/docs/guides/transforming-examples.md +0 -156
  81. package/docs/guides/using-multiple-apis.md +0 -87
  82. package/docs/plugins.md +0 -24
@@ -1,9 +1,15 @@
1
- # Deployment
2
-
3
- | Path | Docs |
4
- | ------------------------------ | ------------------------------------ |
5
- | **CLI** (`npx apitogo deploy`) | [Go live with CLI](./cli/go-live.md) |
6
- | **MCP / agents** | [Go live](./mcp/go-live.md) |
7
-
8
- Local-only builds: `npx apitogo build` (optional `--preview`). Platform publish is always
9
- `npx apitogo deploy`.
1
+ # Deployment
2
+
3
+ Your portal, gateway, sign-in and plans are deployed to APItoGo with one command:
4
+
5
+ ```bash
6
+ npx apitogo deploy
7
+ ```
8
+
9
+ | Path | Docs |
10
+ | ---------------- | ----------------------------------------------------------------------------------------- |
11
+ | **CLI** | [Deploy with the APItoGo CLI](./deploy/apitogo.md) · [Go live with CLI](./cli/go-live.md) |
12
+ | **MCP / agents** | [Go live](./mcp/go-live.md) |
13
+
14
+ To check the portal before deploying, `npx apitogo run` previews it locally and `npx apitogo build`
15
+ makes a production build.
@@ -0,0 +1,123 @@
1
+ ---
2
+ title: Set up Stripe for paid plans
3
+ sidebar_icon: credit-card
4
+ description:
5
+ Find your Stripe secret key and create the webhook that tells your portal a payment went through,
6
+ step by step with pictures.
7
+ ---
8
+
9
+ A plan with a price is paid through **your own Stripe account**. `npx apitogo deploy` needs two
10
+ things from Stripe:
11
+
12
+ | What | Starts with | What it does |
13
+ | ---------------------- | ------------------------ | --------------------------------------------------- |
14
+ | Secret key | `sk_test_` or `sk_live_` | Lets your plans backend create checkout pages |
15
+ | Webhook signing secret | `whsec_` | Lets your plans backend trust Stripe's payment news |
16
+
17
+ Deploy asks for both, hidden, and stores them as project secrets. They never go into
18
+ `apitogo.config.json`.
19
+
20
+ :::tip
21
+
22
+ Start in a **sandbox** (Stripe's test mode). The pictures below come from one: nothing you do there
23
+ charges real cards. Switch to your live account when you are ready to sell.
24
+
25
+ :::
26
+
27
+ ## 1. Copy the secret key
28
+
29
+ In the Stripe dashboard, open **Developers › API keys**. Under **Standard keys**, reveal the
30
+ **Secret key** and copy it.
31
+
32
+ <Framed>![The API keys page with the publishable and secret keys](./stripe/1-api-keys.jpg)</Framed>
33
+
34
+ Use the **secret** key. The publishable key (`pk_`) cannot take payments, and deploy refuses it. A
35
+ restricted key (`rk_`) works too, if it may write Checkout Sessions, Customers and Subscriptions.
36
+
37
+ Run deploy and paste the key when it asks:
38
+
39
+ ```bash
40
+ npx apitogo deploy
41
+ # Stripe secret key (hidden):
42
+ ```
43
+
44
+ ## 2. Add the webhook
45
+
46
+ After a payment, Stripe sends an event to your portal's plans backend. That event is what turns a
47
+ paid checkout into an active plan.
48
+
49
+ Deploy prints the address to use, for example:
50
+
51
+ ```
52
+ https://portal.<your-portal>.apitogo.com/api/v1/webhooks/stripe
53
+ ```
54
+
55
+ In Stripe, open **Workbench › Webhooks** and choose **Add destination**.
56
+
57
+ <Framed>
58
+ ![The Event destinations list with the Add destination button](./stripe/2-event-destinations.jpg)
59
+ </Framed>
60
+
61
+ Keep **Your account** and the **Snapshot** payload style.
62
+
63
+ <Framed>![The first step: event destination scope and payload style](./stripe/3-scope.jpg)</Framed>
64
+
65
+ Search for and select these four events:
66
+
67
+ - `checkout.session.completed`
68
+ - `customer.subscription.updated`
69
+ - `customer.subscription.deleted`
70
+ - `invoice.payment_failed`
71
+
72
+ <Framed>![Selected events: the four events ticked](./stripe/4-events.jpg)</Framed>
73
+
74
+ Choose **Webhook endpoint** as the destination type, then paste the address deploy printed into
75
+ **Endpoint URL** and choose **Create destination**.
76
+
77
+ <Framed>
78
+ ![The Configure destination step with the endpoint URL filled in](./stripe/5-endpoint-url.jpg)
79
+ </Framed>
80
+
81
+ ## 3. Copy the signing secret
82
+
83
+ Open the new destination. Under **Signing secret**, reveal the secret (the eye icon) and copy it.
84
+
85
+ <Framed>![The destination page with its signing secret](./stripe/6-signing-secret.jpg)</Framed>
86
+
87
+ Paste it where deploy asks:
88
+
89
+ ```bash
90
+ # Stripe webhook signing secret (hidden, Enter to skip):
91
+ ```
92
+
93
+ If you skipped it, set it later and deploy the plans again:
94
+
95
+ ```bash
96
+ npx apitogo secrets set STRIPE_WEBHOOK
97
+ npx apitogo deploy --only plans
98
+ ```
99
+
100
+ ## Check it works
101
+
102
+ Run `npx apitogo deploy --only plans` again. When Stripe has sent an event, it reports:
103
+
104
+ ```
105
+ Stripe webhook: verified (last event 2 min ago, checkout.session.completed)
106
+ ```
107
+
108
+ Buy your own plan with a [Stripe test card](https://docs.stripe.com/testing#cards), such as
109
+ `4242 4242 4242 4242`, to send the first event.
110
+
111
+ ## Going live
112
+
113
+ Live mode has its own keys and its own webhooks. Switch to your live account in Stripe, repeat the
114
+ three steps there, and set the new values:
115
+
116
+ ```bash
117
+ npx apitogo secrets set STRIPE_API_KEY
118
+ npx apitogo secrets set STRIPE_WEBHOOK
119
+ npx apitogo deploy --only plans
120
+ ```
121
+
122
+ Selling paid plans needs the **Starter** or **Professional** hosting plan. See
123
+ [Gateway plans](../configuration/plans.md).
@@ -1,173 +1,172 @@
1
- ---
2
- sidebar_icon: scissors-line-dashed
3
- title: Frontmatter
4
- description:
5
- Learn how to use YAML frontmatter in APIToGo markdown files to customize page titles,
6
- descriptions, navigation, and other document properties.
7
- ---
8
-
9
- Frontmatter is metadata written in [YAML](https://yaml.org/) format at the beginning of markdown
10
- files, enclosed between triple dashes (`---`). It allows you to configure various aspects of your
11
- pages without affecting the visible content.
12
-
13
- In APIToGo, frontmatter enables you to customize page titles, descriptions, navigation settings, and
14
- other document properties. Here are all the supported properties:
15
-
16
- ## Properties
17
-
18
- ### `title`
19
-
20
- Sets the page title that appears in the browser tab and as the document title.
21
-
22
- ```md
23
- ---
24
- title: My Page Title
25
- ---
26
- ```
27
-
28
- ### `description`
29
-
30
- Provides a description for the page, which can be used for SEO and content summaries.
31
-
32
- ```md
33
- ---
34
- description: This page explains how to use APIToGo's markdown features.
35
- ---
36
- ```
37
-
38
- ### `category`
39
-
40
- Assigns the page to a specific category for organizational purposes. This will be shown above the
41
- main heading of the document.
42
-
43
- ```md
44
- ---
45
- category: Getting Started
46
- ---
47
- ```
48
-
49
- ### `navigation_label`
50
-
51
- _Deprecated (`sidebar_label`)_
52
-
53
- Sets a custom label for the page in the sidebar navigation, allowing you to use a shorter or
54
- different title than the main page title.
55
-
56
- ```md
57
- ---
58
- title: My Very Long Documentation Page Title
59
- navigation_label: Short Title
60
- ---
61
- ```
62
-
63
- ### `navigation_icon`
64
-
65
- _Deprecated (`sidebar_icon`)_
66
-
67
- Specifies a [Lucide icon](https://lucide.dev/icons) to display next to the page in the sidebar
68
- navigation.
69
-
70
- ```md
71
- ---
72
- navigation_icon: compass
73
- ---
74
- ```
75
-
76
- ### `navigation_display`
77
-
78
- Specifies the display property of the navigation item. See the
79
- [Navigation guide](/docs/configuration/navigation#display-control)
80
-
81
- ```md
82
- ---
83
- navigation_display: auth
84
- ---
85
- ```
86
-
87
- ### `toc`
88
-
89
- Controls whether the table of contents is displayed for the page. Set to `false` to hide the table
90
- of contents.
91
-
92
- ```md
93
- ---
94
- toc: false
95
- ---
96
- ```
97
-
98
- ### `disable_pager`
99
-
100
- Controls whether the previous/next page navigation is displayed at the bottom of the page. Set to
101
- `true` to disable it.
102
-
103
- ```md
104
- ---
105
- disable_pager: true
106
- ---
107
- ```
108
-
109
- ### `draft`
110
-
111
- Marks a document as a draft. Draft documents are only visible when running in development mode and
112
- are excluded from production builds. This is useful for working on content that isn't ready to be
113
- published.
114
-
115
- ```md
116
- ---
117
- draft: true
118
- ---
119
- ```
120
-
121
- :::info
122
-
123
- When `draft: true` is set:
124
-
125
- - The document will be visible when running `npx apitogo run`
126
- - The document will be excluded from builds created with `npx apitogo build`
127
- - The document won't appear in the navigation or be accessible via URL in production
128
-
129
- :::
130
-
131
- ### `lastModifiedTime`
132
-
133
- The last modified timestamp for the page. This property is automatically set by APIToGo during the
134
- build process based on the Git commit history. You generally should not set this manually.
135
-
136
- If you need to override the automatically detected date, you can set it explicitly:
137
-
138
- ```md
139
- ---
140
- lastModifiedTime: 2025-11-20T10:30:00.000Z
141
- ---
142
- ```
143
-
144
- ::if{mode=opensource}
145
-
146
- :::info
147
-
148
- For accurate last modified dates in deployment environments, ensure full Git history is available
149
- during builds. See the [Vercel deployment guide](/docs/deploy/vercel#accurate-last-modified-dates)
150
- for configuration details.
151
-
152
- :::
153
-
154
- ::
155
-
156
- ## Complete Example
157
-
158
- Here's an example showing multiple frontmatter properties used together:
159
-
160
- ```md title=documentation.md
161
- ---
162
- title: Advanced Configuration Guide
163
- description: Learn how to configure advanced features in APIToGo
164
- category: Configuration
165
- navigation_label: Advanced Config
166
- navigation_icon: settings
167
- toc: true
168
- disable_pager: false
169
- draft: false
170
- ---
171
-
172
- This page content follows the frontmatter...
173
- ```
1
+ ---
2
+ sidebar_icon: scissors-line-dashed
3
+ title: Frontmatter
4
+ description:
5
+ Learn how to use YAML frontmatter in APIToGo markdown files to customize page titles,
6
+ descriptions, navigation, and other document properties.
7
+ ---
8
+
9
+ Frontmatter is metadata written in [YAML](https://yaml.org/) format at the beginning of markdown
10
+ files, enclosed between triple dashes (`---`). It allows you to configure various aspects of your
11
+ pages without affecting the visible content.
12
+
13
+ In APIToGo, frontmatter enables you to customize page titles, descriptions, navigation settings, and
14
+ other document properties. Here are all the supported properties:
15
+
16
+ ## Properties
17
+
18
+ ### `title`
19
+
20
+ Sets the page title that appears in the browser tab and as the document title.
21
+
22
+ ```md
23
+ ---
24
+ title: My Page Title
25
+ ---
26
+ ```
27
+
28
+ ### `description`
29
+
30
+ Provides a description for the page, which can be used for SEO and content summaries.
31
+
32
+ ```md
33
+ ---
34
+ description: This page explains how to use APIToGo's markdown features.
35
+ ---
36
+ ```
37
+
38
+ ### `category`
39
+
40
+ Assigns the page to a specific category for organizational purposes. This will be shown above the
41
+ main heading of the document.
42
+
43
+ ```md
44
+ ---
45
+ category: Getting Started
46
+ ---
47
+ ```
48
+
49
+ ### `navigation_label`
50
+
51
+ _Deprecated (`sidebar_label`)_
52
+
53
+ Sets a custom label for the page in the sidebar navigation, allowing you to use a shorter or
54
+ different title than the main page title.
55
+
56
+ ```md
57
+ ---
58
+ title: My Very Long Documentation Page Title
59
+ navigation_label: Short Title
60
+ ---
61
+ ```
62
+
63
+ ### `order`
64
+
65
+ The page's place in the sidebar among its siblings, lowest first. Pages without one follow, by name.
66
+ A folder's `index` page always comes first.
67
+
68
+ ```md
69
+ ---
70
+ order: 2
71
+ ---
72
+ ```
73
+
74
+ ### `navigation_icon`
75
+
76
+ _Deprecated (`sidebar_icon`)_
77
+
78
+ Specifies a [Lucide icon](https://lucide.dev/icons) to display next to the page in the sidebar
79
+ navigation.
80
+
81
+ ```md
82
+ ---
83
+ navigation_icon: compass
84
+ ---
85
+ ```
86
+
87
+ ### `navigation_display`
88
+
89
+ When the page shows in the sidebar: `always` (default), `auth` (only to signed-in visitors), `anon`
90
+ (only to signed-out visitors) or `hide`.
91
+
92
+ ```md
93
+ ---
94
+ navigation_display: auth
95
+ ---
96
+ ```
97
+
98
+ ### `toc`
99
+
100
+ Controls whether the table of contents is displayed for the page. Set to `false` to hide the table
101
+ of contents.
102
+
103
+ ```md
104
+ ---
105
+ toc: false
106
+ ---
107
+ ```
108
+
109
+ ### `disable_pager`
110
+
111
+ Controls whether the previous/next page navigation is displayed at the bottom of the page. Set to
112
+ `true` to disable it.
113
+
114
+ ```md
115
+ ---
116
+ disable_pager: true
117
+ ---
118
+ ```
119
+
120
+ ### `draft`
121
+
122
+ Marks a document as a draft. Draft documents are only visible when running in development mode and
123
+ are excluded from production builds. This is useful for working on content that isn't ready to be
124
+ published.
125
+
126
+ ```md
127
+ ---
128
+ draft: true
129
+ ---
130
+ ```
131
+
132
+ :::info
133
+
134
+ When `draft: true` is set:
135
+
136
+ - The document will be visible when running `npx apitogo run`
137
+ - The document will be excluded from builds created with `npx apitogo build`
138
+ - The document won't appear in the navigation or be accessible via URL in production
139
+
140
+ :::
141
+
142
+ ### `lastModifiedTime`
143
+
144
+ The last modified timestamp for the page. This property is automatically set by APIToGo during the
145
+ build process based on the Git commit history. You generally should not set this manually.
146
+
147
+ If you need to override the automatically detected date, you can set it explicitly:
148
+
149
+ ```md
150
+ ---
151
+ lastModifiedTime: 2025-11-20T10:30:00.000Z
152
+ ---
153
+ ```
154
+
155
+ ## Complete Example
156
+
157
+ Here's an example showing multiple frontmatter properties used together:
158
+
159
+ ```md title=documentation.md
160
+ ---
161
+ title: Advanced Configuration Guide
162
+ description: Learn how to configure advanced features in APIToGo
163
+ category: Configuration
164
+ navigation_label: Advanced Config
165
+ navigation_icon: settings
166
+ toc: true
167
+ disable_pager: false
168
+ draft: false
169
+ ---
170
+
171
+ This page content follows the frontmatter...
172
+ ```