@lukoweb/apitogo 0.1.78 → 0.1.79

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.
@@ -57,8 +57,8 @@ metadata, with optional `.env` overrides for secrets and local tweaks.
57
57
  - **Site name / logo:** only `site.title` and `site.logo` (platform branding is derived at publish).
58
58
  - **OpenAPI path:** `backend.openApiPath` is derived from `apis[0].input`.
59
59
  - **Billing / account plans:** use `modules.userPanel.plans.enabled` and store the plan catalog in
60
- `modules.userPanel.plans.items`. Legacy root `plans` is migrated on load. Legacy `pricing.enabled`
61
- is migrated and stripped from site JSON; MCP/publish still receives derived `pricing.enabled`.
60
+ `modules.userPanel.plans.items`. Add plans with `apitogo config -i` or edit the manifest by hand.
61
+ See [Gateway plans](./plans.md). Legacy root `plans` is migrated on load.
62
62
  - **Docs / API keys:** configure under `modules.docs` and `modules.userPanel.apiKeys` only.
63
63
 
64
64
  ## Environment variables
@@ -90,6 +90,7 @@ APITOGO_CONFIG_AUTHENTICATION__STRIPE__WEBHOOK_SECRET=whsec_...
90
90
 
91
91
  ## Related
92
92
 
93
+ - [Gateway plans](./plans.md)
93
94
  - [Authentication](./authentication.md)
94
95
  - [Overview](./overview.md)
95
96
  - [MCP overview](../mcp/overview.md)
@@ -160,6 +160,8 @@ Put navigation in `apitogo.config.json`, or keep large trees in a separate modul
160
160
  ## Related
161
161
 
162
162
  - [Manifest (`apitogo.config.json`)](./manifest.md)
163
- - [Make config (CLI)](./make-config.mdx)
163
+ - [Make config (CLI)](./make-config.mdx) — interactive wizard (`apitogo config -i`)
164
+ - [Gateway plans](./plans.md)
164
165
  - [Authentication](./authentication.md)
165
166
  - [MCP overview](../mcp/overview.md)
167
+ - [Shape with CLI](../cli/shape.md)
@@ -0,0 +1,113 @@
1
+ ---
2
+ title: Gateway plans
3
+ sidebar_icon: tags
4
+ description:
5
+ Configure end-user API plans in apitogo.config.json — pricing, rate limits, quotas, and publish
6
+ behavior.
7
+ ---
8
+
9
+ **Gateway plans** (also called API plans) are what your **end users** subscribe to on `/pricing`.
10
+ They are separate from **platform hosting** (Free / Starter / Professional on APItoGo), which you
11
+ select with `apitogo apply --platform-plan`.
12
+
13
+ Store the catalog under `modules.userPanel.plans.items` in `apitogo.config.json`.
14
+
15
+ ## Shape with the CLI
16
+
17
+ `apitogo config -i` can add plans interactively (title, price, rate limit, monthly quota). You can
18
+ also edit the manifest by hand or use MCP `update_dev_portal_manifest`.
19
+
20
+ ```bash
21
+ npx apitogo config -i
22
+ # loop: plan → enter title, price, policies → done
23
+ ```
24
+
25
+ ## Canonical shape
26
+
27
+ ```json
28
+ {
29
+ "modules": {
30
+ "userPanel": {
31
+ "plans": {
32
+ "enabled": true,
33
+ "items": [
34
+ {
35
+ "sku": "free",
36
+ "displayName": "Free",
37
+ "priceAmount": 0,
38
+ "limitsJson": "{\"rateLimit\":{\"calls\":100,\"renewalPeriodSeconds\":60},\"quota\":{\"calls\":50000,\"renewalPeriodDays\":30}}"
39
+ },
40
+ {
41
+ "sku": "pro",
42
+ "displayName": "Pro",
43
+ "priceAmount": 29,
44
+ "priceCurrency": "usd",
45
+ "billingPeriod": "month",
46
+ "limitsJson": "{\"rateLimit\":{\"calls\":1000,\"renewalPeriodSeconds\":60},\"quota\":{\"calls\":500000,\"renewalPeriodDays\":30}}"
47
+ }
48
+ ]
49
+ }
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ - **`sku`** — stable identifier (used in checkout URLs and gateway sync).
56
+ - **`displayName`** — label on `/pricing`.
57
+ - **`priceAmount`** — `0` for free tiers; greater than zero for paid plans (USD by default).
58
+ - **`limitsJson`** — JSON string with rate limit and quota policies (see below).
59
+
60
+ Enable the catalog with `modules.userPanel.plans.enabled: true`. Legacy root `plans` is migrated on
61
+ load.
62
+
63
+ ## limitsJson schema
64
+
65
+ ```json
66
+ {
67
+ "rateLimit": { "calls": 100, "renewalPeriodSeconds": 60 },
68
+ "quota": { "calls": 50000, "renewalPeriodDays": 30 }
69
+ }
70
+ ```
71
+
72
+ - **rateLimit** — maximum calls per renewal window (per minute when `renewalPeriodSeconds` is 60).
73
+ - **quota** — longer-window cap (per 30 days when `renewalPeriodDays` is 30).
74
+
75
+ After OpenAPI is deployed, you can scope plans to specific API operations with
76
+ `includedActionKeys` (for example `get:/orders/{id}`). Edit those fields in
77
+ `apitogo.config.json` — see [Manifest](./manifest.md).
78
+
79
+ ## Publish
80
+
81
+ Gateway plans are applied when you run:
82
+
83
+ ```bash
84
+ apitogo apply
85
+ ```
86
+
87
+ `apitogo apply` syncs plans from the manifest to the platform gateway. Paid plans require Stripe
88
+ secrets in `.env` before publish — see [Go live with CLI](../cli/go-live.md).
89
+
90
+ ## Platform hosting vs gateway plans
91
+
92
+ | Kind | What it is | How |
93
+ | ---- | ---------- | --- |
94
+ | **Platform hosting** | APItoGo bill for hosting your portal + API hub | `apitogo apply --platform-plan` |
95
+ | **Gateway / API plans** | What your customers pay for API access | `modules.userPanel.plans.items` |
96
+
97
+ ### Free platform limitations
98
+
99
+ The **Free** platform plan cannot:
100
+
101
+ - Publish **paid** gateway plans (`priceAmount > 0`)
102
+ - Attach a **custom domain** to the dev portal
103
+
104
+ Use **Starter** or **Professional** for paid API tiers, Stripe checkout, and custom domains. If your
105
+ manifest has paid plans and you try `apitogo apply --platform-plan free`, apply is blocked until you
106
+ upgrade or zero/remove those paid plans.
107
+
108
+ ## Related
109
+
110
+ - [Manifest](./manifest.md)
111
+ - [Make config (CLI)](./make-config.mdx)
112
+ - [Authentication](./authentication.md)
113
+ - [Go live with CLI](../cli/go-live.md)
@@ -1,51 +1,17 @@
1
1
  # Deploy with APIToGo CLI
2
2
 
3
- Publish your local portal (and optional API hub) to the APItoGo platform with
4
- `apitogo apply`. This is the same engine as MCP `publish_dev_portal`.
3
+ Platform publish is **`apitogo apply`** — the same engine as MCP `publish_dev_portal`.
5
4
 
6
- ## Prerequisites
5
+ Full walkthrough (prerequisites, secrets, `--only`, status, teardown):
7
6
 
8
- - `APITOGO_API_KEY_ID` and `APITOGO_API_SECRET` in the environment
9
- - A site directory with `apitogo.config.json` (use `apitogo init` / `apitogo config`)
10
- - Secrets such as OIDC (and Stripe when you have paid plans) in `.env` as
11
- `APITOGO_CONFIG_AUTHENTICATION__*`
7
+ → **[Go live with CLI](../cli/go-live.md)**
12
8
 
13
- ## Apply everything
9
+ Quick reference:
14
10
 
15
11
  ```bash
16
- apitogo apply
12
+ export APITOGO_API_KEY_ID=apk_...
13
+ export APITOGO_API_SECRET=...
14
+ cd ./my-portal
15
+ apitogo apply --platform-plan free
16
+ apitogo status
17
17
  ```
18
-
19
- Creates or links the platform project, provisions modules, syncs gateway plans,
20
- deploys the API hub (when configured), updates the portal backend, and builds +
21
- deploys the portal frontend.
22
-
23
- ## Target specific resources
24
-
25
- ```bash
26
- apitogo apply --only apihub
27
- apitogo apply --only portal-backend
28
- apitogo apply --only portal-frontend
29
- apitogo apply --only apihub,portal-frontend
30
- apitogo apply --only portal-frontend --force
31
- ```
32
-
33
- | Resource | What it updates |
34
- | --- | --- |
35
- | `apihub` | Gateway plans/baseline, API hub package + deploy, public routes |
36
- | `portal-backend` | Dev-portal module settings and plan catalog |
37
- | `portal-frontend` | Site build + Static Web App deploy |
38
-
39
- Omit `--only` to apply all three. Use `--force` to redeploy even when hashes match.
40
-
41
- ## Other useful commands
42
-
43
- ```bash
44
- apitogo status # account + project + live checks
45
- apitogo teardown --yes # delete the platform project
46
- apitogo build # local production build
47
- apitogo build --preview # preview the production build locally
48
- ```
49
-
50
- Multi-environment SWA deploy (`apitogo deploy --env …`) and
51
- `apitogo configure-github-workflow` are removed. Use `apitogo apply` instead.
@@ -2,7 +2,7 @@
2
2
 
3
3
  | Path | Docs |
4
4
  | --- | --- |
5
- | **CLI** (`apitogo apply`) | [Deploy with APIToGo CLI](./deploy/apitogo.md) |
5
+ | **CLI** (`apitogo apply`) | [Go live with CLI](./cli/go-live.md) |
6
6
  | **MCP / agents** | [Go live](./mcp/go-live.md) |
7
7
 
8
8
  Local-only builds: `apitogo build` (optional `--preview`). Platform publish is always `apitogo apply`.
@@ -11,6 +11,14 @@ components that APIToGo already has such as buttons, links and headers.
11
11
 
12
12
  Start by creating the page you want to add.
13
13
 
14
+ ## CLI scaffold
15
+
16
+ `apitogo config -i` can create a starter page under `pages/` and wire it into navigation. Choose
17
+ `page` in the wizard loop, then edit the generated `.tsx` file.
18
+
19
+ Predefined UI components (Callout, Card, Button, Heading, and more) are documented under
20
+ [/docs/components/](/docs/components/callout).
21
+
14
22
  ## Setup a custom page
15
23
 
16
24
  Each custom page is a page component of its own and lives in a `src` directory at the root of your
@@ -21,7 +21,7 @@ APIToGo uses Vite’s [env and mode](https://vite.dev/guide/env-and-mode) model,
21
21
  Nested overrides use `__` path segments (SCREAMING_SNAKE). See [Manifest](../configuration/manifest.md).
22
22
 
23
23
  **Never commit** OIDC client secrets or Stripe keys. MCP never puts secrets in chat — you write them
24
- to `.env` before [go-live](../mcp/go-live.md).
24
+ to `.env` before [go-live](../mcp/go-live.md) or `apitogo apply` ([CLI go-live](../cli/go-live.md)).
25
25
 
26
26
  Example:
27
27
 
@@ -85,7 +85,8 @@ interface ImportMeta {
85
85
 
86
86
  | Variable | Purpose |
87
87
  | -------- | ------- |
88
- | `APITOGO_API_KEY_ID` / `APITOGO_API_SECRET` | Required for MCP |
88
+ | `APITOGO_API_KEY_ID` / `APITOGO_API_SECRET` | Required for MCP and CLI apply/status/teardown |
89
89
  | `APITOGO_DOC_TOOL_PATH` | Optional local doc-tool for scaffold |
90
+ | `APITOGO_MCP_PATH` | Optional local MCP checkout for CLI apply/status/teardown |
90
91
 
91
- See [MCP overview](../mcp/overview.md).
92
+ See [MCP overview](../mcp/overview.md) and [CLI overview](../cli/overview.md).
@@ -90,7 +90,7 @@ shape → deploy_backend → publish_dev_portal(skipBackendRedeploy: true)
90
90
  | MCP `publish_dev_portal` | Full product go-live (plans, auth, hosting, verify) |
91
91
  | CLI `apitogo apply` | Publish config to platform (apihub + portal) |
92
92
 
93
- See [Deploy with APIToGo CLI](../deploy/apitogo.md).
93
+ See [Go live with CLI](../cli/go-live.md).
94
94
 
95
95
  ## Related
96
96
 
@@ -73,4 +73,4 @@ Details: [Manifest](../configuration/manifest.md).
73
73
  - [Configure MCP](./setup.md)
74
74
  - [Quickstart](../quickstart.md)
75
75
  - [Shape](./shape.md) · [Go live](./go-live.md) · [Tools](./tools.md)
76
- - CLI without an agent: see the footnote on [Quickstart](../quickstart.md#without-an-agent-cli)
76
+ - CLI without an agent: [CLI overview](../cli/overview.md)
@@ -68,14 +68,6 @@ Build an API product (developer portal, plans, gateway, backend) with an AI agen
68
68
 
69
69
  ## Without an agent (CLI)
70
70
 
71
- If you prefer not to use MCP:
71
+ Prefer the terminal? Use the **`apitogo`** CLI for the same config-first workflow:
72
72
 
73
- ```bash
74
- npm create @lukoweb/apitogo@latest
75
- cd your-project-name
76
- npm run dev
77
- ```
78
-
79
- For an existing `pages/` + OpenAPI folder: `apitogo config` (see
80
- [Make config](./configuration/make-config.mdx)). That command writes `apitogo.config.json`. Site-only
81
- deploy with a token: [Deploy with APIToGo CLI](./deploy/apitogo.md).
73
+ → **[Install the CLI](./cli/setup.md)** · [Shape](./cli/shape.md) · [Go live](./cli/go-live.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukoweb/apitogo",
3
- "version": "0.1.78",
3
+ "version": "0.1.79",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "**/*.css",