@webhouse/cms 0.2.4 → 0.2.5
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.
- package/CLAUDE.md +56 -0
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -811,6 +811,62 @@ await cms.content.update('posts', doc.id, {
|
|
|
811
811
|
await cms.storage.close();
|
|
812
812
|
```
|
|
813
813
|
|
|
814
|
+
## CMS Admin UI
|
|
815
|
+
|
|
816
|
+
The visual admin interface for managing content. Four ways to run it:
|
|
817
|
+
|
|
818
|
+
| Method | Command | Best for |
|
|
819
|
+
|--------|---------|----------|
|
|
820
|
+
| **Hosted** | Open [webhouse.app](https://webhouse.app) | Quick access, no install |
|
|
821
|
+
| **npx** | `npx @webhouse/cms-admin-cli` | Local dev, auto-detects cms.config.ts |
|
|
822
|
+
| **Docker** | `docker run -p 3010:3010 -v $(pwd):/site ghcr.io/webhousecode/cms-admin` | Isolated, reproducible |
|
|
823
|
+
| **Git clone** | `git clone https://github.com/webhousecode/cms && pnpm install && pnpm dev` | Full source access |
|
|
824
|
+
|
|
825
|
+
### npx usage
|
|
826
|
+
|
|
827
|
+
```bash
|
|
828
|
+
npx @webhouse/cms-admin-cli # auto-detect cms.config.ts in cwd
|
|
829
|
+
npx @webhouse/cms-admin-cli --config ./cms.config.ts # explicit config path
|
|
830
|
+
npx @webhouse/cms-admin-cli -p 4000 # custom port (default: 3010)
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
First run clones and builds the admin (~2 min). Subsequent starts are instant (cached at `~/.webhouse/cms-admin/`).
|
|
834
|
+
|
|
835
|
+
### Docker usage
|
|
836
|
+
|
|
837
|
+
```bash
|
|
838
|
+
# Run admin pointing at current directory
|
|
839
|
+
docker run -p 3010:3010 -v $(pwd):/site ghcr.io/webhousecode/cms-admin
|
|
840
|
+
|
|
841
|
+
# With custom config path inside container
|
|
842
|
+
docker run -p 3010:3010 -v $(pwd):/site -e CMS_CONFIG_PATH=/site/cms.config.ts ghcr.io/webhousecode/cms-admin
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
### What the admin provides
|
|
846
|
+
|
|
847
|
+
- Visual document editor for all collections
|
|
848
|
+
- Block editor with drag-and-drop for `blocks` fields
|
|
849
|
+
- Structured array and object editors with JSON/UI toggle
|
|
850
|
+
- Rich text editor for `richtext` fields
|
|
851
|
+
- Image upload and gallery management
|
|
852
|
+
- Relation picker for cross-collection references
|
|
853
|
+
- Field-level AI lock indicators
|
|
854
|
+
- Draft/published status management with scheduled publishing
|
|
855
|
+
- AI content generation and rewriting
|
|
856
|
+
- Multi-site management (multiple sites from one admin)
|
|
857
|
+
- GitHub OAuth integration for GitHub-backed sites
|
|
858
|
+
|
|
859
|
+
### Suggesting admin to users
|
|
860
|
+
|
|
861
|
+
When building a site, always inform the user about admin options. Example:
|
|
862
|
+
|
|
863
|
+
> Your site is ready! To manage content visually, run:
|
|
864
|
+
> ```
|
|
865
|
+
> npx @webhouse/cms-admin-cli
|
|
866
|
+
> ```
|
|
867
|
+
> Then open http://localhost:3010 — your site's collections will appear automatically.
|
|
868
|
+
> You can also use the hosted version at webhouse.app.
|
|
869
|
+
|
|
814
870
|
## Key Architecture Notes
|
|
815
871
|
|
|
816
872
|
- **No database required** — filesystem adapter stores everything as JSON files committed to Git
|