LegalCloud centralizes all your websites' legal information in one place, on Cloudflare

· IBS_technology

LegalCloud centralizes your websites' legal texts and serves them fast and securely. Here's how we built it on Cloudflare, with AI agents and senior architects.

LegalCloud centralizes all your websites' legal information in one place, on Cloudflare Success Stories

LegalCloud centralizes all the legal information of your websites in a single place and serves it quickly and securely. That is the promise of a platform that solves an everyday problem: anyone managing several websites must keep legal notices, privacy policies, cookie policies and terms up to date on each of them, and one slip is enough for a text to go stale. LegalCloud changes that: the text is edited once and published everywhere. On top of that, it is born on Cloudflare with an architecture designed to grow without any practical limit, and it was built by AI Agents directed by senior software architects.

What LegalCloud is and what problem it solves

A company with several websites, or an agency with dozens of clients, usually copies and pastes its legal texts onto each site. The result: different versions and outdated texts.

LegalCloud replaces that chaos with a single repository. The owner creates documents in a dashboard, assigns them to one or more sites, and the platform delivers them ready to display. Every change reaches all the websites instantly.

Key features

  • Document editor in visual and code mode, with variables that fill themselves in (site name, company details, dates).
  • Publishing on any website. There is an official WordPress plugin, compatible with the usual page builders, plus SDKs for JavaScript, Python and PHP and a public API.
  • Version history with restoration of any previous version.
  • Multiple languages: the platform works in Spanish, English, French, German and Italian.
  • Organizations and teams with roles (owner, administrator, editor, reader). An agency can create child organizations and distribute its quota.
  • Per-country or per-site control and visit statistics for every document.

How it is built: the entire platform on Cloudflare

The fundamental decision was to own no servers: everything runs on Cloudflare's global network, which brings code and data closer to each visitor. The infographic summarises the deployment.

Horizontal infographic of the LegalCloud architecture on Cloudflare: public site on Workers, dashboard on Pages, superpanel behind Zero Trust and the central API with D1, R2, KV, Durable Objects, Queues and Workflows
LegalCloud architecture on Cloudflare: three products (site, dashboard, superpanel) connected to a central API through service bindings.

LegalCloud is made up of three products and one shared brain:

  1. The public site (legalcloud.info) is a Worker serving the site, the news, the documentation and the plans in five languages, with carefully tuned SEO.
  2. The dashboard, the client panel, is published on Cloudflare Pages with functions at the edge. Documents, sites, team and billing are managed from it.
  3. The superpanel is the team's internal tool for supporting clients, reviewing billing, and managing news, tickets and backups. It is only accessible behind a Zero Trust identity layer.
  4. The API is a single Worker that concentrates authentication, permissions, quotas, payments and scheduled jobs. The three products talk to it through service bindings: an internal connection between Workers that never crosses the public internet.

Where the data lives

The API relies on Cloudflare services, each with a specific role:

  • D1 is the SQL database. There is a central database with the catalogue (plans, languages, configuration) and several client databases, called shards. When one fills up, another is added: growth is horizontal.
  • R2 stores the files: published documents, images, PDFs and backups. Its great advantage is that it does not charge for data egress.
  • KV is an ultra-fast global read cache for plans, translations and sessions.
  • Durable Objects provide atomic counters: API usage limits, access-PIN protection or the backup gateway.
  • Queues and Workflows handle email with retries and long-running backups.
  • Analytics Engine records visits without bloating the database, and Workers AI translates news and messages.
  • Cloudflare Email Service sends PINs, notifications and invoices, with automatic fallback.
  • Secrets Store holds every key and credential.

Near-infinite scaling: every piece grows on its own

The design follows one rule: no table or record may grow unbounded. Detailed records have short retention and a row cap, and public documents are served from cache, so a traffic spike never becomes a spike of database queries.

Since Workers run on demand, there are no machines to size or patch. Adding capacity means adding shards. It has been stress-tested with a real load of 10,145 organizations, 15,068 sites and 66,138 legal documents, to find bottlenecks before any customer does.

How much it costs and how much it will cost: figures for thousands, hundreds of thousands and millions of organizations

Cloudflare's pay-as-you-go model makes costs grow almost linearly and very contained. Using current public prices (Workers Paid at $5 per month plus $0.30 per extra million requests, D1 at $0.001 per million rows read and $1 per million rows written, R2 at $0.015 per GB per month and KV at $0.50 per million reads), we have modelled an average customer: about 5,000 monthly requests, one or two sites, six documents (the stress-test ratio) and a couple of megabytes of data.

OrganizationsMonthly requestsEstimated monthly costCost per organization
1,0005 million≈ $5≈ $0.005
10,00050 million≈ $65≈ $0.006
100,000500 million≈ $945≈ $0.009
1,000,0005 billion≈ $10,100≈ $0.010

These are infrastructure estimates, not a real invoice, and they exclude payment fees, email and minor services. They show what matters: going from one thousand to one million organizations multiplies usage a thousandfold, but the cost per customer barely doubles and hovers around one cent per month.

An orchestration between AI agents and senior architects

LegalCloud was not built with a single method, but with an orchestration between artificial intelligence and human experience. Most of the code was written by AI agents, mainly Claude, with occasional support from GLM and MiniMax. But no agent decided on its own.

Senior software architects set the architecture, decided where each piece of data lives, and reviewed every delivery. AI provides speed and consistency; people provide judgement, accountability and the final word. Every change is validated with automated tests and real services before reaching production, and security is subjected to specific audits whose findings are fixed before each release.

Security: a platform designed to trust no one

A repository of legal texts is a valuable target, so security has been part of the design since day one. These are the main mechanisms:

  • Zero Trust on the internal panel. The superpanel only opens after authenticating with Cloudflare Access and a verification code.
  • Passwordless access. Sign-in uses a one-time PIN sent by email. An atomic counter limits attempts and destroys the PIN after the fifth failure, so brute force does not work even when firing requests in parallel.
  • Secrets Store. No key is written in code or environment variables: they are stored in Cloudflare's secrets store and Workers fetch them at the moment of use.
  • Encrypted backups. They are encrypted with the age standard before leaving the platform, and their manifests are signed to detect tampering. Restoration requires a specific permission, an additional PIN and typing the exact name of the backup.
  • Role-based permissions and fail-safe. If the system is unsure about a permission, it denies it. API tokens have limited scope and irreversible operations can only be performed from the panel.
  • Strict headers and policies. CORS with an exact allowlist of origins, HSTS, content security policy and sanitisation of document HTML.
  • Abuse protection. Turnstile holds back bots and document emails are obfuscated against trackers.
  • Real deletion. When an account is deleted, sessions, files and records are purged; only the tax archive of invoices remains in Stripe.

An open road

LegalCloud proves that a serious product does not need a server room: it needs a clear architecture, infrastructure that scales by itself and a team, human and artificial, that knows how to steer itself.

If you manage several websites and want to stop updating legal texts one by one, LegalCloud centralizes them for you: one single place, fast and secure.

Note on the figures: costs are estimates based on Cloudflare's public prices at the time of writing and on an assumed average usage profile; they do not represent real billing and may vary.

From IBS_technology we designed and built LegalCloud from top to bottom on Cloudflare's infrastructure: the same one we use every day for our clients and the one that lets us deliver high security and low costs.

David Espí CEO - Business Development