The Eterna citizen science platform for RNA design
docker compose up
Postgres DB (Database Admin: http://localhost:8080)
Localstack (S3, SQS)
Interested in development? Join the discussion on the Eterna Discord!
npm install
in the root of this repository
This repository is structured as a monorepo, using NPM Workspaces and Nx to manage its components. Here are some common actions you might want to take:
Run npx nx dev <package-name>
to run an application package, automatically reloading when changes occur.
Run npx nx start <package-name>
to run after building the package (with dependencies) without reloading.
Run npx nx build <package-name>
to build a package. This will also build any dependencies of the package.
Run npx nx build:watch <package-name>
to build a package and rebuild when files are changed.
This will also build any dependencies of the package.
Run npx nx lint <package-name>
to run linting for a package via ESLint.
Run npx nx lint <package-name> --fix
to run linting with automatic fixes
Run npx nx test <package-name>
to execute unit/component tests for a package via Vitest
or Cypress (depending on which is configured for the package).
Run npx nx test:watch <package-name>
to execute unit/component tests for a package in watch mode (Vitest only).
Run npx nx test:cov <package-name>
to execute unit/component tests and report code coverage for a
package in watch mode (Vitest only).
Run npx nx test:ui <package-name>
to execute unit/component tests for a package using the UI-based test runner (Cypress only).
Run npx nx affected:test
to execute unit/component tests for all packages affected by a code change.
Run npx nx e2e <package-name>
to execute end to end tests in a package, if configured.
Run npx nx affected:e2e
to execute all end to end tests in packages affected by a code change.
You can use the Eterna Nx plugin to automatically create and update files, including adding new packages.
To see the available generators, run npx nx list @eternagame/nx-plugin
. To run a given generator,
run npx nx generate <generator>
(eg, npx nx generate ts-iso
). Running npx nx generate <generator> --help
will show available options for that generator. In particular, if generating a new package, you may want to pass
the --directory
flag to put the package in a specific subdirectory of the packages directory if you don't
want it placed in the root.
When upgrading @eternagame/nx-plugin
, there may be changes to the repository that should be made when updating.
This process is automated, and can be done via npx nx migrate @eternagame/nx-plugin@latest
and then (if necessary)
npx nx migrate --run-migrations
after reviewing the changes to be made in the migrations.json.
When upgrading nx, you may also want to run migrations for it as well (eg, npx nx migrate nx@latest
),
though you most likely will not need to if you don't customize any Nx configuration files. Note that @eternagame/nx-plugin
has nx
as a peer dependency - if the latest version of nx
is beyond its requirement and you want to upgrade
to a more recent version that is allowed, you'll need to specify a version like npx nx migrate nx@version
.
For updating other dependencies, you may want to use npx npm-check-updates --deep --peer
If you're on a unix-like system and want to remove all nested node_modules folders,
you can run find . -type d -name node_modules -prune | xargs rm -r