// The public pages: home, how to pull, how to contribute, how votes work, for apps, research, careers, privacy. import { esc } from './html'; import { CHECKS_TEXT } from './checks'; export const DIAGRAM = `
How a branch grows on BranchwellCommits land on the main branch right away. Each one shows as new. Three votes up keep it for good. Three votes down take it back out. A side branch follows the same rule. mainyour-idea 3 upnew3 down kept for good new taken back out
`; export function home(stats: { repos: number; companies: number }) { return `
Open Git hosting

Every branch grows in the open.

Branchwell hosts Git repositories that anyone can pull. Anyone signed in can push straight to a branch. There are no pull requests and no reviews. People vote on each commit instead.

${DIAGRAM}

How it works

Four steps, and nothing waits on a reviewer.

  1. PullClone any repository with plain Git. No account needed.
  2. PushSign in with a passkey, make a push key, and push straight to a branch.
  3. ChecksEvery push is checked first: no secrets, no huge files, valid data. If it passes, it lands.
  4. VoteEach new commit is open to votes. 3 up keeps it for good. 3 down takes it back out.

Every company, in the open

${stats.companies ? stats.companies + ' companies' : 'Each company'} ha${stats.companies === 1 ? 's' : 've'} an account here, with projects inside. Every one starts with its research: the full plan, and every public source summarized in plain words with a link to the original. It is all public domain. Pull it, read it, add to it.

git clone https://branchwell.ai/sunlaid/research.git

See every company ยท All the research

No pull requests

Your commit goes in as soon as it passes the checks. The people who use a branch decide what stays.

Passkeys only

Sign in with your face, fingerprint or device PIN. No passwords to steal or forget.

History stays honest

Nothing is rewritten. A voted-down commit is taken back out with a new commit anyone can see.

New features, voted in

Apps built on our platform mark every new feature with a small New badge and thumbs up and down. 3 thumbs up and the feature stays for good. 3 thumbs down and it goes away.

Add it to an app

Open your own branch

Anyone can open a branch here without asking, under any name they like. Our code, designs and research are public domain and free to use.

See our sourceAll projects (${stats.repos})
`; } export const howToPull = `
How to pull

Get any repository in one line

Every repository on Branchwell is public. You don't need an account to read or pull.

1. Get Git

Mac: open Terminal and type git --version. If it isn't there, your Mac offers to install it. Windows: install Git from git-scm.com. Linux: use your package manager, for example sudo apt install git.

2. Clone

git clone https://branchwell.ai/sunlaid/research.git
cd research

Every project lives inside its owner, so the address is branchwell.ai/owner/project.git. Swap in any one you like. You'll find them all on the companies page and the projects page.

3. Stay up to date

git pull

Run it any time to get the newest commits, including any that votes have taken back out.

Want just one branch?

git clone --branch your-idea --single-branch https://branchwell.ai/sunlaid/research.git

No Git?

You can read every file right on the site. Open a repository, click through its folders, and use Raw on any file to download it.

Next: how to contribute

`; export const howToContribute = `
How to contribute

Push straight to a branch

No pull requests and no waiting for a reviewer. If your commit passes the checks, it lands right away. Then people vote on it.

1. Sign in with a passkey

Go to Sign in, pick a name, and make a passkey with your face, fingerprint or device PIN. There is no password and no email.

2. Make a push key

On your account page, make a push key for each computer. Git can't use passkeys, so this key is how Git proves the push is yours. We show it once. You can remove it any time.

3. Let Git remember it

# Mac
git config --global credential.helper osxkeychain
# Windows (Git for Windows)
git config --global credential.helper manager
# Linux
git config --global credential.helper store

The first time you push, Git asks for a username and password. Type your Branchwell name and paste the push key as the password.

4. Edit, commit, push

git clone https://branchwell.ai/stridewell/research.git
cd research
# edit a file, for example README.md
git add -A
git commit -m "Add a study on socket fit"
git push

Git prints a link to the commits page, where people can vote on your work.

Try something bigger on your own branch

git switch -c your-idea
git push -u origin your-idea

Anyone can open a branch, under any name. Branches follow the same voting rule as commits.

Start a new project

Make one on the new project page, under your own name or a company you belong to. Or just push to a new name and it is made for you:

git remote add origin https://branchwell.ai/your-name/my-project.git
git push -u origin main

What every push is checked for

If a check fails, Git shows you why and nothing changes. Fix it and push again.

Good research contributions

How votes work

`; export const rules = `
How votes work

The whole system fits on one page

There are no pull requests and no reviews. Anyone signed in can push commits straight to a branch. People vote on commits and branches. That's it.

Commits

If a later commit already changed the same file again, the removal leaves that newer work alone and says so in the removal commit.

Branches

Fair votes

Checks come first

`; export const features = `
For apps

Let people vote on new features

A new feature merges automatically once its checks pass. Then it shows a small New badge with thumbs up and thumbs down until people decide.

Add it to any app or site

1. Load the widget once on every page. Pick a short id for your app.

<script src="https://branchwell.ai/widget/features.v1.js" data-app="yourapp" defer></script>

2. Mark each new feature with its own id. The badge appears next to it.

<button data-bw-feature="dark-mode">Dark mode</button>
<section data-bw-feature="weekly-summary">
  <h2 data-bw-badge>Weekly summary</h2>  <!-- optional: where the badge goes -->
  ...
</section>

That's all. The first time the widget sees an id, the feature starts as new. When people vote it down, the widget hides that element. When they vote it up, the badge stops showing.

Voting

Tapping a thumb opens a small Branchwell window where people sign in with their passkey and vote. One vote per person per feature. The same fair-vote rules apply as for commits.

Reading the results yourself

GET https://branchwell.ai/api/features?app=yourapp

It returns each feature's status (new, kept or removed) and its votes. Native apps can call it at launch and switch features on or off the same way.

`; export function research() { const S: [string, string, string, string, string][] = [ ['Git HTTP transfer protocols', 'Git project documentation', '', 'https://git-scm.com/docs/http-protocol', 'How Git talks to a server over plain HTTPS: the "smart" protocol Branchwell speaks for clone, pull and push.'], ['Git on the Server: Smart HTTP', 'Pro Git, by Scott Chacon and Ben Straub', '2014', 'https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP', 'Why one HTTPS address can serve anonymous reads and signed-in writes at the same time.'], ['Git pack format', 'Git project documentation', '', 'https://git-scm.com/docs/gitformat-pack', 'The file format Git uses to send many objects at once, with deltas. Branchwell reads and writes it directly.'], ['Web Authentication: an API for accessing public key credentials, Level 2', 'W3C Recommendation', '2021', 'https://www.w3.org/TR/webauthn-2/', 'The web standard behind passkeys. The site keeps only a public key; the private key never leaves your device.'], ['Passkeys', 'FIDO Alliance', '', 'https://fidoalliance.org/passkeys/', 'An overview of passkeys: sign-in with a face, fingerprint or PIN that resists phishing and replaces passwords.'], ['The Sybil attack', 'John R. Douceur, Microsoft Research', '2002', 'https://www.microsoft.com/en-us/research/publication/the-sybil-attack/', 'Shows that any open voting system can be gamed by one person making many identities. It is why we limit new accounts and make new accounts wait a day before voting.'], ['Be bold', 'Wikipedia', '', 'https://en.wikipedia.org/wiki/Wikipedia:Be_bold', 'The long-running example of open editing without approval first: changes go live, and the community keeps or reverts them.'], ['CC0 1.0 Universal', 'Creative Commons', '', 'https://creativecommons.org/publicdomain/zero/1.0/', 'The public domain dedication we use for our summaries, plans and code, so anyone can copy them without asking.'], ['Durable Objects', 'Cloudflare documentation', '', 'https://developers.cloudflare.com/durable-objects/', 'The storage model we use: each repository lives in its own small database, so pushes and votes never race each other.'], ]; return `

How Branchwell works

Where we are: Live. Clone, pull and push work today over HTTPS, with passkey sign-in and voting.

Branchwell is a simple home for Git repositories. Anyone can pull. Anyone signed in can push straight to a branch. Instead of pull requests and reviewers, people vote on each commit: 3 votes down takes it back out, 3 votes up keeps it for good.

How it works

  1. Pull. Plain Git over HTTPS, no account.
  2. Push. A push key made after passkey sign-in.
  3. Check. Every pushed file is checked before it lands.
  4. Vote. Commits and branches are kept or removed by 3 votes.

How it keeps going

Branchwell runs on small serverless databases that cost little to run, and we cover that cost ourselves. There are no ads and no paid plans. The code is public domain, so anyone can run their own copy.

How we're organized

Everyone on the team grows through the same three levels: Explorer (starting out), Builder (growing) and Guide (on the way to mastery).

What we've decided

What comes next

Start your own

  1. Clone our source. git clone https://branchwell.ai/branchwell/source.git
  2. Deploy it. It runs as one Cloudflare Worker with a D1 database and Durable Objects.
  3. Pick your own rules. Change the vote threshold or the checks in a few lines.

The research

${S.map(([t, s, y, u, sum]) => `

${esc(t)}
${esc(s)}${y ? ', ' + y : ''}
${esc(sum)}

`).join('\n')}

Our summaries are public domain (CC0): copy and share them freely. Each original source belongs to its authors.

`; } export const careers = `
Careers

Work with us

Join our team. We're looking for software engineers, people who know Git and storage inside out, researchers who love a good source, writers and community guides. Tell us what you do and how we can reach you.

All our roles are part-time, up to 39 hours a week. Every team member earns a daily, automatic Bitcoin bonus based on performance, and get their health care through the holistic clinics we work with. Care outside those clinics is not covered.

`; export const privacy = `
Privacy

Privacy

We keep as little as we can, and we never sell or share it.

What we keep

What we don't do

Cookies

One sign-in cookie, only after you sign in, so the site knows it's you. Nothing else.

Hosting

Branchwell is hosted on Cloudflare.

Leaving

You can remove your push keys at any time on your account page. Commits you pushed stay part of the public history, like any Git history.

`;