docs(quick-261016-sz9): main SummerCMS demo instance (sm-demo-app + vue-demo-app)
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
---
|
||||
quick_id: 261016-sz9
|
||||
type: quick
|
||||
mode: quick
|
||||
created: 2026-10-16
|
||||
repos: [sm-demo-app (new, local), vue-demo-app (new, local)]
|
||||
---
|
||||
|
||||
# Quick 261016-sz9: main SummerCMS demo instance (local)
|
||||
|
||||
Set up the main SummerCMS demo instance, local first (user decisions 2026-10-16): a new
|
||||
`sm-demo-app` next to the other apps with every shared Golem15 plugin, an app plugin that
|
||||
registers the pgsub user subscriber and seeds demo content (`demo:seed`), and a Nuxt site
|
||||
`vue-demo-app` extending the journal, faq, menu and paymentgateway layers. Local git only:
|
||||
no remotes, no push, no tag. Shared plugin repos and layers are not modified; problems
|
||||
found in them are reported.
|
||||
|
||||
## Task 1: sm-demo-app Go host
|
||||
|
||||
files: ../sm-demo-app/{summer.yaml,main.go,plugins.gen.go,go.mod,go.sum,go.work,config/*,
|
||||
compose.yaml,plugins/demo/**,boot_test.go,scripts/*,README.md,DEPLOY.md,.gitmodules,.gitignore}
|
||||
|
||||
action:
|
||||
- `git init`; submodules at `plugins/golem15/<name>` for user, translate, journal, sitemap,
|
||||
menu, faq, paymentgateway, paymentgatewaysubscriptions, pgstripe, presentations, quizzes,
|
||||
golem, feedback (golem and feedback are shared `golem15/sm-*-plugin` repos per
|
||||
fonoteka.go/.gitmodules). Cloned from the local checkouts so pointers match the local
|
||||
state (pgsub/pgstripe carry unreleased fixes); `.gitmodules` URLs are the SSH remotes.
|
||||
- `summer.yaml` with every plugin id (pgstripe root and `subscriptions`), app plugin
|
||||
`golem15.demo` (in-repo module `plugins/demo`); `go.work` uses the app, the submodules and
|
||||
the in-repo plugin, and replaces the framework with `../summercms.go`.
|
||||
- `plugins/demo`: `Subscribables()` returns `classes.UserSubscribable()`; `demo:seed`
|
||||
console command (idempotent) seeding an admin, a frontend user, journal categories and
|
||||
posts, FAQ, a main menu, a presentation, a quiz and two subscription plans.
|
||||
- Config without secrets (`.env` for secrets), docker compose Postgres on 127.0.0.1:55540,
|
||||
app on 127.0.0.1:8097; `scripts/dev.sh up|down|status|logs` to start/stop Postgres, Go and Nuxt.
|
||||
- `boot_test.go`: every plugin activates; README and DEPLOY.md stub.
|
||||
|
||||
verify: `summer build` leaves main.go/plugins.gen.go unchanged, `go vet ./...`,
|
||||
`go test -short ./...`, migrate + demo:seed twice without error.
|
||||
done: binary serves admin and every plugin API on :8097.
|
||||
|
||||
## Task 2: vue-demo-app Nuxt site
|
||||
|
||||
files: ../vue-demo-app/** (own repo, mounted as submodule `vue-demo-app` in sm-demo-app)
|
||||
|
||||
action: Nuxt 4 app extending vue-journal-layer, vue-menu-layer, vue-faq-layer,
|
||||
vue-paymentgateway-layer. Pinned git tags in package.json like vue-grzybyfunkcjonalne-app;
|
||||
local development against the sibling checkouts documented (and used for the local run if
|
||||
unreleased layer changes are needed). Pages: home, journal list/post (layer routes), FAQ,
|
||||
subscriptions (plans, subscribe, my subscription, manage), login/logout. Dev proxy for the
|
||||
plugin API paths to :8097 so the browser stays same-origin. Simple, presentable styling.
|
||||
|
||||
verify: `pnpm install`, `nuxt build` (or `nuxt prepare` + dev render) succeed.
|
||||
done: site renders on 127.0.0.1:3020.
|
||||
|
||||
## Task 3: run and smoke
|
||||
|
||||
action: start Postgres, migrate, seed, serve; start Nuxt; wire Stripe test mode only if
|
||||
straightforward (CLI `[default]` test key into `.env`, never printed). Smoke: admin login,
|
||||
each plugin's admin screen answers, Nuxt home/journal/faq/subscriptions render.
|
||||
|
||||
verify: smoke results recorded in SUMMARY.
|
||||
done: demo running locally; start/stop documented.
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
quick_id: 261016-sz9
|
||||
status: complete
|
||||
completed: 2026-10-16
|
||||
repos:
|
||||
sm-demo-app: [2033502, 945430e, 7de5e28, fd512a1]
|
||||
vue-demo-app: [e5dde18]
|
||||
---
|
||||
|
||||
# Quick 261016-sz9: main SummerCMS demo instance (local) — Summary
|
||||
|
||||
Two new local repositories next to the other apps; no remotes, nothing pushed or tagged. The shared
|
||||
plugin repos and layers were not modified.
|
||||
|
||||
## sm-demo-app (Go host)
|
||||
|
||||
- `summer.yaml` activates 15 plugins: user, translate, journal, sitemap, menu, faq, paymentgateway,
|
||||
pgstripe, pgstripesubscriptions, paymentgatewaysubscriptions, presentations, quizzes, golem,
|
||||
feedback and the in-repo `golem15.demo`. golem and feedback are shared `golem15/sm-*-plugin` repos
|
||||
(fonoteka.go/.gitmodules), so they are included.
|
||||
- Submodules under `plugins/golem15/<name>`, cloned from the local checkouts (pointers = local state;
|
||||
pgsub, pgstripe and paymentgateway carry unpushed commits), `.gitmodules` URLs are the SSH remotes.
|
||||
user is v0.1.1 (24b16b1), quizzes origin/master (362dc02).
|
||||
- `go.work` uses the plugin checkouts and replaces the framework with `../summercms.go`; it replaces
|
||||
(instead of using) paymentgateway, pgsub and user, whose paths other plugins' go.mod files replace
|
||||
with layout-specific relative paths.
|
||||
- `golem15.demo`: `Subscribables()` registers `classes.UserSubscribable()`; `demo:seed` (idempotent)
|
||||
seeds a frontend user, journal categories and posts, FAQ `home`, menu `main`, presentation
|
||||
`getting-started`, quiz `summercms-basics`, plans `starter`/`professional` and the sitemap definition.
|
||||
- Config without secrets, `compose.yaml` (Postgres 17 on 127.0.0.1:55540), `scripts/dev.sh`
|
||||
(up/down/destroy/status/logs/seed/stripe), `deploy/env.example`, `DEPLOY.md` stub, README.
|
||||
- `boot_test.go`: every plugin activates before a database is published and each API prefix is routed.
|
||||
|
||||
## vue-demo-app (Nuxt 4)
|
||||
|
||||
Extends vue-journal-layer v0.5.0, vue-menu-layer v0.3.0, vue-faq-layer v0.3.0 and
|
||||
vue-paymentgateway-layer v0.2.1 (git tags). Layout with the `main` menu, home (hero, plugin cards,
|
||||
latest posts, FAQ), journal under `/blog`, `/faq`, `/subscriptions` (PgMySubscription, PgPlans),
|
||||
`/login` (JWT cookie for the layer's auth hook). Dev proxy of the API paths to the Go server.
|
||||
Mounted in sm-demo-app as the `vue-demo-app` submodule.
|
||||
|
||||
## Verification
|
||||
|
||||
- `summer build` leaves main.go and plugins.gen.go unchanged; `go vet` and `go test -short .` pass.
|
||||
- `scripts/dev.sh up` from a stopped state: migrate, admin, seed (second run: all "exists"), Go and Nuxt up.
|
||||
- Admin: login works; all 21 controller lists answer 200 (journal 4 posts, FAQ 1, menu 4 entries,
|
||||
plans 2, presentations 1 / slides 3, quizzes 1 / questions 3 / answers 9, users 1, ...); the 6
|
||||
settings pages and the sitemap and locales screens answer 200.
|
||||
- Site: `/`, `/blog`, `/blog/welcome-to-summercms`, `/blog/category/guides`, `/faq`, `/subscriptions`,
|
||||
`/login` answer 200 with the seeded content; login through the proxy returns a token; the logged-in
|
||||
subscriptions page renders.
|
||||
- Stripe: `scripts/dev.sh stripe` wired test mode, Sync All to Stripe synced both plans (0 failed),
|
||||
and a checkout through the site's proxy returned a `checkout.stripe.com` session. No payment made.
|
||||
|
||||
## Problems found in shared code (not fixed)
|
||||
|
||||
1. pgstripe and pgsub `go.mod` replace paymentgateway/pgsub with `../sm-*-plugin` (meta-repo layout);
|
||||
presentations, quizzes and feedback replace user with `../user`. In a consuming workspace these
|
||||
resolve to missing paths; the app's go.work has to override them.
|
||||
2. vue-journal-layer v0.5.0 registers a `@nuxtjs/sitemap` source handler; an app that sets
|
||||
`sitemap: { enabled: false }` (as vue-grzybyfunkcjonalne-app does on v0.4.0) fails every SSR request
|
||||
with `defineSitemapEventHandler is not defined`. The demo keeps the Nuxt sitemap on and links the
|
||||
Go `/sitemap.xml`.
|
||||
3. The sitemap plugin builds URLs on `app.url` (the Go origin) unless its `frontend_url` setting is
|
||||
set; the demo leaves the setting empty.
|
||||
|
||||
## Open
|
||||
|
||||
- Remote repos `golem15/sm-demo-app` and `golem15/vue-demo-app` do not exist yet; `.gitmodules` points
|
||||
at the planned SSH URLs.
|
||||
- Deployment (host, domain) is a later step.
|
||||
Reference in New Issue
Block a user