Your data
Trade Buty does not collect personal data. All learning progress (read status, quiz results, replay history) lives only in your browser's localStorage, and it stays there until you log in and sync it. Before you log in, exactly two kinds of requests reach our servers: the anonymous crash diagnostic described below (/api/error-reports) and the AI tutor you start on purpose (/api/ai/*, see the paragraph after it). Reading the lessons themselves sends us nothing.
Share, invite and AI entry interactions may print a small allowlisted debug event to your browser's developer console. These events stay on your device, are not sent to us, and do not include raw invite codes, email addresses, chapter titles, full URLs or free text.
If a page crashes or an action fails, your browser may send a minimal diagnostic signal to our own same-origin endpoint (/api/error-reports). It carries only a coarse level (fatal / recoverable), a fixed scope name (for example route-error), an error type name, and — for server-rendered crashes — Next.js's opaque digest hash. It never contains the error message, stack trace, page URL, account identity, or any free text you typed. These signals are written to short-lived server logs for debugging only: not stored in our database, not linked to your account, and not used for tracking or advertising.
The AI tutor works without an account, which makes it the only thing that sends what you type off your device before you log in: your question and the chapter you are reading are passed through our own server to the AI provider named under Third-Party Services. Conversations started while you are logged out are never written to our database; conversations started once you are logged in are written to our database: each finished turn saves your question and the full answer text under your account identifier, so the AI page can restore your recent history on another device. Two clicks are stored in the database, though - rating one of the answer helpful or unhelpful saves that rating together with your question and the full answer text, and opening a citation in an answer saves the chapter or lesson it points to together with your question. While you are logged out these two kinds of rows carry no account, no email address and no device identifier; once you are logged in they are saved with your account identifier attached, so a reviewer can tell whose rating it was. Neither kind ever carries an email address or a device identifier, and they exist only so a human can review answer quality - what happens to them when you delete your account is spelled out under Data retention & cleanup.
When you log in via email magic link, your email address is stored by Supabase Auth (our authentication provider, hosted in the US). Your learning progress is synced to Supabase only to enable cross-device access.
We set one cookie ourselves (tb-lang) to remember your language preference. No tracking cookies, no analytics cookies, no third-party cookies. Once you are logged in, Supabase Auth stores one extra session cookie whose only job is to recognise you.
Supabase (authentication + database) and Binance public API (market data). The AI features are not tied to one vendor: your question is forwarded from our own server to an OpenAI-compatible upstream, falling back in order across Zhipu GLM → DeepSeek → SenseNova (a preferred model can be configured), while RAG embedding lookups go to the same endpoint or a separately configured embedding service. What those upstreams receive is your question text and excerpts of the lessons being retrieved - never your email address or account identifier. When each service gets contacted splits into two cases, and merging them into one sentence would be false: market data is automatic - it happens without you doing anything. The live quote strip on the home page starts polling api.binance.com as soon as that page opens, and opening a chart additionally opens a streaming connection to stream.binance.com - you do not have to click anything for those two to happen (they pause or slow down on their own when your connection is offline or slow). Those requests are made by the page itself and contain no user identity: Binance sees your IP address and which symbols you asked for. Everything else is contacted only when you use the corresponding feature: Supabase only after you log in, and the AI providers only once you actually ask something.
Download a JSON copy of your local learning progress, quiz results, replay history, and sync status. The file walks your browser's local storage (localStorage) and does not read cookies at all — your sign-in session (access and refresh tokens) lives in cookies, so it was never in scope here; and if some browser ever did keep a copy of it in local storage, keys in the sb- family are skipped on export. The file therefore does carry the local marker naming which account this data belongs to.
Local data lives only in your browser's storage: learning records, the mistake log and settings sit in localStorage, while a few interface flags such as "should this tip still show" sit in sessionStorage and disappear when the tab closes (they are not part of your account data). Nothing is cleared from your side until you clear site data. Before you log in our servers keep no personal profile: crash diagnostics go to short-lived logs and never reach the database, and while you are logged out the two kinds of AI feedback rows named above hold no account, email address or device identifier. Built-in trims keep the local footprint small: the study-time ledger keeps the 90 calendar days ending at the day you last studied, and market replay history keeps the latest 100 rounds.
Cloud data (only after you log in) is kept while your account exists so learning progress survives across devices. Writes made while offline are queued and retried, but two things can stop a write from ever reaching the cloud, and they belong in this document: the queue holds at most 200 entries, and a 201st evicts the oldest one, which is then sent to the cloud only if you re-do that change (it stays in your browser's local data meanwhile); and switching to another account on the same device discards the previous account's still-unsent queue outright. To delete everything, sign in and use the account menu → Delete account: it removes every cloud row owned by your account - progress, mistake log, quiz scores, replay history and best streak, settings, AI conversations, and the ratings you gave AI answers - and clears local data on that device. One exception: citation clicks are detached from your account at that moment and kept as anonymous rows, holding only the chapter or lesson you opened and the question asked, which can no longer be tied back to you.
For privacy concerns, open an issue at github.com/Sun1090/trade-buty.