Monorepo: consolidate 7 repos into one
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m5s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m5s
Combines shared, blog, market, cart, events, federation, and account into a single repository. Eliminates submodule sync, sibling model copying at build time, and per-app CI orchestration. Changes: - Remove per-app .git, .gitmodules, .gitea, submodule shared/ dirs - Remove stale sibling model copies from each app - Update all 6 Dockerfiles for monorepo build context (root = .) - Add build directives to docker-compose.yml - Add single .gitea/workflows/ci.yml with change detection - Add .dockerignore for monorepo build context - Create __init__.py for federation and account (cross-app imports)
This commit is contained in:
56
market/README.md
Normal file
56
market/README.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# Market App
|
||||
|
||||
Product browsing and marketplace service for the Rose Ash cooperative. Displays products scraped from Suma Wholesale.
|
||||
|
||||
## 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
|
||||
models/ # Market-domain models (+ re-export stubs)
|
||||
bp/ # Blueprints
|
||||
market/ # Market root, navigation, category listing
|
||||
browse/ # Product browsing with filters and infinite scroll
|
||||
product/ # Product detail pages
|
||||
cart/ # Page-scoped cart views
|
||||
api/ # Product sync API (used by scraper)
|
||||
scrape/ # Suma Wholesale scraper
|
||||
services/ # register_domain_services() — wires market + cart
|
||||
shared/ # Submodule -> git.rose-ash.com/coop/shared.git
|
||||
```
|
||||
|
||||
## Cross-Domain Communication
|
||||
|
||||
- `services.cart.*` — cart summary via CartService protocol
|
||||
- `services.federation.*` — AP publishing via FederationService protocol
|
||||
- `shared.services.navigation` — site navigation tree
|
||||
|
||||
## Scraping
|
||||
|
||||
```bash
|
||||
bash scrape.sh # Full Suma Wholesale catalogue
|
||||
bash scrape-test.sh # Limited test scrape
|
||||
```
|
||||
|
||||
## Running
|
||||
|
||||
```bash
|
||||
export DATABASE_URL_ASYNC=postgresql+asyncpg://user:pass@localhost/coop
|
||||
export REDIS_URL=redis://localhost:6379/0
|
||||
export SECRET_KEY=your-secret-key
|
||||
|
||||
hypercorn app:app --bind 0.0.0.0:8001
|
||||
```
|
||||
Reference in New Issue
Block a user