Stop Hardcoding 'Legal Mentions' in Next.js 🇪🇺 (Open Source Component)

Published: (December 30, 2025 at 08:13 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Legal Mentions illustration

The “Boring” Part of Building a SaaS

We all love building the product—the dashboards, the Stripe integration, the animations.

But if you are launching a company in Europe (specifically France, UK, or Switzerland), you hit a wall right before launch: compliance.

You legally need a Legal Mentions (Mentions Légales) modal that displays:

  • Your corporate ID (SIRET / VAT / CRN)
  • Hosting provider details (address + contact)
  • Intellectual property disclaimer

Most developers hard‑code this into a component or a static page. When the office moves or the hosting changes, you have to hunt down the code.

The Solution: Data‑Driven Compliance

I got tired of rewriting this for every client launch in Paris and London. So, I extracted it into a reusable Next.js component that drives the legal text from a simple JSON file. It’s open‑source, and you can grab it today.

{
  "company": {
    "trade_name": "MY STARTUP",
    "legal_name": "My Startup Ltd",
    "siret": "993 637 xxx",
    "vat_number": "FR XX 993 637 750",
    "address": "59 rue de Ponthieu, 75008 Paris",
    "contact_email": "hello@mystartup.com"
  },
  "hosting": {
    "provider": "Vercel Inc.",
    "address": "340 S Lemon Ave, Walnut, CA 91789, USA"
  },
  "translations": {
    "en": { "publisher": "Website Publisher", "hosting": "Hosting Provider" },
    "fr": { "publisher": "Éditeur du Site", "hosting": "Hébergeur" }
  }
}

The Component

The component simply consumes this data. It handles the boring formatting (like making sure the SIRET number is readable) so you don’t have to.

Features

  • ✅ Zero dependencies: no heavy libraries, just React/Next.js.
  • ✅ Multilingual: supports EN/FR/RU structure instantly.
  • ✅ EU compliant: formatted specifically for French/UK regulations (Loi LCEN).

Get the Code

I’ve open‑sourced the boilerplate on GitHub. Feel free to fork it, star it, or use it in your next freelance project.

GitHub Repo: nextjs-legal-mentions-boilerplate

Why Did I Build This?

I help global founders (international entrepreneurs in London, Zurich, Paris) launch their tech stacks without getting bogged down in admin. When you’re starting a business, you should focus on customers, not formatting VAT numbers in a footer.

  • If you enjoyed this snippet, give the repo a star! ⭐
  • Need a full technical setup for your new company? Check out https://www.reklamof.xyz/
Back to Blog

Related posts

Read more »