`marketplace_listings` (RevampIT internal-shop table) and the /api/shop/inventory
routes were superseded by the unified `listings` table (RevampIT stock carries
is_revampit=true, published via publishRevampitListing). The table was dead for
writes (orphan rows only). Removed end-to-end:
- Repointed the 4 remaining readers off marketplace_listings to `listings`:
- /api/stats/community -> count active `listings`
- /api/stats/impact -> drop the separate shop-sold count, which DOUBLE-COUNTED
RevampIT sold items (already present in `listings` via is_revampit). Bugfix.
- /api/admin/search-index -> recent `listings`
- /api/user/donations -> derive the "listed" stage from inventory_items.marketplace_status
(no marketplace_listings join); sold_at from inventory_items.updated_at.
- Removed the admin "Shop Produkte" tab: deleted /api/shop/inventory[/[id]] routes,
useShopProducts hook, ShopProductsTable, ProductTabSwitcher, and the orphaned
inventory-service (getInventoryProducts/getInventoryProductByUuid). Collapsed
ProductManagement to the single Erfassung-inventory view; dropped the now-dead
unpublish flow. /admin/products still works (inventory view + erfassung return-to).
- Schema/config: removed the marketplaceListings Drizzle table + MARKETPLACE_LISTINGS
from TABLE_NAMES; archived the one-time backfill script.
- Migration 103 drops the table (must reach the Hetzner prod DB). No FK references it.
- Docs: .claude/CLAUDE.md + ARCHITECTURE_DEBT updated (storefront unified).
The /shop/* pages stay as redirects to /marketplace for legacy URLs.
typecheck + lint clean; full suite zero new failures vs baseline.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>