Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
004fdd0
Merge pull request #253 from building-envelope-data/main
christoph-maurer Apr 13, 2026
2f4b718
Clean-up institution page
Mar 27, 2026
dab96d9
Ask for confirmation before deleting entities
Mar 28, 2026
3ce35bf
Tell what to do when migrations are pending or missing
Mar 28, 2026
1dc44ba
Corrext exists flags (now for real)
Mar 28, 2026
97a5d12
Notify on component creation, add tooltips with UUIDs to links, and c…
Mar 28, 2026
aecb79d
Remove unnecessary picking of properties, make JSON in JSON viewer co…
Mar 29, 2026
9479e85
Right-align user menu items (login/logout/register)
Mar 29, 2026
67a9985
Paginate, filter, and sort via GraphQL instead of in the UI, use sour…
Mar 30, 2026
8a30139
Document environment and target variables
Apr 18, 2026
9139ce5
Discourage using branch as deploy target
Apr 18, 2026
5b2b62c
Use Fraunhofer mail-transfer agent with redundancy
Apr 24, 2026
c1792ba
Add steps for the very first deployment
Apr 28, 2026
2616495
Seed institutions, databases, and OpenId Connect applications in prod…
May 5, 2026
73db85f
Add space between entities and GraphQL information
May 6, 2026
c5ab705
Merge pull request #251 from building-envelope-data/clean-up-user-int…
simonwacker May 6, 2026
c897021
Use modals for entity-creation forms, add pages for GnuPG keys, and p…
May 7, 2026
8ac59b3
Correct description of login redirection URL and improve client-secre…
May 7, 2026
1b6aa48
Merge pull request #255 from building-envelope-data/clean-up-user-int…
simonwacker May 7, 2026
be3fa36
Fetch associated entities with mutations to get view updates with ref…
May 8, 2026
386c346
Correct email sender address
May 8, 2026
63ed1a3
Prevent removal of role from last user in that role
May 10, 2026
54ca4b9
Add customer support role to users
May 10, 2026
914d1c8
Show loading indicators in pagination (and disable interaction therew…
May 10, 2026
45dd2d8
Use email address from dotenv file as "from" when sending emails
May 10, 2026
7c756bf
Cut long floats, add units, improve spacing, show full information fo…
May 10, 2026
6d36e09
Pass `onClick` along with `rest` catch-all param
May 10, 2026
37d27b6
Check `rsrc` in README
christoph-maurer May 11, 2026
05d3381
Mention the `OPEN_ID_CONNECT_CLIENT_SECRET` in the staging deployment
christoph-maurer May 11, 2026
73b24a5
Add page to resend email confirmation and clean-up login/registration…
May 11, 2026
dcb51c0
The `OPEN_ID_CONNECT_CLIENT_SECRET` of `database` should be copied, too.
christoph-maurer May 11, 2026
2e1bdb1
Show summary of institution and method to verify with the verify-butt…
May 11, 2026
1a4d988
Show all pending entities or relations that are awaiting confirmation…
May 11, 2026
b14090b
Tell users what the scopes mean that the OpenId connect application r…
May 11, 2026
f3828e3
Correct snapshots to fix tests
christoph-maurer May 12, 2026
d0a7eda
Repair auditable tests by changing entity attributes before saving it
May 13, 2026
9094d61
Use HotChocolate 16.0.2 (instead of the pre-release version)
May 13, 2026
3a7bcfe
Correct example in documentation
May 13, 2026
4c22994
Add option `null` to nodes param of *List components
May 13, 2026
54156f3
Show labels for prefilled initial values like manager, owner, manufac…
May 13, 2026
fa29ee5
Integrate pending tasks associated with institutions directly into us…
May 13, 2026
9390620
Remove unused query
May 13, 2026
e62cf57
Reformulate some procedures necessary to use a production backup in s…
May 13, 2026
0573b68
Allow all OpenID Connect consent types to be set by administrators (o…
May 13, 2026
40fc97c
Authorize endpoints, grant types, response types, and scopes (some ma…
May 18, 2026
c3a7648
Allow anyone with the write scope to read all OpenId Connect applicat…
May 18, 2026
8abb59d
Rename count-only pending databases/institutions queries (otherwise i…
May 19, 2026
5249d41
Allow supporters to add suporters
May 19, 2026
ce73006
Always load pending databases and institutions to avoid caching issues
May 19, 2026
f5b355a
Upgrade frontend and backend dependencies
May 19, 2026
beaad70
Return to original page when logging in and show navigation items in …
May 19, 2026
d360527
Use `is 0` instead of `== 0`, use static were no instance data is use…
May 20, 2026
b6d8975
Remove unused recaptcha plugin
May 27, 2026
fe38624
Correct `loading` key
May 27, 2026
2e0b3cc
Correct links to pages of individual data entries
May 27, 2026
aa55401
Use mostly the same configuration to generate the GraphQL types and t…
May 27, 2026
6ba88f6
Fix access to static authorization methods
May 27, 2026
987f4a0
Handle undefined query parameter by showing a loading skeleton and co…
May 27, 2026
ed5e207
Merge pull request #262 from building-envelope-data/minor-clean-ups-t…
simonwacker May 27, 2026
b83682b
Correct name of and link to database operator
May 27, 2026
6ca3333
Add count tag to pending databases and institutions
May 27, 2026
0eed7f4
Increase max-allowed GraphQL costs
May 27, 2026
fd08d8d
Install `knip` to check for unused dependencies, exports, and files; …
May 28, 2026
4be96eb
Upgrade Docker images
May 28, 2026
7abaa6b
Upgrade dependency `concurrently`
May 28, 2026
c5a83df
Upgrade PostgreSQL to the latest major version, that is, 18 (and add …
May 28, 2026
409a5ee
Align placeholders
May 28, 2026
4fdfbc7
Add pull policy to PostgreSQL upgrade service
Jun 1, 2026
8af3683
Redirect users to dedicated error page when an .NET Core error occurs…
Jun 2, 2026
1dd937f
Remove unnecessary checks for whether outer is ready, use single-sign…
Jun 2, 2026
210526c
Prefer `> 0` over `>= 1` and prefer `_` as placeholder for unimportan…
Jun 3, 2026
dd98124
Use sequential UUID generator for primary keys (for improved performa…
Jun 8, 2026
99f4154
Only pull when missing in development
Jun 11, 2026
4127329
Mark pure extensions
Jun 12, 2026
6a46fef
Make uint filterable via GraphQL
Jun 12, 2026
e080eb9
Add link to key on the OpenPGP key server
Jun 12, 2026
0dd7c44
Allow anonymous users to view meta information about GnuPG keys used …
Jun 12, 2026
a875d1d
Spread approvals vertically
Jun 12, 2026
fc17a02
Wrap tags to the next line if they do not fit anymore (in particular …
Jun 12, 2026
0a04585
Pass context in filter state reducers correctly
Jun 12, 2026
9e36bb9
Use antd `Link` component for external links (instead of the one from…
Jun 12, 2026
b3d341b
Add missing space ...
Jun 12, 2026
acbb68c
Use GraphQL scalar types `EmailAddress` and `PhoneNumber`
Jun 12, 2026
8775f57
Fail validation if string inputs contain only whitespace characters
Jun 12, 2026
906062e
Add `noopener` explictly such that ant.design does not add noreferrer
Jun 12, 2026
29adffc
Add data format to resource tree view
Jun 16, 2026
c8d1dcc
Start dependencies when necessary
Jun 16, 2026
675de88
Assign result of calls to pure method to variable (even though it is …
Jun 16, 2026
9fad198
Upgrade dependencies to latest compatible versions
Jun 16, 2026
3ff499b
Downgrade the graphql package
Jun 16, 2026
6d4ba83
Fix apollo configuration and usage
Jun 16, 2026
ed7f987
Treat C# `TimeSpan`s like NodaTime `Duration`s
Jun 16, 2026
6002a23
Pass user ID and API key to EPEA database
Jun 16, 2026
d76a8b9
Show only the icon for copying a GnuPG link
Jun 16, 2026
516ca00
Fix permalink for entity summaries used on index pages
Jun 17, 2026
b986051
Seed less aggressively --- only seed users, databases, and OpenID Con…
Jun 17, 2026
6418d49
Use the database operator to decide which additional HTTP headers to …
Jun 17, 2026
5e444ca
Add reload button to pagination and on empty results (to reload pagin…
Jun 17, 2026
0d32e2c
Show formal signature of data approval only on demand
Jun 17, 2026
318ef1a
Display scopes of authorization in frontend
Jun 17, 2026
af710ba
Indent with 4 spaces per level
Jun 17, 2026
eb250c8
Exclude the offline access and openid scopes from conversion to OpenI…
Jun 18, 2026
4e80941
Make phone number standard conform
Jun 18, 2026
136efb5
Display creation success in a modal (notifications cannot fit to the …
Jun 18, 2026
4223a11
Describe how to format phone numbers
Jun 18, 2026
a88c446
Add scalars `ArXiv`, `Doi`, and `GraphQlQuery`, and use `String` for …
Jun 19, 2026
c42a68c
Merge pull request #274 from building-envelope-data/relay-conformance…
simonwacker Jun 20, 2026
10f7fcc
Mention breaking changes from https://github.com/building-envelope-da…
Jun 20, 2026
b6706e6
Add migration for switch to sequential UUIDs that was done in `Applic…
Jun 20, 2026
8b34e84
Add test that checks whether the C# domain model matches the PostgreS…
Jun 20, 2026
08ab242
Use scalar `EmailAddress` for email addresses and use E.164 format co…
Jun 23, 2026
9f229a3
Fix check whether OpenID Connect application belongs to verified comp…
Jun 23, 2026
92ae552
Add tabs with data from product-data databases to components
Jun 23, 2026
f4d0344
Fall back to the component ID if for some reason the component itself…
Jun 23, 2026
1673e2a
Name tests `IsSyntaxError` instead of `IsUserError` when the GraphQL …
Jun 23, 2026
5a22011
Add navigations from components to `all*Data` and add counts to data …
Jun 24, 2026
34b4c25
Make database setup asynchronous and cancelable
Jun 24, 2026
c55b1ad
Correct nullability of connection and edges
Jun 24, 2026
5be73e2
Use fibonacci numbers for page sizes and reduce maximum page size to …
Jun 24, 2026
6d77a43
Correct nullability of connection and edges (follow-up)
Jun 24, 2026
bc3e7a0
Make GET HTTPS resources of product-data databases available through …
Jun 24, 2026
206efc4
Jump directly on select
Jun 24, 2026
d1d15a3
Make audiences and resources of an OpenID Connect application accessi…
Jun 24, 2026
69f3ad6
Allow an application authenticated via client credentials to access i…
Jun 24, 2026
73f4146
Drop the as-of-now not-needed column `Contact_Exists` from `instituti…
Jun 25, 2026
3176d06
Make GnuPG key verification cancellable
Jun 25, 2026
3eee8ee
Use pg-schema-diff to compare the domain-model derived PostgreSQL sch…
Jun 25, 2026
7fc8f4e
Do not let apt autoremove (because it removes GnuPG)
Jun 25, 2026
c21407b
Use 100 as default and max page size and use 99 only for the default …
Jun 26, 2026
299aa36
Show error information when data loading failed with refetch possibility
Jun 26, 2026
a7cf3e9
Add reload button to error result
Jun 26, 2026
58585be
Adapt the help target such that it does not choke on the character `:…
Jun 26, 2026
db2f2f0
Correct error message when Makefile is improperly linked
Jun 26, 2026
9cd7355
Report unauthorized errors and add query `currentOpenIdConnectTokenCl…
Jun 26, 2026
b030a75
Add `UNKNOWN` to component subtype enumeration (the IGSDB may return …
Jun 26, 2026
c283421
Remove unnecessary truthy filter
Jun 27, 2026
86d7880
Support given parsed value to `DateTimeX` component
Jun 27, 2026
25ba677
Log non-sensitive variables in case a GraphQL query fails
Jun 28, 2026
05974c7
Correct check that data format is non-null
Jun 28, 2026
146ee3f
Tell to keep in sync with reverse proxy of machine
Jun 28, 2026
4a1b97b
Make schema more compliant with the one of databases, in particular, …
Jun 28, 2026
962c472
Update the GraphQL schema
Jun 28, 2026
f5da98c
Add attempt to validate GraphQL queries used in the backend against t…
Jun 29, 2026
e91a69d
Remove target `lint` because `next` does not offer it anymore
christoph-maurer Jun 29, 2026
6de7ab8
Add snapshot of new test. All tests pass
christoph-maurer Jun 30, 2026
8ca1bfd
Fix the dotenv linter used to lint deployments
Jun 30, 2026
b23a64a
Increase max-allowed GraphQL costs (again) --- one issue is that the …
Jun 30, 2026
49b7676
Prepare release v1.2.0
web-flow Jun 30, 2026
7cfef64
Remove `--detach` from `git switch` when used with a release tag (it …
Jun 30, 2026
37a2d6b
Prepare changelog for the upcoming release
Jun 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .env.development.sample
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ TESTLAB_SOLAR_FACADES_OPEN_ID_CONNECT_CLIENT_SECRET=secret
IGSDB_API_TOKEN=secret
IGSDB_OPEN_ID_CONNECT_CLIENT_SECRET=secret

EPEA_USER_ID=christoph.maurer@ise.fraunhofer.de
EPEA_API_KEY=secret
EPEA_OPEN_ID_CONNECT_CLIENT_SECRET=secret

OPEN_TELEMETRY_HOST=host.docker.internal
OPEN_TELEMETRY_GRPC_PORT=4017

EMAIL_ADDRESS=christoph.maurer@ise.fraunhofer.de

SMTP_HOST=email
SMTP_PORT=25
8 changes: 7 additions & 1 deletion .env.production.sample
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ TESTLAB_SOLAR_FACADES_OPEN_ID_CONNECT_CLIENT_SECRET=
IGSDB_API_TOKEN=
IGSDB_OPEN_ID_CONNECT_CLIENT_SECRET=

EPEA_USER_ID=christoph.maurer@ise.fraunhofer.de
EPEA_API_KEY=
EPEA_OPEN_ID_CONNECT_CLIENT_SECRET=

OPEN_TELEMETRY_HOST=host.docker.internal
OPEN_TELEMETRY_GRPC_PORT=4317

SMTP_HOST=mail-mtaKA26.fraunhofer.de
EMAIL_ADDRESS=christoph.maurer@ise.fraunhofer.de

SMTP_HOST=mta01.mx.fraunhofer.de
SMTP_PORT=25
RELAY_SMTP_HOST=
RELAY_SMTP_PORT=25
Expand Down
8 changes: 7 additions & 1 deletion .env.staging.sample
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ TESTLAB_SOLAR_FACADES_OPEN_ID_CONNECT_CLIENT_SECRET=
IGSDB_API_TOKEN=
IGSDB_OPEN_ID_CONNECT_CLIENT_SECRET=

EPEA_USER_ID=christoph.maurer@ise.fraunhofer.de
EPEA_API_KEY=
EPEA_OPEN_ID_CONNECT_CLIENT_SECRET=

OPEN_TELEMETRY_HOST=host.docker.internal
OPEN_TELEMETRY_GRPC_PORT=4317

EMAIL_ADDRESS=christoph.maurer@ise.fraunhofer.de

SMTP_HOST=email
SMTP_PORT=25
RELAY_SMTP_HOST=mail-mtaKA26.fraunhofer.de
RELAY_SMTP_HOST=mta01.mx.fraunhofer.de
RELAY_SMTP_PORT=25
RELAY_ALLOWED_EMAILS=
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
-

## [v1.2.0] - 2026-06-30

### Changed

- **BREAKING**: Use `String` for cursors and `Int` for `first` and `last` parameters to conform to the Relay connection specification, simplify GraphQL filter input type names, and correct plural names ending before in `ys` and now in `ies` [#274](https://github.com/building-envelope-data/metabase/pull/274)

## [v1.1.1] - 2026-04-13

### Added
Expand Down Expand Up @@ -154,10 +160,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [v1.0.0] - 2022-02-28

[Unreleased]: https://github.com/building-envelope-data/metabase/compare/v1.1.1...HEAD

[Unreleased]: https://github.com/building-envelope-data/metabase/compare/v1.2.0...HEAD
[v1.2.0]: https://github.com/building-envelope-data/metabase/compare/v1.1.1...v1.2.0
[v1.1.1]: https://github.com/building-envelope-data/metabase/compare/v1.1.0...v1.1.1

[v1.1.0]: https://github.com/building-envelope-data/metabase/compare/v1.0.0...v1.1.0

[v1.0.0]: https://github.com/building-envelope-data/metabase/compare/5e4c6579bc7b596502c0bc9318cf24435bed2c80...v1.0.0
115 changes: 77 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ When doing so, please adhere to our
- OpenAPI reference at `https://www.local.buildingenvelopedata.org:${HTTPS_PORT}/openapi/docs/`,
- dummy email server at `https://www.local.buildingenvelopedata.org:${HTTPS_PORT}/email/`
(to view for example the confirmation email sent during registration),
- OpenId Connect configuration at
- OpenID Connect configuration at
`https://www.local.buildingenvelopedata.org:${HTTPS_PORT}/.well-known/openid-configuration`,
- telemetry web frontend at `https://telemetry.local.buildingenvelopedata.org:${HTTPS_PORT}`,
- staging web frontend at `https://staging.local.buildingenvelopedata.org:${HTTPS_PORT}`,
Expand Down Expand Up @@ -275,17 +275,23 @@ and the pages following it.
some information on what the variables mean
- `NAME` is the name Docker project name, in particular, it is the prefix
of the Docker container names listed by `docker ps --all`;
- `ENVIRONMENT` is either `staging` or `production`;
- `TARGET` is the deployed tag or commit. It is set later by running
`./deploy.mk do TARGET=${TAG}`. The corresponding Docker images named
`${NAME}-backend:${TARGET}` and `${NAME}-frontend:${TARGET}` are built
on a build or development machine and pushed to the server later with
GNU Make targets from `./forge.mk`;
- `HOST` is the domain name with sub-domain of the deployment, in
particular, it is used by the OpenId Connect provider and to make
particular, it is used by the OpenID Connect provider and to make
URLs absolute in emails sent for example when a user registers;
- `HTTP_PORT` is the HTTP port on which the reverse proxy NGINX listens
for requests;
- `BOOTSTRAP_USER_PASSWORD` is the password used by the database seeder
for the administrator account if there is none yet;
- `OPEN_ID_CONNECT_CLIENT_SECRET` is the OpenId Connect client secret of
- `OPEN_ID_CONNECT_CLIENT_SECRET` is the OpenID Connect client secret of
the metabase as a client of itself as identity provider;
- `TESTLAB_SOLAR_FACADES_HOST` is the host with sub-domain of the TestLab
Solar Façades used by the database seeder to add it as an OpenId
Solar Façades used by the database seeder to add it as an OpenID
Connect client;
- `TESTLAB_SOLAR_FACADES_OPEN_ID_CONNECT_CLIENT_SECRET` is the
corresponding client secret;
Expand All @@ -302,7 +308,17 @@ and the pages following it.
- `ln --symbolic ./docker.mk ./Makefile` and
- `ln --symbolic ./docker-compose.production.yaml ./docker-compose.yaml`.

1. Create the PostgreSQL database by running `./database.mk create`.
1. Switch to the Git branch, tag, or commit you want to deploy by either running
`git switch ${BRANCH}`,
`git switch release/${TAG}`, or
`git switch --detach ${COMMIT_HASH}`,
where, for example, `${BRANCH}` is `develop` or `${TAG}` is `v1.0.0` or
`${COMMIT_HASH}` is `5e14d7d0858f26c00c82ab9c248cd750606a24b6`.

1. Create the PostgreSQL database and schema by running
`./database.mk create migrate`.

1. Build and start all services by running `make build up`.

### Creating a release

Expand All @@ -318,7 +334,7 @@ and the pages following it.
a new release" on
[Releases](https://github.com/building-envelope-data/metabase/releases).
1. Fetch the release branch by running `git fetch` and switch to it by running
`git switch --detach release/v*.*.*`, where `*.*.*` is the version.
`git switch release/v*.*.*`, where `*.*.*` is the version.
1. If the databases have not diverged, then apply pending migrations with
`./database.mk migrate`. Otherwise, recreate the database by running
`./database.mk drop create migrate`.
Expand All @@ -330,11 +346,11 @@ and the pages following it.
### Deploying a release

1. Fetch the release branch by running `git fetch` and switch to it by running
`git switch --detach release/${TAG}`, where `${TAG}` is the release tag to
`git switch release/${TAG}`, where `${TAG}` is the release tag to
be deployed, for example, `v1.0.0`.
1. Build and push the Docker images for the services `frontend` and `backend`
services by running `./forge.mk all USER=cloud HOST=${IP}`, where `${IP}` is
the server's IP address.
by running `./forge.mk all USER=cloud HOST=${IP}`, where `${IP}` is the
server's IP address.
1. Enter a shell on the production machine using `ssh`.
1. Navigate into `/app/production` by running `cd /app/production`.
1. Back up the production database by running
Expand All @@ -347,34 +363,57 @@ and the pages following it.
1. Deploy the new release in the staging environment by running
`./deploy.mk do TARGET=${TAG}`, where `${TAG}` is
the release tag to be deployed, for example, `v1.0.0`.
1. If it fails _after_ the database backup was made, rollback to the previous
state by running
`./deploy.mk rollback`,
figure out what went wrong, apply the necessary fixes to the codebase,
create a new release, and try to deploy that release instead.
1. If it fails rollback to the previous state by running
`./deploy.mk rollback`, figure out what went wrong, apply the necessary
fixes to the codebase, create a new release, and try to deploy that release
instead.
1. If it succeeds, deploy the new reverse proxy that handles sub-domains by
running `cd /app/machine && ./deploy.mk do` and test whether everything works
as expected and if that is the case, continue. Note that in the
staging environment sent emails can be viewed in the web browser under
`https://staging.buildingenvelopedata.org/email/` and emails to addresses in
the variable `RELAY_ALLOWED_EMAILS` in `./.env` are delivered to the
respective inboxes (the variable's value is a comma separated list of email
addresses). Note that in order for OpenId Connect to work as expected in
staging, make sure that the redirect URIs use the sub-domain `staging`
(instead of `www`) by entering `psql` with `./database.mk psql`, examining
the output of the SQL statement
`select * from metabase."OpenIddictApplications";`
and if necessary executing SQL statements along the lines
`update metabase."OpenIddictApplications" set "RedirectUris"='["https://staging.buildingenvelopedata.org/connect/callback/login/metabase"]', "PostLogoutRedirectUris"='["https://staging.buildingenvelopedata.org/connect/callback/logout/metabase"]' where "ClientId"='metabase';`
and
`update metabase."OpenIddictApplications" set "RedirectUris"='["https://staging.solarbuildingenvelopes.com/connect/callback/login/metabase"]', "PostLogoutRedirectUris"='["https://staging.solarbuildingenvelopes.com/connect/callback/logout/metabase"]' where "ClientId"='testlab-solar-facades';`
And if you want the staging environment to forward queries to the staging
environments of product-data databases, then examine the output of the SQL
statement `select * from metabase.database;` and if necessary execute SQL
statements along the lines
`update metabase.database set "Locator"='https://staging.solarbuildingenvelopes.com/graphql/' where "Locator"='https://www.solarbuildingenvelopes.com/graphql/';`
and
`update metabase.database set "Locator"='https://igsdb-v2-staging.herokuapp.com/graphql/' where "Locator"='https://igsdb-v2.herokuapp.com/graphql/';`
as expected and if that is the case, continue.
- In the staging environment sent emails can be viewed in the web browser
under `https://staging.buildingenvelopedata.org/email/` and emails to
addresses in the variable `RELAY_ALLOWED_EMAILS` in `./.env` are delivered
to the respective inboxes (the variable's value is a comma separated list of
email addresses).

- If you want the staging environment to forward queries to the staging
environments of product-data databases, then examine the output of the SQL
statement `select * from metabase.database;` and if necessary execute SQL
statements along the lines

```
update metabase.database set "Locator" = 'https://staging.solarbuildingenvelopes.com/graphql/' where "Locator" = 'https://www.solarbuildingenvelopes.com/graphql/';
update metabase.database set "Locator" = 'https://igsdb-v2-staging.herokuapp.com/graphql/' where "Locator" = 'https://igsdb-v2.herokuapp.com/graphql/';
```

- In order for OpenID Connect to work in staging,
- replace `OPEN_ID_CONNECT_CLIENT_SECRET` in `/app/staging/.env` by the
respective value in `/app/production/.env` and run `make up` to recreate
Docker compose services which depend on that value. If you have a
staging deployment of a
[product-data database](https://github.com/building-envelope-data/database)
that communicates with the staging deployment of the metabase, then
replace `OPEN_ID_CONNECT_CLIENT_SECRET` there also. Both changes are
necessary to make the OpenID Connect clients in metabase and product-data
database use the client secret whose hash value is stored in the metabase;

- make sure that the redirect URIs and resource permissions use the
sub-domain `staging` (instead of `www`) by entering `psql` with
`./database.mk psql`, examining the output of the SQL statement
`select * from metabase."OpenIddictApplications";`
and, if necessary, executing SQL statements along the lines

```
update metabase."OpenIddictApplications" set "RedirectUris" = '["https://staging.buildingenvelopedata.org/connect/callback/login/metabase"]', "PostLogoutRedirectUris" = '["https://staging.buildingenvelopedata.org/connect/callback/logout/metabase"]' where "ClientId" = 'metabase';
update metabase."OpenIddictApplications" set "RedirectUris" = '["https://staging.solarbuildingenvelopes.com/connect/callback/login/metabase"]', "PostLogoutRedirectUris" = '["https://staging.solarbuildingenvelopes.com/connect/callback/logout/metabase"]' where "ClientId" = 'testlab-solar-facades';
```

and

```
update metabase."OpenIddictApplications" set "Permissions" = ("Permissions"::jsonb - 'rsrc:https://www.buildingenvelopedata.org/graphql/' || '"rsrc:https://staging.buildingenvelopedata.org/graphql/"'::jsonb)::text where "ClientId" = 'metabase';
```

1. Change to the production environment by running `cd /app/production`.
1. Adapt the environment file `./.env` if necessary by comparing it with the
`./.env.production.sample` file of the release to be deployed.
Expand Down Expand Up @@ -489,7 +528,7 @@ calculations.
The access right management of the product data network is based on the
framework [OpenID Connect](https://openid.net/developers/how-connect-works/).
The general idea is that users and applications can authenticate at the
metabase (OpenId Connect Provider) and receive an access token (security
metabase (OpenID Connect Provider) and receive an access token (security
credentials). When an application sends queries and mutations to product data
servers, it can attach the token. The product data server receives the token
and determines the access rights accordingly (authorization) using information
Expand Down Expand Up @@ -540,11 +579,11 @@ data server, please
to your institution. For `${UUID_OF_YOUR_INSTITUTION}` please use the UUID
which your institution has received when it was created.

1. equip your product data server with an OpenId Connect Client partly configuring
1. equip your product data server with an OpenID Connect Client partly configuring
it via OpenID Connect Discovery using the [Well-Known Configuration
Endpoint](https://www.buildingenvelopedata.org/.well-known/openid-configuration).

When adding an OpenId Connect Application, you need to make various decisions:
When adding an OpenID Connect Application, you need to make various decisions:
[Which OAuth 2.0 Flow Should
I Use?](https://auth0.com/docs/get-started/authentication-and-authorization-flow/which-oauth-2-0-flow-should-i-use)
We support the [Authorization Code Flow with Pushed Authorization Requests
Expand Down
2 changes: 2 additions & 0 deletions backend/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
<AnalysisLevel>latest-Recommended</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<!-- files are emitted to ./backend/src/obj/Debug/netX.X/generated -->
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
</PropertyGroup>

</Project>
24 changes: 23 additions & 1 deletion backend/Dockerfile.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.21
# syntax=docker/dockerfile:1.23
# check=error=true;skip=SecretsUsedInArgOrEnv
# Available versions are listed on https://hub.docker.com/r/docker/dockerfile

Expand Down Expand Up @@ -144,6 +144,28 @@ RUN \
--force \
/var/lib/apt/lists/*

# for available versions see the tags on https://github.com/stripe/pg-schema-diff
ENV PG_SCHEMA_DIFF_VERSION=v1.0.5
RUN \
apt-get update && \
apt-get install \
--assume-yes \
--no-install-recommends \
golang-go && \
go install \
github.com/stripe/pg-schema-diff/cmd/pg-schema-diff@${PG_SCHEMA_DIFF_VERSION} && \
cp /root/go/bin/pg-schema-diff /usr/local/bin/ && \
rm --recursive --force \
/root/go \
/root/.cache && \
apt-get purge \
--assume-yes \
golang-go && \
rm \
--recursive \
--force \
/var/lib/apt/lists/*

ENV HOME=/home/me
RUN mkdir --parents ${HOME}/app \
&& chown \
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.21
# syntax=docker/dockerfile:1.23
# check=error=true
# Available versions are listed on https://hub.docker.com/r/docker/dockerfile

Expand Down
16 changes: 6 additions & 10 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MAKEFLAGS += --warn-undefined-variables

# Taken from https://www.client9.com/self-documenting-makefiles/
help : ## Print this help
@awk -F ':|##' '/^[^\t].+?:.*?##/ {\
@awk -F ':.*?## ' '/^[^\t].+?:.*?##/ {\
printf "\033[36m%-30s\033[0m %s\n", $$1, $$NF \
}' $(MAKEFILE_LIST)
.PHONY : help
Expand All @@ -22,7 +22,7 @@ help : ## Print this help

# See https://learn.microsoft.com/en-us/dotnet/core/testing/microsoft-testing-platform-run-and-debug?tabs=dotnetcli
list : ARGS =
list : ## List tests, for example, `make list-tests ARGS='--filter "FullyQualifiedName~LoggedInUser_CreatesComponent"'`
list : ## List tests, for example, `make list ARGS='--filter "FullyQualifiedName~LoggedInUser_CreatesComponent"'`
dotnet run \
--project ./test/*.Tests.csproj \
--list-tests \
Expand Down Expand Up @@ -88,7 +88,7 @@ analyze : ## Analyze with Roslynator

# https://www.jetbrains.com/help/resharper/ReSharper_Command_Line_Tools.html#install-and-use-resharper-command-line-tools-as-net-core-tools
inspect : ## Inspect with ReSharper, for example, `make inspect OUTPUT=./inspection.xml`
dotnet tool run jb inspectcode --build ./*.sln -o ${OUTPUT}
dotnet tool run jb inspectcode --build --output "${OUTPUT}" ./*.sln
.PHONY : inspect

editorconfig : ## Debug editorconfig
Expand Down Expand Up @@ -171,13 +171,9 @@ dedup : ## Dedeuplicate code lines matching the pattern `${PATTERN}`, for exampl
}"
.PHONY : dedup

# See https://github.com/hasura/graphqurl#export-schema
schema : ## Fetch GraphQL schema using `hasura/graphqurl`
gq \
http://backend:8080/graphql/ \
--introspect \
> ./schema.graphql
.PHONY : schema
check-database : ## Check whether there have been any model changes made since the last migration was added and whether the C# domain model matches the PostgreSQL database schema
$(MAKE) test ARGS='--filter "FullyQualifiedName~EnsureMigrationsAreUpToDate|FullyQualifiedName~EnsureDomainModelMatchesDatabaseSchema"'
.PHONY : check-database

has-pending-model-changes : ## Check whether there have been any model changes made since the last migration was added
dotnet ef \
Expand Down
8 changes: 4 additions & 4 deletions backend/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"rollForward": false
},
"dotnet-ef": {
"version": "10.0.5",
"version": "10.0.9",
"commands": [
"dotnet-ef"
],
"rollForward": false
},
"dotnet-script": {
"version": "2.0.0",
"version": "2.0.1",
"commands": [
"dotnet-script"
],
Expand Down Expand Up @@ -66,7 +66,7 @@
"rollForward": false
},
"jetbrains.resharper.globaltools": {
"version": "2025.3.3",
"version": "2026.1.3",
"commands": [
"jb"
],
Expand All @@ -87,7 +87,7 @@
"rollForward": false
},
"dotnet-outdated-tool": {
"version": "4.7.1",
"version": "4.8.1",
"commands": [
"dotnet-outdated"
],
Expand Down
Loading
Loading