Commit Graph

12 Commits

Author SHA1 Message Date
giles
f9e39333bf Replace direct MarketPlace imports with MarketService calls
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 51s
Market CRUD in blog now delegates to services.market.create_marketplace()
and soft_delete_marketplace() instead of importing MarketPlace directly.
Adds TODO comments on Calendar imports in admin routes (deferred to
admin UI rework). Updates shared submodule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 05:57:54 +00:00
giles
4155df7e7c Domain isolation: replace cross-domain imports with service calls
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 50s
Replace direct Calendar, MarketPlace, and Post model queries with typed
service calls (services.blog, services.calendar, services.market,
services.cart). Blog registers all 4 services via domain_services_fn
with has() guards for composable deployment.

Key changes:
- app.py: use domain_services_fn instead of inline service registration
- admin routes: MarketPlace queries → services.market.marketplaces_for_container()
- entry_associations: CalendarEntryPost → services.calendar.entry_ids_for_content()
- markets service: Post query → services.blog.get_post_by_id/slug()
- posts_data, post routes: use calendar/market/cart services
- menu_items: glue imports → shared imports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:30:14 +00:00
giles
c537770172 Decouple blog: use shared.models for all cross-app imports
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 47s
- Replace all imports from cart.models, market.models, events.models
  with shared.models equivalents
- Convert blog/models/ghost_content.py to re-export stub
- Update shared + glue submodule pointers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:57:56 +00:00
giles
75a5d520e8 Add attach/detach glue calls to menu items, markets, and page config CRUD
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 45s
Wire up ContainerRelation tracking via attach_child/detach_child in:
- menu_items: create, update (re-link on post change), delete
- markets: create (including revive), soft_delete
- page config: creation in update_features and update_sumup routes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 09:52:12 +00:00
giles
a01016d8d5 feat: decouple blog from shared_lib, add app-owned models
Phase 1-3 of decoupling:
- path_setup.py adds project root to sys.path
- Blog-owned models in blog/models/ (ghost_content, snippet, tag_group)
- Re-export shims for shared models (user, kv, magic_link, menu_item)
- All imports updated: shared.infrastructure, shared.db, shared.browser, etc.
- No more cross-app post_id FKs in calendar/market/page_config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 12:46:31 +00:00
giles
8fad1ecc7d fix: auto-create PageConfig when enabling page features
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 36s
When toggling market/calendar features or saving SumUp settings,
create a PageConfig row if one doesn't exist yet instead of returning
a 404 error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:34:18 +00:00
giles
6bb520cb0a feat: show page cart badge in blog post header (Phase 4)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s
Fetches page-scoped cart count from /internal/cart/summary?page_slug=
for page posts and displays a cart icon with count in the post header
that links to the page cart.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 21:45:41 +00:00
giles
d859be217a feat: per-page SumUp admin UI and update_sumup route (Phase 3)
- Replace SumUp placeholder with real form for merchant code, API key, prefix
- Add PUT /admin/sumup/ route to save per-page SumUp credentials
- Pass sumup_configured/merchant_code/checkout_prefix to template context
- SumUp form only shown when calendar or market feature is enabled

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 20:49:30 +00:00
giles
3376e4e990 feat: show markets in post nav bar and admin panel
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 38s
- Post context processor loads MarketPlace rows for the page
- Nav bar displays market links (shopping-bag icon) alongside calendars
- Admin panel includes markets CRUD when market feature is enabled
- Updated shared_lib submodule with nav_entries template change

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 18:37:06 +00:00
giles
24d3860952 feat: add page admin market CRUD and update shared_lib
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 43s
- Market create/delete routes in post admin blueprint
- markets.py service (create_market, soft_delete_market)
- _markets_panel.html admin template with HTMX create/delete
- Update shared_lib submodule (MarketPlace model, migration, URLs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 18:08:32 +00:00
giles
8b6320619e feat: implement Pages as Spaces Phase 1
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 45s
- Add PageConfig model with feature flags (calendar, market)
- Auto-create PageConfig on Ghost page sync
- Add create_page() for Ghost /pages/ API endpoint
- Add /new-page/ route for creating pages
- Add ?type=pages blog filter with Posts|Pages tab toggle
- Add list_pages() to DBClient with PageConfig eager loading
- Add PUT /<slug>/admin/features/ route for feature toggles
- Add feature badges (calendar, market) on page cards
- Add features panel to page admin dashboard
- Update shared_lib submodule with PageConfig model

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 14:25:34 +00:00
giles
8f7a15186c feat: initialize blog app with blueprints and templates
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Extract blog-specific code from the coop monolith into a standalone
repository. Includes auth, blog, post, admin, menu_items, snippets
blueprints, associated templates, Dockerfile (APP_MODULE=app:app),
entrypoint, and Gitea CI workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:15:56 +00:00