Skip to content
RetroAchievementsPublic

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

AutoCR

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.

Requirements

Install

The first step is to install the dependencies:

bun install

Run locally

Dev run

To get a dev run with hot reload:

bun run dev

Build run

Build the project:

bun run build

Serve the built artifacts:

bun run start

Open http://localhost:8080.

Run the middleware locally

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-password

Bun reads .env and .env.local automatically.

Then start the middleware:

cd middleware
bun install
bun start

The 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

Local Checks

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 enabled

bun run test isolates each test file, so module state such as current in js/state.js cannot leak from one file into the next.

Title case benchmark

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 disagreement

Note: There are certain edge cases where the reference output is questionable and not following the rules posted on titlecaseconverter.com.

Deployment

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.

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages