Skip to content

CE: Add /terms and /privacy legal pages#311

Merged
ericflo merged 1 commit intomainfrom
ce/legal-pages
Apr 16, 2026
Merged

CE: Add /terms and /privacy legal pages#311
ericflo merged 1 commit intomainfrom
ce/legal-pages

Conversation

@ericflo
Copy link
Copy Markdown
Owner

@ericflo ericflo commented Apr 16, 2026

What

Adds public legal pages at /terms and /privacy, wires them into the session-exempt list and sitemap, and links to both from the signup form.

Why

Stripe-gated SaaS products are expected to link Terms of Service and a Privacy Policy from checkout/signup, and users creating accounts at /signup were previously giving us their email with no privacy commitment on the page. Both paths previously 404'd on modelrelay.io.

Changes

  • crates/modelrelay-cloud/src/routes/legal.rs (new): terms_page and privacy_page handlers rendered through modelrelay_web::templates::page_shell with per-page canonical/og:url for /terms and /privacy. Bodies cover the sections requested (acceptance, description of service, account responsibilities, acceptable use, payment/cancellation via Stripe, availability + rate limits, suspension/termination, disclaimers, limitation of liability, governing law CA/SF, changes, contact; for privacy: sign-up data, usage metadata, Stripe, cookies, API keys, use, sharing, retention, security, user rights, children, jurisdiction, changes, contact).
  • crates/modelrelay-cloud/src/routes/mod.rs: registers pub mod legal;, adds /terms + /privacy routes, adds both to SESSION_EXEMPT_ROUTES, and adds <url><loc> entries to sitemap_xml.
  • crates/modelrelay-cloud/src/routes/auth.rs: adds a small "By creating an account, you agree to our Terms of Service and Privacy Policy" line under the Create Account button in signup_form_html.
  • crates/modelrelay-cloud/tests/http_routes.rs: four new tests covering 200 + <h1> + canonical/og:url on both pages, sitemap inclusion, and signup-form link presence. Also extends the existing sitemap test to assert /terms and /privacy are present.

Validation

  • cargo fmt --all -- --check clean
  • cargo clippy -p modelrelay-cloud --all-targets --no-deps -- -D warnings clean
  • cargo test -p modelrelay-cloud — 30 passed, 0 failed (including the 4 new tests)

Post-deploy verification

After Deploy Cloud succeeds, expect:

  • curl -s -o /dev/null -w "%{http_code}" https://modelrelay.io/terms → 200
  • curl -s -o /dev/null -w "%{http_code}" https://modelrelay.io/privacy → 200
  • Sitemap includes /terms and /privacy
  • Signup form displays "By creating an account, you agree to..." with the two links

@ericflo ericflo merged commit 7040c41 into main Apr 16, 2026
12 checks passed
@ericflo ericflo deleted the ce/legal-pages branch April 16, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant