This repository has been archived on 2026-02-24 . You can view files and clone it. You cannot open issues or pull requests or push a commit.
957e3c3fd3385e4cf662511240bbfbe26eb90770
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m1s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Blog App (Coop)
Blog, authentication, and content management service for the Rose Ash cooperative platform. Handles Ghost CMS integration, user auth, and admin settings.
Architecture
One of five Quart microservices sharing a single PostgreSQL database:
| App | Port | Domain |
|---|---|---|
| blog (coop) | 8000 | Auth, blog, admin, menus, snippets |
| market | 8001 | Product browsing, Suma scraping |
| cart | 8002 | Shopping cart, checkout, orders |
| events | 8003 | Calendars, bookings, tickets |
| federation | 8004 | ActivityPub, fediverse social |
Structure
app.py # Application factory (create_base_app + blueprints)
path_setup.py # Adds project root + app dir to sys.path
config/app-config.yaml # App URLs, feature flags, SumUp config
models/ # Blog-domain models (+ re-export stubs for shared models)
bp/ # Blueprints
auth/ # Magic link login, account, newsletters
blog/ # Post listing, Ghost CMS sync
post/ # Single post view and admin
admin/ # Settings admin interface
menu_items/ # Navigation menu management
snippets/ # Reusable content snippets
templates/ # Jinja2 templates
services/ # register_domain_services() — wires blog + calendar + market + cart
shared/ # Submodule -> git.rose-ash.com/coop/shared.git
Cross-Domain Communication
All inter-app communication uses typed service contracts (no HTTP APIs):
services.calendar.*— calendar/entry queries via CalendarService protocolservices.market.*— marketplace queries via MarketService protocolservices.cart.*— cart summary via CartService protocolservices.federation.*— AP publishing via FederationService protocolshared.services.navigation— site navigation tree
Domain Events
auth/routes.pyemitsuser.logged_inviashared.events.emit_event- Ghost sync emits
post.published/post.updatedfor federation
Running
export DATABASE_URL_ASYNC=postgresql+asyncpg://user:pass@localhost/coop
export REDIS_URL=redis://localhost:6379/0
export SECRET_KEY=your-secret-key
alembic -c shared/alembic.ini upgrade head
hypercorn app:app --bind 0.0.0.0:8000
Description
Languages
Python
62.2%
HTML
37.1%
Dockerfile
0.4%
Shell
0.3%