riverbankcms 0.1.0 → 0.2.2

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.
@@ -1,6 +1,9 @@
1
1
  # Remote Site, Key, and User Access Setup
2
2
 
3
- This SDK project can sync content once it has a site ID, dashboard URL, and site-scoped management key. Creating the remote site, issuing keys, and granting dashboard user access are admin operations.
3
+ This SDK project can sync content once it has a site ID, dashboard URL, and
4
+ site-scoped management key. The authenticated Riverbank CLI can create a site
5
+ and link project credentials for the signed-in account. Additional user access
6
+ remains a dashboard operation.
4
7
 
5
8
  ## Check the Plan
6
9
 
@@ -18,18 +21,50 @@ riverbankcms setup plan --env=remote --json
18
21
 
19
22
  ## Authority Model
20
23
 
21
- - Dashboard/admin users can create sites, issue site-scoped management keys, and grant dashboard access.
22
- - Approved CMS repo scripts can do the same when run with service-role/admin credentials.
23
- - SDK management keys can verify access and sync content/config for one site. They cannot create sites, issue new keys, or grant user access.
24
+ - The authenticated Riverbank CLI can create sites and issue project
25
+ credentials for the signed-in account through `sites create`, `link`, and
26
+ `init`.
27
+ - Dashboard administrators can manage sites, issue credentials, and grant
28
+ access to additional users.
29
+ - SDK management keys can verify access and sync content/config for one site.
30
+ They cannot create sites or grant other users access.
24
31
 
25
- Do not put platform-admin, service-role, or user-session credentials in an SDK site repository.
32
+ The CLI stores its refresh session in the OS credential store when available.
33
+ It never puts account sessions, platform-admin credentials, or service-role
34
+ credentials in an SDK site repository.
35
+
36
+ Production account OAuth is deliberately rollout-disabled. Use the staging (or
37
+ local) account environment while that rollout is disabled; replace
38
+ `<account-environment>` with `production` only after production account access
39
+ has been explicitly enabled.
26
40
 
27
41
  ## Remote Setup Lifecycle
28
42
 
29
- 1. Create or choose the remote site from the dashboard/admin surface.
30
- 2. Generate a management key for that site.
31
- 3. Grant the site owner or editor dashboard access from the dashboard/admin surface.
32
- 4. Add the remote SDK variables to `.env.local`:
43
+ 1. Sign in to the account environment:
44
+
45
+ ```bash
46
+ riverbankcms login --account-env=<account-environment>
47
+ ```
48
+
49
+ 2. Create a site or choose one visible to the signed-in account:
50
+
51
+ ```bash
52
+ riverbankcms sites list --account-env=<account-environment>
53
+ riverbankcms sites create --account-env=<account-environment> --name "My Site" --yes
54
+ ```
55
+
56
+ 3. Link the project. `--preview` includes preview routes and a preview
57
+ credential; use `--no-preview` to omit them:
58
+
59
+ ```bash
60
+ riverbankcms link --project . --account-env=<account-environment> --site <site-id> --preview
61
+ ```
62
+
63
+ For a new directory, use `riverbankcms init` instead; it scaffolds, links,
64
+ initializes docs, and builds the complete project.
65
+
66
+ 4. Add the remote SDK variables to `.env.local` when linking an existing
67
+ project manually:
33
68
 
34
69
  ```bash
35
70
  RIVERBANK_REMOTE_SITE_ID=your-site-id
@@ -48,4 +83,25 @@ riverbankcms push --env=remote --dry-run
48
83
 
49
84
  ## Existing Sites and Users
50
85
 
51
- For an existing remote site, copy its site ID and create a fresh site-scoped management key if the old one is missing or should be rotated. Associate existing users with the site through the dashboard/admin surface. If the user does not exist yet, invite or create them through that approved flow rather than through the Riverbank CLI.
86
+ For an existing remote site, use `riverbankcms link` so the CLI issues the
87
+ needed site-scoped credentials and writes only ignored project env files.
88
+ Associate additional users with the site through the dashboard/admin surface.
89
+ If local work fails after the site is created, keep the site and resume with
90
+ the reported `riverbankcms init --resume <directory>` command after fixing the
91
+ local error.
92
+
93
+ ## Post-deployment revalidation
94
+
95
+ `init` scaffolds `/api/revalidate` but does not register a webhook or write a
96
+ webhook secret. Once the deployed site has a public HTTPS origin, activate
97
+ revalidation explicitly:
98
+
99
+ ```bash
100
+ riverbankcms webhooks setup \
101
+ --env=remote \
102
+ --url=https://www.example.com/api/revalidate \
103
+ --yes
104
+ ```
105
+
106
+ Until then, the generated site’s ISR interval is the freshness fallback. Keep
107
+ the one-time webhook secret in the deployment environment, not source control.