The frontend app that powers app.codecrafters.io.
You will need the following things installed on your computer:
You can run tests locally without a backend server. To use the app, point it at staging or a local
instance of codecrafters-io/core. Visit the core repo to run the backend locally.
git clone <repository-url>this repositorycd frontendbun install- Copy
.env.exampleto.envand fill in the values
make serve- Visit your app at https://.ccdev.dev.
- Visit your app at http://localhost:4200.
- Visit your tests at http://localhost:4200/tests.
.env.example already points at staging, so make serve uses it after you copy that file to .env.
BACKEND_URLishttps://backend-staging.codecrafters.io- Open http://localhost:4200
- Click Log in. The app sends you to the staging backend, then GitHub, then back to localhost with a
session_token. - The app stores that token in
localStorage(session_token_v1) and loads your staging account. - A first-time GitHub account is sent to
/welcomebefore the page you were on.
To point at staging without editing .env:
- Run
BACKEND_URL="https://backend-staging.codecrafters.io" bun run start
- FastBoot is enabled when running
ember build --environment=production- Pre-rendering is done only for routes configured under
prembersection inember-cli-build.js
- Pre-rendering is done only for routes configured under
- FastBoot is enabled for all routes when running
ember server- To disable it, run
FASTBOOT_DISABLED=true ember server - Alternatively, append
?fastboot=falsequery parameter to each request URL
- To disable it, run
- Add
FASTBOOT_DISABLED=trueto your local.envfile to disable FastBoot completely- You can override it by passing
FASTBOOT_DISABLED=""in the command line
- You can override it by passing
- Script
startruns with FastBoot disabled - Script
start:fastbootruns with FastBoot enabled
- Run
make serve, ensure your server is running - View your tests at http://localhost:4200/tests/index/html?moduleId=abcd.
- Select the module(s) you want to run from the dropdown at the top right of the page & click "Apply" to run tests.
- To run all tests, remove the
?moduleId=abcdquery parameter from the URL.
bun run lintbun run lint:fix
- Run
bun run inspect:eslint
- Run
ANALYZE_BUNDLE=true ember server --environment=production
bunx ember build(development)bun run build(production)
- This app is automatically deployed to app.codecrafters.io when a commit is merged into main.
- Each branch is also deployed to a preview URL via Vercel.