Skip to content

Commit

Permalink
Merge branch 'main' into modular-deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchmidt committed May 21, 2024
2 parents d3c6520 + 557fe64 commit ee57c15
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
exit-code: "1" # Fail the build!

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
if: always() # Bypass non-zero exit code..
with:
sarif_file: "trivy-results.sarif"
Expand Down
88 changes: 44 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"@types/node": "^20.12.2",
"@types/react": "^18.2.18",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"@vitejs/plugin-react": "^4.2.0",
"autoprefixer": "^10.4.16",
"axe-playwright": "^2.0.1",
Expand Down
43 changes: 43 additions & 0 deletions packages/dito/doc/adr/0003-use-remix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 3. Use Remix as the meta framework for React

Date: 2024-05-17

## Status

Accepted

## Context

For the digital touchpoint, we need both some kind of backend (to handle emails and PDF generation) as well as a way to serve the frontend.
For React, multiple solutions that handle both tasks simultaneously exist.
The most popular ones are Next.js and Remix.
Both provide all the necessary features to build a full-stack application.
Both come with production ready servers to run the application and serve the frontend.

While Next.js is more popular and has a larger community, there is more experience with using Remix in the DigitalService and Digitalcheck team specifically.
The platform team also provides an easy to get started with [template](https://github.com/digitalservicebund/remix-application-template) for setting up a Remix project.

Further benefits of Remix are:

- The more fine grained control over routing
- Easier data fetching
- Subjectively better dev experience

Downsides of Remix include:

- Worse documentation
- A mental model that can be hard to grasp
- Potentially larger files
- Calling multiple APIs from the same route can be more complex, not suited for SPAs

## Decision

We will use Remix as the meta framework for serving React and building the backend, as its model aligns well with the DiTo architecture.

## Consequences

We will use the [Remix template](https://github.com/digitalservicebund/remix-application-template) provided by the platform team to set up the project.

We will proactively share knowledge about how to best structure code / data loading to get a common understanding of best practices and pitfalls.

We will make sure to split files once they get too large to keep the project maintainable.

0 comments on commit ee57c15

Please sign in to comment.