Marcus V.
Curving abstract shapes with an orange and blue gradient

Einfachrecht: Building an Enterprise CMS for Legal Content

Published

The Challenge of Legal Content

Legal content is unlike any other content type. It requires exceptional accuracy, clear sourcing, regular updates as laws change, and accessibility for non-lawyers. When einfachrecht.com needed a content management system, off-the-shelf solutions fell short.

The core challenge wasn't technical complexity — it was domain complexity. Legal articles reference each other, belong to hierarchical categories, require version control for accountability, and need to go through editorial review before publication. Building a CMS that handles all of this while remaining usable by legal editors (not developers) became the project's central design problem.

Why Payload CMS

I evaluated several headless CMS options: Strapi, Directus, Sanity, Contentful. Payload CMS won for a specific reason: it's code-first and infinitely customizable while still providing an excellent admin experience out of the box.

With Payload, I could define complex content structures, create custom field types, build editorial workflows, and maintain full control over the frontend — all without fighting against the CMS. The admin panel adapts to the schema automatically, so editors get a polished experience without custom frontend work.

Payload's code-first approach meant I could version control the entire CMS configuration. Schema changes go through pull requests, just like any other code.

Content Architecture

The information architecture required careful planning. Legal articles needed to be organized by practice area, linked to relevant laws, tagged for discoverability, and related to other articles. This created a web of relationships that needed to be both powerful and manageable.

Einfachrecht screenshot 1 - Replace with actual screenshot
  • Articles: The primary content type with rich text, metadata, and relations
  • Practice Areas: Hierarchical categories for legal topics
  • Laws: Referenced legal texts that articles explain
  • Authors: Legal experts with credentials and bios
  • Tags: Flexible taxonomy for cross-cutting themes

Each article can reference multiple laws, belong to multiple practice areas, and link to related articles. These relationships are bidirectional where appropriate — viewing a law shows all articles that reference it. This interconnected structure helps users navigate complex legal topics.

Editorial Workflows

Legal content can't be published carelessly. The CMS implements a multi-stage workflow: Draft → Review → Approved → Published. Each stage has different permissions and UI affordances.

Draft articles are only visible to their author. Moving to Review notifies designated editors. Approval requires sign-off from a senior editor. Publication is automatic once approved, or can be scheduled for a specific date.

The Payload admin panel shows workflow state prominently. Authors see exactly where their article is in the pipeline. Editors see a queue of articles awaiting review. Nothing falls through the cracks because every article's state is always visible.

Preview and Versioning

Einfachrecht screenshot 2 - Replace with actual screenshot

Legal accuracy demands accountability. Every edit is versioned, every version can be compared, and rollback is always possible. This isn't just for error correction — it's for legal compliance. Being able to show what an article said on a specific date matters.

Live preview lets editors see exactly how their article will appear on the frontend before publication. This reduces the review cycle dramatically — there's no guessing about formatting or layout. What you see in preview is what readers will see.

Scheduled publishing became unexpectedly important. Legal changes often take effect on specific dates. The ability to schedule an updated article to publish at midnight when a new law takes effect means content stays accurate without requiring manual intervention at odd hours.

Search and Discovery

Legal content is only valuable if users can find what they need. The CMS integrates with Payload's search plugin, indexing article content, tags, and relationships. Search understands legal terminology and surfaces relevant results even for queries using everyday language.

Practice area pages automatically aggregate their articles, sorted by relevance and recency. Tag pages work similarly. Users can browse by topic or search directly — both paths lead to the content they need.

SEO as a First-Class Citizen

Legal information searchers start on Google. The CMS generates comprehensive meta tags, structured data, and sitemaps automatically. Each article includes SEO fields that editors can customize, with sensible defaults generated from the content.

The frontend uses Next.js for optimal performance and SEO. Server-side rendering ensures search engines see the full content. Performance optimization ensures fast loading, which Google rewards. The result: einfachrecht.com ranks well for relevant legal queries.

Forms and User Interaction

Legal information often prompts questions. The CMS includes a form builder that lets editors create inquiry forms without developer involvement. Forms collect user questions, route them to appropriate legal experts, and integrate with the team's existing communication tools.

Form submissions are stored in the CMS, creating a record of user interactions. This helps the editorial team understand what topics generate the most questions, informing content strategy.

Scale and Performance

The platform now hosts hundreds of legal articles across dozens of practice areas. Supabase handles the relational complexity efficiently. The Payload admin panel remains snappy even as content volume grows.

Image optimization uses Sharp for automatic format conversion and resizing. Articles load quickly even when image-heavy. The CDN caches aggressively while the CMS handles cache invalidation on content changes.

What I Learned

Building an enterprise CMS taught me that domain understanding matters more than technical sophistication. The most valuable conversations weren't about technology — they were about how legal editors actually work, what questions users actually ask, and how legal content is actually consumed.

The CMS architecture emerged from those conversations. Features were added because editors needed them, not because they seemed technically interesting. This user-centered approach — applied to an admin tool — made the difference between a CMS that editors tolerate and one they actually enjoy using.

Einfachrecht remains my largest project to date. It demonstrated that with the right foundation, a single developer can build enterprise-grade software. Payload CMS provided that foundation; everything else was just careful application of design thinking to domain-specific problems.