Reading the repo
Opening the box…
Reading the repo
Opening the box…
Assembly instructions
🏖 Open any GitHub repo in CodeSandbox by changing the hostname
Fresh setup, read just now
Will it work on macOS?
docs/development.mdThe site is a static Vercel deployment which redirects
visitors to CodeSandbox. There is no application code: the redirects are
declared in vercel.json and handled by Vercel's CDN, so they run in every
region without invoking a function.
See redirect.md for the redirect setup.
vercel.json holds the redirect rulespublic/robots.txt is served as a static file. Vercel serves this project's
static files out of public/, so a robots.txt at the repo root is not
reachable — it has to live hereTo edit the redirect logic, open vercel.json. The rules are matched in order,
first match wins:
| Source | Goes to |
| ------------------------------- | ------------------------------------------ |
| / and /index.html | this repo on GitHub |
| /:owner/:repo/blob/:ref/:file+ | the sandbox for :ref, with :file opened |
| /:owner/:repo/tree/:rest+ | the sandbox for that branch, tag or commit |
| /:owner/:repo | the sandbox for the repo's default branch |
Anything else falls through to a 404, which is what we want for paths like
/issues or /vercel/ms/stargazers.
The + modifier requires at least one segment, so /vercel/ms/tree alone is a
404 rather than a redirect to an empty ref.
vercel dev
Then check http://localhost:3000/vercel/ms
There is nothing to unit test, so verify against a deployment instead. Point
BASE at a preview URL and check the location headers:
BASE=https://githubbox.com
for path in \
/ \
/vercel/ms \
/vercel/ms/ \
/vercel/ms/tree/main \
/vercel/ms/tree/2.1.1 \
/vercel/ms/blob/main/package.json \
/vercel/ms/blob/main/lib/index.js \
/robots.txt \
/issues \
/vercel/ms/stargazers
do
echo "$path -> $(curl -sI "$BASE$path" | head -n1 | tr -d '\r')"
done
The last two should be 404s. /robots.txt should be a 200.
vercel
Then check the preview URL that gets printed.
vercel --prod
Then check https://githubbox.com
All these forms of URLs are supported.
Needs Git: xcode-select --install
git clone https://github.com/dferber90/githubbox.git cd githubbox
We couldn't spot a known stack. The AI guide below can read the code for you.
No reports for macOS yet.
GitManual AI Agent reads the 2 key files and writes a step-by-step guide for macOS. Once written, it's saved for everyone.