AutoCR is a static web app for analyzing and reviewing data associated with RetroAchievements achievement sets, such as trigger logic for achievements, leaderboards, and rich presence.
The first step is to install the dependencies:
bun installTo get a dev run with hot reload:
bun run devBuild the project:
bun run buildServe the built artifacts:
bun run startOpen http://localhost:8080.
The middleware is a proxy server that logs in to RetroAchievements and gets achievement set data and code notes. To run it locally follow these steps.
First, copy middleware/.env.example to middleware/.env.local. Then, write your RetroAchievements credentials:
RA_USERNAME=your-ra-username
RA_PASSWORD=your-ra-passwordBun reads .env and .env.local automatically.
Then start the middleware:
cd middleware
bun install
bun startThe middleware runs at http://localhost:3000. To use it, add the middleware query parameter to the app URL:
http://localhost:8080?middleware=http://localhost:3000
oxfmt handles formatting and oxlint handles linting. bun test powers AutoCR's test suite. Test files live beside the code they cover. The fixtures those tests load live in test/fixtures/.
bun run format # autoformat all files
bun run lint:fix # apply linting autofixes
bun run test # run every test file with isolation enabledbun run test isolates each test file, so module state such as current in js/state.js cannot leak from one file into the next.
In test/fixtures/titlecase-reference.json, there are 10,000 randomly sampled (real) achievement titles with the
reference casing from titlecaseconverter.com (Chicago, keep all caps).
The benchmark can be used to verify changes in the word lists or rules in js/titlecase.js:
bun run benchmark:titlecase # accuracy, false positives, misses
bun run benchmark:titlecase --verbose # also lists every disagreementNote: There are certain edge cases where the reference output is questionable and not following the rules posted on titlecaseconverter.com.
Commits to main automatically deploy the repo root to GitHub Pages.
The middleware currently deploys to Vercel. Changes to server.js do not currently trigger a redeploy.