Legal pages
Compliance and legal pages management (AGB, Terms & Conditions, Privacy Policy, Impressum) for Medusa v2 with an interactive Admin Dashboard UI, public Store APIs, and multilingual support.
Medusa v2 Legal Pages & Compliance Plugin
A lightweight, production-ready Medusa v2 plugin for managing compliance and legal disclosure pages (AGB / Terms & Conditions, Datenschutzerklärung / Privacy Policy, and Impressum / Legal Notice) directly inside the Medusa Admin panel.
✨ Features
- 🏛️ Dedicated Medusa Admin UI: Adds a clean "Legal Pages" route to the Medusa Admin navigation bar.
- 📝 Live Markdown Workspace: Split-screen editor with real-time customer-facing preview, formatting toolbar, and keyboard shortcuts ( / ).
- 📝 Multi-Document Management: Create and manage customized compliance documents (Terms & Conditions, Privacy Policy, Imprint, Revocation) with custom versioning and draft/published statuses.
- 🚀 Dynamic App & Storefront Delivery: Public Store APIs (, ) allowing React Native mobile apps and Next.js storefronts to fetch compliance texts live without waiting for App Store or Google Play reviews.
- 🌐 Localization & Fallbacks: Built-in locale support (, , ) with automatic fallbacks to ensure legal screens are never blank.
📦 Installation
In your Medusa v2 backend project root:
Or with yarn / pnpm:
⚙️ Configuration
Simply register the plugin in your :
That's it! In Medusa v2, registering the plugin automatically:
- 🧭 Injects the Legal Pages item into your Medusa Admin sidebar navigation.
- 📡 Exposes all Storefront & Admin REST API routes (, ).
- 🗄️ Registers the Legal Module and database schema.
🗄️ Database Migrations
Run the database migration to create the table and indexes:
npx medusa db:migrate📡 Store API Reference
The plugin provides public endpoints for web storefronts and mobile apps:
1. List All Published Legal Pages
GET /store/legal-pages?locale=enResponse (200 OK):
2. Retrieve Specific Legal Document (with Markdown Content)
GET /store/legal-pages/:slug?locale=deExample:
Response (200 OK):
📱 Mobile App (React Native / Expo) Usage Example
🛠️ Contributing
Contributions and feedback are always welcome! Feel free to open an issue or submit a pull request.
📄 License
Distributed under the MIT License. See LICENSE for more information.

