🚧 This documentation is not complete yet as Lagon is in Alpha.
Contributing

Thanks for wanting to contribute! That means a lot to us. You can contribute in many ways, with or without any coding required.

If you encounter any issues, you can join our Discord (opens in a new tab) so we can help you.

Need some good first issues to start with? Check out the good first issue label (opens in a new tab) on GitHub!

Non-code contributions

Issues and community help

Work in progress...

Documentation website

The documentation website is made of Markdown (opens in a new tab) files, located in packages/docs/pages/. It uses Nextra (opens in a new tab) behind the scenes.

If you want to preview your changes, you can run the documentation website locally. First, follow the Requirements, and then run pnpm start:docs at the root of the project. You can now access the documentation website on localhost:3000.

Code contributions

Coding guidelines

  • Commits are following the conventional commits (opens in a new tab) convention.
  • We use ESLint and Prettier to format our code, which should be handled automatically by most editors. If this is not the case, you can run the lint script.
  • Make sure to add a test when adding new features / fixing bugs, so we can prevent any other future bugs.

Requirements

You will need Node.js (opens in a new tab) >= 16 and PNPM (opens in a new tab) >= 7 (as of writing). You will also need Docker (opens in a new tab) installed, and if you want to contribute to any Rust code, you will need Rust (opens in a new tab) >= 1.67 installed.

  1. Fork and clone the repository
  2. Install all NPM dependencies: pnpm install

If you want to contribute to the Dashboard / Serverless / CLI:

  1. Run the local docker-compose: docker-compose up -d

  2. Copy packages/dashboard/.env.example to packages/dashboard/.env, and crates/serverless/.env.example to crates/serverless/.env

  3. Fill in the following environment variables:

In packages/dashboard/.env and crates/serverless/.env:
  • (optional) AXIOM_ORG_ID, AXIOM_TOKEN to send and get logs to Axiom
In packages/dashboard/.env:

www

Navigate to www and run pnpm dev to start the website.

UI

Navigate to packages/ui and run pnpm dev to start the Storybook server.

Dashboard

Navigate to packages/dashboard and run pnpm prisma migrate dev to generate the database tables. You can now start the dashboard using pnpm dev.

JS Runtime

Navigate to packages/js-runtime and run pnpm build to build the JavaScript runtime. You can also run pnpm dev to watch for changes and automatically rebuild.

Serverless

Make sure you've followed the Requirements and the JS Runtime setup.

Navigate to crates/serverless and run cargo run to start the Serverless process. You can also run cargo test at the root of the project to run all tests.

CLI

Make sure you've followed the Requirements and the JS Runtime setup.

Navigate to crates/cli and run cargo run to start the CLI. You can pass arguments to the CLI using cargo run -- <args>. For example, cargo run -- dev index.ts.

WPT Runner

Make sure you've followed the Requirements and the JS Runtime setup.

First, you'll need to update the WPT submodule. Navigate to tools/wpt and run git submodule update --init.

Then, navigate to crates/wpt-runner and run cargo run to start the WPT Runner. You can optionally pass a path to a specific file or directory to run the tests on. For example, cargo run -- ../../tools/wpt/fetch/api/headers/header-setcookie.any.js

Every time you update the js-runtime code, you will need to rebuild it. We recommend running the dev script of js-runtime to watch for changes and automatically rebuild.

Before submitting a PR

We have some checks in place to ensure we don't introduce bugs or regressions in PRs. You can run pnpm lint and pnpm typecheck at the project's root to ensure there are no lint and type errors.

Finally, run pnpm changeset to generate a changeset file (opens in a new tab). Select the modified packages and choose the SemVer increment "major", "minor", or "patch", then write a short description of the changes.