Privacy policy
Last updated
Draft: this page hasn't been reviewed yet and may change before launch. Notes marked "Needs review" are open questions for the reviewer.
codebases is a site for practicing reading code. This policy explains what information we collect, why we collect it, who else handles it, how long we keep it, and what you can do about it. It covers the codebases website and its sign-in. "We" and "us" mean whoever runs codebases, reachable at the address under Contact.
The short version
- You can read every puzzle and explore its code without an account, and we set no cookies until you start signing in.
- We have no analytics, advertising, tracking pixels or third-party scripts, and we don't sell or rent your data.
- With an account, we keep your GitHub identity, your puzzle activity (including the hints you reveal, your points, challenges and achievements), a contact email you confirm, and any profile details you choose to add. All of it is visible only to you.
- The leaderboard is off unless you join it. If you do, anyone can see the public name you choose, your rank, points and puzzles solved, and nothing else. You can leave at any time.
- You can delete your account, and nearly everything with it, from Settings at any time.
1. Using the site without an account
Every web request carries your IP address and your browser's user agent. Our host (Vercel) and, for the code shown in the editor, Cloudflare receive them, as any web server would. We use your IP address for one thing ourselves: counting how often one address searches the code, loads the leaderboard or challenges, or makes sign-in or submission requests, so automated traffic can't overload the site. Each counter holds the address, what was counted and a request count for a window of at most one hour, and is deleted after that (section 12).
Submitting an answer and revealing hints require signing in, so browsing without an account leaves no other record with us.
Learn lessons work without an account too. Checking a lesson answer, asking for a lesson hint or showing an answer sends that request to us so we can grade it, but signed out we don't record any of it. Your lesson progress stays in your browser (section 14).
2. Signing in with GitHub
GitHub is the only way to sign in. When you sign in for the first time, GitHub asks you to let codebases read your public profile and your email addresses (the read:user and user:email permissions). It doesn't give us access to your repositories, and we can't act on GitHub for you.
Our sign-in software reads your email addresses from GitHub during each sign-in, as part of the standard GitHub sign-in flow. We don't store them. Your sign-in record holds a placeholder made from your GitHub account ID instead, and the only email address we keep is one you give us yourself (section 7).
From GitHub we store:
- your GitHub username and numeric account ID, which identify your account. Neither is ever shown to other people, including on the leaderboard;
- your GitHub display name and the address of your GitHub avatar, which our sign-in software records and refreshes at each sign-in. We never show either of them; the name and picture on codebases are the ones you set in Settings;
- the access token GitHub issues and the permissions it carries. The token is encrypted before it's stored, is never sent to your browser, and isn't used after sign-in.
3. Your puzzle activity
When you submit an answer while signed in, we store:
- which puzzle it was for and the answer you selected;
- whether it was correct, and when you submitted it;
- how long the puzzle had been open in your browser when you submitted, measured by the page.
From these we show your progress, your activity calendar and streaks, and your history. Grading is automatic: your selection is compared with the puzzle's answer key. Your submissions also decide your points, achievements and challenge completions (section 4), by fixed rules that are the same for everyone. These results only change what the site shows. We don't use your activity to profile you or to make any other decision about you.
4. Hints, points, challenges and achievements
While you're signed in, we also record:
- Hints you reveal. Hints open one level at a time, and we record each level you reveal on each puzzle, and when, before showing it. We use this to score your solve (each hint revealed before you solve a puzzle takes 20 points off it; hints revealed afterward cost nothing) and to award the Independent Thinker achievement, for solving a puzzle without revealing any of its hints.
- Points. The first time you solve a puzzle, we record its points and how they were worked out: the points for its difficulty, a bonus if your first submission was correct, and any hint deduction. Completing a challenge adds a bonus. Each entry records when it was earned.
- Challenges. Every day, week and month, one puzzle is the challenge, the same one for everyone. When you solve it while that challenge is open, we record that you completed it, and when. Your challenge streak is worked out from these records whenever it's shown, not stored separately.
- Achievements. Which achievements you've earned, when the activity that earned each one happened, and when we recorded it. They're worked out from your submissions, hints and challenges.
Puzzles you solved before we started recording hints were given points from your submission history, with no hint deduction. None of this is shown to anyone but you unless you join the leaderboard, and even then only your totals are (section 6).
5. Learn lesson progress
When you're signed in and answer one of a lesson's required checks correctly, we record which lesson, which version of it, which of its required checks you've answered correctly, and when you finished it. That's all. We don't record wrong answers, the hints you ask for, the answers you choose to show, or what you write in the capstone's explanation box, which never leaves your browser. Learn progress isn't shown to anyone else, and it doesn't affect points, challenges or the leaderboard.
Progress you made while signed out stays in that browser and isn't copied into your account when you sign in.
6. The leaderboard
The leaderboard is opt-in and off by default: nobody appears on it until they choose to. To join, open Settings, go to Leaderboard visibility, and choose a public name (2 to 30 letters, numbers, spaces and . _ - '). It's separate from your display name and your GitHub username, so it reveals neither unless you type it in. Each public name can be used by only one account, ignoring capitals.
Anyone can see the leaderboard, signed in or not. For each person who joined and has points in the period shown (all time, today, this week or this month), it shows:
- their public name and rank;
- their points and how many puzzles they first solved in that period;
- when they reached that total, which breaks ties. This shows when they last earned points in that period.
Your totals include points you earned before you joined. The leaderboard never shows your GitHub username, display name, email address, picture, account ID, submissions, answers, hints, achievements or profile. To run it, we store your public name and when you joined.
You can rename yourself or leave at any time in Settings, under Leaderboard visibility. Leaving deletes your entry and public name immediately, and you disappear from every period's leaderboard at once. Your points stay on your account, visible only to you, so if you join again later your totals come back. While signed in, you see your own points and standing even when you haven't joined; no one else does. People who viewed the leaderboard while you were on it may still remember or have copied what it showed. We may remove a public name that breaks the terms.
7. Your contact email
To finish setting up an account, we ask for an email address. You can keep using the site before you add one. We confirm the address by emailing a link that works once, only for the account that asked for it, and only for 30 minutes.
We use your confirmed address only to reach you about your account:
- confirmation links when you add or change it;
- a notice to your old address when you change it, which shows the new address partly hidden (j***@example.com);
- a notice, instead of a link, if someone tries to add an address that already belongs to another account. It doesn't say which account.
We don't send newsletters, marketing, or reminders about streaks or challenges, we don't show your address to anyone, and you still sign in only with GitHub. Changing a confirmed address requires a sign-in within the last 15 minutes.
For each link we send, we keep the address it was for and a fingerprint (SHA-256 hash) of the link, never the link itself, so a stolen copy of our database can't be used to confirm an address. Section 12 says how long these records stay.
8. Details you choose to add
Everything in this section is optional, can be changed or removed in Settings at any time, and is shown only to you:
- a display name (up to 60 characters), pronouns (up to 40) and a short bio (up to 280);
- a birthday, stored as a calendar date only. We never show an age or use it for anything else;
- links to your other profiles and sites, which we check for format but never visit;
- a profile picture. We decode your upload, crop it to a 256 by 256 pixel square and re-encode it, which strips any location, camera or other data embedded in the file. Only the re-encoded picture (at most 128 KB) is stored, in our database, and the original file is discarded. It's served only to you;
- your theme, and the themes you mark as favorites.
None of these appear on the leaderboard. Please don't put information in these fields that you wouldn't want stored, such as health information or anything about other people.
9. Sign-in sessions and security records
- Sessions. Each time you sign in, we create a session record with the time, the IP address and the browser user agent it started from. These let us check a session is genuine and end it. The time also tells us whether you signed in recently, which changing your email and deleting your account require.
- Sign-in checks. While you sign in, we keep a random value that ties GitHub's reply to the sign-in you started. It holds no personal information and stops working after 10 minutes.
- Rate limits. While signed in, your submissions, hint reveals, searches, leaderboard and challenge requests, leaderboard changes, picture uploads, email requests and account deletion attempts are counted by account instead of by IP address; sign-in requests are always counted by IP address. Counters work as described in section 1.
- Error logs. When something fails, our server writes an error message to our host's logs. We write these messages to leave out email addresses, confirmation links and answers. A sign-in error can include a GitHub username, for example when a renamed GitHub account's old username now belongs to someone else.
10. What we don't do
- We don't use analytics, advertising, social media widgets, tracking pixels or browser fingerprinting.
- Every script, style and font on the site comes from codebases itself. The only other site your browser contacts is our code storage on Cloudflare, for the source files shown in the editor.
- We don't sell, rent or trade your data, or share it for advertising.
- We don't use your data to train AI models.
- We don't read your GitHub repositories, follow your links, or contact you except as in section 7.
- There are no public profiles or comments. Your profile, activity, hints, points and achievements are never shown to other people. The leaderboard is the one public feature, and you appear on it only if you join (section 6).
11. Why we use your data
If you're in the European Economic Area, the UK or Switzerland, these are the legal bases we rely on:
- To provide the service you signed up for (performing our agreement with you, the terms): your GitHub identity, sessions, puzzle activity, hint reveals, points, challenge completions, achievements and confirmed email.
- To keep the site secure and available (our legitimate interest, which doesn't override your rights because the records are minimal and short-lived): rate-limit counters, session IP addresses and user agents, sign-in checks and error logs.
- Because you chose to (your consent, which you can withdraw at any time): the details in section 8, which you withdraw by removing them, and your leaderboard entry, which you withdraw by leaving.
- To meet legal obligations, such as answering a valid legal request, if one ever applies.
12. How long we keep it
| Data | Kept until |
|---|---|
| Account, GitHub identity and encrypted token | You delete your account. |
| Learn progress | You delete your account. |
| Submissions, progress and history | You delete your account. |
| Hint reveals, points, challenge completions and achievements | You delete your account. Leaving the leaderboard doesn't remove them. |
| Leaderboard entry and public name | You leave the leaderboard or delete your account. Either removes them immediately. |
| Confirmed contact email | You replace it with a newly confirmed one, or delete your account. |
| Pending address and link fingerprint | The link stops working after 30 minutes or once used. A pending record is removed when you confirm an address or request another link. The record of a link that was used stays until you delete your account. |
| Profile details, links, picture, theme choices | You remove them in Settings, or delete your account. |
| Session records | Removed when you sign out of that session. A session you don't sign out of stops working 7 days after it was last refreshed (it's refreshed at most once a day while you use the site), and its record can stay until you delete your account. |
| Sign-in checks | Stop working after 10 minutes. Removed when used, and expired ones are removed at the next sign-in. |
| Rate-limit counters | Each counts for at most an hour. Cleanup that runs as the site is used deletes counters more than an hour old, so one can stay a little longer when the site is quiet. Your account's counters go at once when you delete it. |
| Host request and error logs, provider backups, emails already sent | Each provider's own retention schedule (section 13). |
| Messages you send to our contact address | Kept in that mailbox until we delete them. |
13. Who else handles your data
These service providers process data for us to run the site. Each may use it only to provide its service to us, under its own privacy terms:
| Provider | What it does | What it handles |
|---|---|---|
| Vercel | Hosts the website and its server | Every request, including IP address and user agent; short-lived request and error logs |
| Supabase | Hosts our database | All the account data described above |
| Cloudflare | Stores and serves the source files shown in the editor | IP address, user agent and which file was requested |
| GitHub | Handles sign-in | That you signed in to codebases, under GitHub's own privacy statement |
| Google (Gmail) | Sends our emails | The recipient address and the message, including any confirmation link |
We may also disclose data if the law requires it, or to protect the site or its users from fraud, abuse or attack. If codebases is ever transferred to someone else, this policy would continue to apply to the data transferred, and we would say so on this page first.
These providers are based in the United States and may process data there or in other countries. Where data protection law requires it, we rely on the providers' standard contractual clauses or equivalent safeguards for these transfers.
14. Cookies and browser storage
We use only what the site needs to work, so there's no cookie banner. None of these are used for tracking or advertising.
| Name | Purpose | Lasts |
|---|---|---|
better-auth.state (cookie) | Ties GitHub's reply to the sign-in you started | 5 minutes, set only when you start signing in |
better-auth.session_token (cookie) | Keeps you signed in | Until you sign out, or 7 days after its last refresh |
cb-theme (local storage) | Remembers the colors of your current theme so pages show it before they finish loading | Until you clear your browser's site data |
cb-theme-guest, cb-theme-favorites (local storage) | Your theme choice and favorites while signed out. They stay in your browser and aren't sent to us | Until you clear your browser's site data |
cb-learn-progress (local storage) | Your Learn progress while signed out: which lessons and checks you've completed in this browser. It stays in your browser and isn't sent to us | Until you clear your browser's site data |
cb-signed-in (local storage) | Remembers that someone has signed in on this browser, so the home page offers To puzzles instead of sign-in. It holds only the value 1, isn't sent to us, and is cleared when you sign out or delete your account | Until you clear your browser's site data |
cp-dev-login (local storage) | A random name, such as dev-3f2a, for the sign-in developers use when they run the site on their own computer. This site may store it, but never uses it or sends it to us | Until you clear your browser's site data |
cp_dev_login (cookie) | That same developer sign-in. Only a copy of the site running on a developer's own computer sets it | 30 days |
Over HTTPS, the sign-in cookie names start with __Secure-. Both are first-party, unreadable by page scripts, and sent only to codebases. Signing out deletes the session cookie and its session record, and deleting your account clears it too. Because we don't track you, there's nothing for a browser's Do Not Track or Global Privacy Control signal to turn off.
15. How we protect it
- All traffic uses HTTPS, and browsers are told to use only HTTPS for the site.
- Only our server can read the database. Browsers can't query it directly, and access rules in the database deny client access to every table holding account data, including hints, points and the leaderboard.
- GitHub access tokens are encrypted before storage, and email links are stored only as hashes.
- Uploaded pictures are decoded and re-encoded before storage, and never served from the original file.
- Requests that change your account, reveal hints or change your leaderboard entry must come from the codebases site itself, which blocks cross-site forgery. The requests listed in section 9 are rate limited.
No system is perfectly secure. If a breach affects your personal data, we'll tell you at your confirmed contact email, and the authorities where the law requires it, without undue delay.
16. Your choices and rights
These controls are yours to use at any time:
- Leaderboard visibility. Join, change your public name or leave in Settings, under Leaderboard visibility. You're not on it unless you join.
- See your data. Your profile and Settings show your activity and everything you've added. For a full copy, including session records, hint reveals and points, write to us.
- Correct or remove it. Change or clear any optional detail and your picture, and change your email, in Settings.
- Clear your browser's copy. Clearing this site's data in your browser removes everything in section 14. Signing out ends your session in that browser.
- Delete your account, as section 17 describes.
- Revoke GitHub access. In GitHub, under Settings, Applications, Authorized OAuth Apps, you can revoke codebases' access at any time. You'll be asked again the next time you sign in.
- Other rights. Depending on where you live, including the EEA, the UK and California, you may have the right to access, correct, delete or receive a portable copy of your data, to object to or restrict how we use it, and to withdraw consent. We don't sell or share personal information as California law defines those terms. We won't treat you differently for using any of these rights.
To make a request, write to the address under Contact. We may ask you to confirm the request from your confirmed contact email or while signed in, so we know it's you. We'll answer within 30 days. If you're not satisfied, you can also complain to your local data protection authority.
17. Deleting your account
In Settings, under Danger zone, choose Delete account and type DELETE (in capitals) to confirm. For your security, deleting needs a GitHub sign-in within the last 15 minutes; if yours is older, you'll be asked to sign in with GitHub again first. Deleting immediately and permanently removes:
- Your codebases account and every active session on any device
- Your link to your GitHub account, and the GitHub access token stored for it
- Every submission, your progress on every puzzle, and the solutions you unlocked
- Revealed hints, points, challenge completions, streaks and achievements
- Your Learn progress
- Your leaderboard entry and public name
- Your profile details, links, picture, theme preference and contact email
It also removes the records of the email links we sent you and your account's rate-limit counters, and signs you out. It all happens in one step, and it can't be undone. You disappear from the leaderboard at once.
Deleting your codebases account doesn't delete your GitHub account, and it doesn't remove codebases from the apps you've authorized on GitHub. To do that, revoke access in GitHub as section 16 describes. Copies in our providers' logs and backups aren't reachable by us and expire on their own schedules (section 12). Emails we already sent stay in your inbox.
18. Children
codebases isn't meant for children under 13, and GitHub's terms don't allow them to have an account. If you believe a child under 13 has signed in, write to us and we'll delete the account.
19. Changes to this policy
When what we collect or how we use it changes, we update this page and the date at the top before the change takes effect. If a change means we'd use data you've already given us in a materially different way, we'll also tell you by email or on the site, and ask for your consent where the law requires it.
20. Contact
For questions about your data or this policy, or to make a request, write to mailcodebases@gmail.com.