Analyzes the data from STFC combat logs to help you see how your crews and ships are performing.
It's currently deployed on Render. You can see it at armada-analyzer.onrender.com. Note that it may take a minute to load initially, because I'm using Render's free tier so the instance gets spun down from inactivity.
There are two components, a backend API service built in NodeJS/TypeScript, and a frontend UI built in React/TypeScript. They use the same toolchain so first install the dependencies listed below, and then see the corresponding component's instructions on how to develop each one.
- A Node.js runtime of the version specified in
.nvmrc
- It's not technically required, but I strongly recommend using fnm.
- pnpm
This project makes use of Node.js's corepack functionality to simplify managing the pnpm installation. You can take advantage of this by enabling corepack:
corepack enable
From that point forward, any calls to pnpm should work transparently without any extra setup.
Git pre-commit hooks are enabled using Husky and lint-staged. They
should automatically be installed for you when you install your dependencies
using pnpm install
The hook will run ESLint and Prettier on the files you
modified in your current changeset, and it will abort your commit if any lint
rules fail. Fix them before committing!
If you want to commit without fixing errors, you can bypass the hook by using
git commit -n
. Be warned however that these same checks are run against pull
requests, so you will have to fix them before merging any changes.
If you use VS Code, you can open the armada-analyzer.code-workspace
file to
configure your workspace to work with both subprojects. If you have extensions
installed for ESLint and Prettier, they should automatically use the config
files in this repo. The workspace file will also create a run/debug
configuration for you to run the UI or service in the NodeJS debugger using
tsx for TypeScript transpilation.
Change directories into the service subproject's root directory, then install all dependencies.
cd packages/service && pnpm install
Build and run the service.
pnpm dev
Note that currently there is no hot-reloading in the service code, but dev
will both build and run the program.
Change directories into the UI subproject's root directory, then install all dependencies.
cd packages/ui && pnpm install
There are two ways to build and run the UI. One assumes you have an API running that the UI can call.
pnpm dev
You can also use API mocks provided by MSW instead.
pnpm dev:noapi
This project is configured to use ESLint for code linting. You can run it either at the project root to lint everything, or in a subproject to lint that subproject only.
pnpm lint
Testing in the API service uses the built-in Node.js Test Runner. Testing in the UI uses Vitest and React Testing Library.
To run the tests, simply run:
pnpm test
The code (and much of the configuration) is formatted using Prettier with mostly-default settings.
If you want to manually run the formatter, use:
pnpm format
The precommit hook should automatically run it on any files you modified in your changeset, however.
Both the service and the UI are deployed to Render. The deployment
configuration is defined in render.yaml
.
Documentation on how to use this file can be found here: