Estimates wheel power and torque from an engine data log, in the browser. Drop in one or more logs of a full-throttle pull in one gear, choose the vehicle and gear, and compare the runs on one chart. Logs are never uploaded; logs, vehicles and settings stay in the browser's storage.
How the calculation works and why it is built this way: docs/DECISIONS.md. Visual system: DESIGN.md.
npm install
npm run dev # local server
npm test # maths and log-parser tests
npm run check # type check
npm run test:e2e # one browser smoke test (first run: npx playwright install chromium)
npm run build # static site in dist/Infrastructure is Terraform in infra/: a private S3 bucket, CloudFront with AWS's managed security headers and a rate-limiting firewall, and a GitHub Actions deploy role (OIDC, no stored keys). You run Terraform; GitHub Actions only uploads the build.
-
Create the GitHub repository and push
main. -
Find the repository's OIDC subject,
owner@ownerId/name@repoId. The repo id isgh api repos/OWNER/NAME --jq .idor theidfield athttps://api.github.com/repos/OWNER/NAME. -
In
infra/, copyterraform.tfvars.exampletoterraform.tfvars, setgithub_repo, then:terraform init terraform apply
The AWS account is assumed to already have the GitHub OIDC provider. In an account without one, set
create_github_oidc_provider = true. -
In GitHub, create an environment named
production(Settings → Environments) and restrict its deployment branches tomain. The deploy role trusts only that environment. -
Add these repository variables (Settings → Secrets and variables → Actions → Variables):
Variable Value AWS_REGIONus-east-1S3_BUCKETterraform output -raw s3_bucketCLOUDFRONT_DISTRIBUTION_IDterraform output -raw cloudfront_distribution_idAWS_DEPLOY_ROLE_ARNterraform output -raw deploy_role_arn -
Push to
main, or re-run the CI workflow. The site is atterraform output -raw site_url.
The deploy job is skipped until S3_BUCKET is set, so CI passes before any of this exists.
- Set
domain_nameinterraform.tfvars. terraform apply -target=aws_acm_certificate.site, then add the record fromterraform output certificate_validation_recordat your DNS host.terraform apply(it waits for the certificate), then add the record fromterraform output site_dns_record.
Terraform puts the distribution on CloudFront's free flat-rate plan (aws_pricingplanmanager_subscription in infra/main.tf). The plan has no overage charges: 1 million requests and 100 GB a month are included, and beyond that AWS may serve traffic from fewer locations instead of billing. In exchange it only allows AWS's managed security headers and requires the web ACL, both of which the Terraform sets up.
An account allows three free plans, and accounts on the AWS Free Tier are not eligible. To stay on pay-as-you-go, delete that resource; there is then no charge per distribution but no ceiling either. Details: CloudFront flat-rate pricing plans.
The deploy role names the repository. After a rename, update github_repo and run terraform apply, or deploys will be refused.
Terraform state is a local file in infra/. Keep it; without it the stack has to be imported by hand.