'use client'; import { Button } from '@/components/ui/button'; import { apiFetch, apiUrl } from '@/lib/api'; import Link from 'next/link'; import { useState } from 'react'; export default function AccountPage() { const [downloading, setDownloading] = useState(false); const [confirmText, setConfirmText] = useState(''); const [deleting, setDeleting] = useState(false); const [delError, setDelError] = useState(null); async function deleteAccount() { if (!confirmText.trim()) return; if (!confirm('Permanently delete your account and all its data? This cannot be undone.')) return; setDeleting(true); setDelError(null); try { await apiFetch('/v1/account', { method: 'DELETE', body: JSON.stringify({ confirm: confirmText.trim() }), }); window.location.href = '/'; } catch (e) { const detail = (e as { detail?: { detail?: string; error?: string } }).detail; setDelError(detail?.detail ?? detail?.error ?? (e as Error).message); setDeleting(false); } } async function downloadExport() { setDownloading(true); try { // Trigger a same-origin attachment download. The cookie ships with the // request because we're same-credentials with the API origin via CORS. window.location.href = apiUrl('/v1/account/export'); } finally { setTimeout(() => setDownloading(false), 1500); } } return (

Account

Your data, your rights. Swiss DSG Art. 25 / GDPR Art. 15 + 20.

Download your data

One JSON file with everything we hold for your account: profile, organization, MCP servers, build history (last 1000 entries), audit log (last 1000 events) and your support-ticket history. Excludes password hashes, encrypted secrets and other users' data.

Delete account

Permanently erases your account and every organization where you are the only member — servers, encrypted secrets, builds and history are wiped and running containers are stopped. This cannot be undone. Swiss DSG Art. 32 / GDPR Art. 17.

Type your account email (or phone) to confirm:

setConfirmText(e.target.value)} placeholder="you@example.com" className="h-9 w-64 rounded-md border border-[--color-border] bg-[--color-bg-subtle] px-3 text-[13px] outline-none transition-colors focus:border-[--color-border-strong]" />
{delError &&

{delError}

}

Cookies on this site

We use only strictly-necessary cookies: a session cookie ( bmm_session, httpOnly, 30 days) and a short-lived OAuth-CSRF state cookie (bmm_oauth_state, 10 minutes during a third-party login flow). No analytics, no tracking, no third-party cookies on this domain.

← Privacy policy
); }