We welcome contributions form everyone. Please use our GitHub issue tracker for questions, ideas, bug reports, or feature requests.
If you want to make a pull request:
- discuss your idea first, before putting in a lot of effort
- refer to the developer documentation
- if needed, fork the repository to your own Github profile
- work on your own feature branch
- make sure the existing tests still work and add new tests (if necessary)
- update or expand the documentation;
- make sure your code follows the style guidelines
- don't be afraid to ask help with any of the above steps. We're happy to help!
By participating in this project, you agree to abide by the code of conduct.
If you want to contribute to the development of the webapp, you can follow the instructions below.
You can develop inside a devcontainer inside Visual Studio Code. The devcontainer includes all services required by the webapp.
When you exit VS code the containers will keep running, kill by running docker compose -f .devcontainer/docker-compose.yml -p haddock3-webapp_devcontainer down
in the terminal or in VS Code reopen folder outside container.
To develop the webapp ouside a devcontainer you have the following services running:
- PostgreSQL database for user management
- Bartender web service for job executation and input/output storage.
- Haddock3 restraints web service for calculating restraints on scenario pages.
The PostgreSQL database can be started in a container with
npm run docker:dev
(Stores data in a Docker volume)
(You can get a psql shell with npm run psql:dev
)
(On CTRL-C the database is stopped. To remove container and volume use npm run docker:devrm
)
The database must be initialized with
npm run setup
# This will create tables
Start remix development server from your terminal with:
npm run dev
This will refresh & rebuild assets on file changes. Visiting a complicated page for the first time, will need a manual page reload, as the server optimizes dependencies.
The database setup should be run only once for a fresh database.
Whenever you change the app/drizzle/schema.server.ts
file you need to run npm run generate:migration to generate a migration, edit generated app/drizzle/*.sql
file if needed and then run npm run setup
to apply migration to database.
To format according to prettier run
npm run format
It's recommended to install an editor plugin (like the VSCode Prettier plugin) to get auto-formatting on save.
To lint according eslint run
npm run lint
To check the Typescript types run
npm run typecheck
For testing see docs/testing.md.
First, build your app for production:
npm run build
Then run the app in production mode:
export $(cat .env |grep -v '#' |xargs)
npm start
If you made changes to the webapp and want to create a new release, follow these steps:
- Update the version in
package.json
- Goto the releases page
- Copy the first line in the description of the latest release to you clipboard.
- Click on the
Draft a new release
button - Paste the line from the clipboard into the
Tag version
field - Set tag and title to same version used in
package.json
with av
prefix. - Press
Generate release notes
button - Adjust description if needed
- Press
Publish release
button