Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
32765ad
docs: update backend readme to use proper ghc and cabal versions
MSzalowski Nov 5, 2024
df3cd74
chore: remove @jdyczka from CODEOWNERS
MSzalowski Jan 8, 2025
e9d429d
fix: test 8D by removing unecessary intercept and testid updates
kneerose Feb 14, 2025
30c7603
chore: update test id of guardrailsScript checkbox
kneerose Feb 14, 2025
5299bbd
feat: add method to calculate total abstain votes for DRep proposals
kneerose Feb 17, 2025
a5ad666
fix: remove dRepNotVoted assertion
kneerose Feb 17, 2025
7b615e3
fix: await page interaction in proposal show-all-button
kneerose Feb 17, 2025
adc750a
feat: add guardrails script handling in proposal submission
kneerose Feb 17, 2025
2f48a4c
fix: add dynamic CORS middleware to handle cross-origin requests
kneerose Feb 17, 2025
bc801ce
fix(#2929): fix high severity code smells
MSzalowski Feb 13, 2025
810ac8b
fix: type error on voting threshold value
MSzalowski Feb 14, 2025
549d7a2
refactor: use different url and hash for validation in generateValidP…
kneerose Feb 17, 2025
d8d0f07
Merge pull request #3005 from IntersectMBO/fix/enable-metadata-api-cors
kneerose Feb 17, 2025
3073c1d
Merge pull request #3004 from IntersectMBO/fix/report-315-failing-tests
kneerose Feb 17, 2025
8b53e30
refactor: replace hardcoded proposal type filters with dynamic values…
kneerose Feb 17, 2025
1449fed
feat: add and handle motionOfNoConfidence type proposal
kneerose Feb 17, 2025
285a821
Merge pull request #3011 from IntersectMBO/tests/motion-of-no-confidence
kneerose Feb 17, 2025
09e1c63
Merge pull request #2991 from IntersectMBO/fix/2929-sonarcloud-multip…
MSzalowski Feb 17, 2025
08c26fc
feat(#2993): allow searching for yourself in DRep directory
MSzalowski Feb 14, 2025
27fa10d
Merge pull request #2995 from IntersectMBO/feat/2993-drep-should-be-a…
MSzalowski Feb 17, 2025
260c8c1
fix(#2994): fix refetching the drep directory
MSzalowski Feb 17, 2025
4649ff3
Merge pull request #3013 from IntersectMBO/fix/2994-drep-directory-sh…
MSzalowski Feb 18, 2025
eb06b42
feat(#2984): add mathematical styling inside governance action metadata
MSzalowski Feb 17, 2025
66d3d5d
Merge pull request #3012 from IntersectMBO/feat/2984-add-mathematical…
MSzalowski Feb 18, 2025
17a882b
chore: add script to update GovTool version
MSzalowski Feb 18, 2025
a6cb9b9
Merge pull request #3014 from IntersectMBO/chore/add-script-to-update…
MSzalowski Feb 18, 2025
b663ac1
fix: update dRep abstain vote display in governance details page visi…
kneerose Feb 17, 2025
4baf3f7
feat: add waitedLoop helper function for conditional waiting in tests
kneerose Feb 18, 2025
8d6c85f
feat: add functionWaitedAssert for enhanced function execution with t…
kneerose Feb 18, 2025
32f0fd7
fix: remove timeout and add possible assertion/waited function
kneerose Feb 18, 2025
912a7fb
fix: check api response on show more test
kneerose Feb 18, 2025
5b41ffb
fix: intercept and search intercepted title on test 8C
kneerose Feb 18, 2025
5dc6631
fix: wrong path to main metadata validation file
MSzalowski Feb 18, 2025
87e039b
fix: integrate functionWaitedAssert for proposal search validation
kneerose Feb 18, 2025
d03f7c6
fix: replace test 4L visibility checks with functionWaitedAssert
kneerose Feb 18, 2025
f144555
Merge pull request #3015 from IntersectMBO/chore/add-script-to-update…
MSzalowski Feb 18, 2025
efa0db0
Merge pull request #3018 from IntersectMBO/develop
MSzalowski Feb 18, 2025
312c0f8
fix: ensure NoDRepText is visible for invalid DRep Id
kneerose Feb 18, 2025
dedff47
fix: add waitedAssert function on test 2O
kneerose Feb 18, 2025
9cfdfda
feat: add proposal submission wallet setup
kneerose Feb 18, 2025
e862c35
fix: use temp proposal wallet to submit the proposal
kneerose Feb 18, 2025
953d893
chore: bump actions/cache to v4 across workflows
MSzalowski Feb 18, 2025
bf435f0
fix: test-2O add response promise on test start
kneerose Feb 19, 2025
2de1cff
feat: add failure handling with console messages on logger
kneerose Feb 19, 2025
81de77d
Merge pull request #3024 from IntersectMBO/chore/update-actions-cache…
MSzalowski Feb 19, 2025
a6047fe
feat(#2384): add `isStakeKeyRegistered` utility method
MSzalowski Feb 18, 2025
eb53a1c
feat: integrate failure handling with console messages in proposal su…
kneerose Feb 19, 2025
8a89f0d
feat: kept proposal setup on playwright setup epic
kneerose Feb 19, 2025
835d6fa
Merge pull request #3028 from IntersectMBO/fix/flaky-timeout-test
mesudip Feb 19, 2025
2cacfb8
Merge pull request #3030 from IntersectMBO/chore/remove-jdyczka-from-…
MSzalowski Feb 19, 2025
46b9367
Merge pull request #3021 from IntersectMBO/feat/2384-no-feedback-on-g…
MSzalowski Feb 19, 2025
0415408
chore: add server side compression for large assets
MSzalowski Feb 18, 2025
4f8d112
Merge pull request #3023 from IntersectMBO/chore/add-server-side-comp…
MSzalowski Feb 19, 2025
07cfcf3
fix(#3022): fix displaying helper buttons on governance action card d…
MSzalowski Feb 19, 2025
3d75f58
feat(#3031): use location specific ada mount formatting
MSzalowski Feb 19, 2025
758022e
Merge pull request #2328 from IntersectMBO/docs/update-backend-readme…
MSzalowski Feb 19, 2025
448b9d3
chore: update @intersect.mbo/pdf-ui to 0.6.2
github-actions[bot] Feb 20, 2025
cc60af7
feat: add logger injection helper function
kneerose Feb 20, 2025
c62c743
feat: integrate logger injection into Playwright test fixtures
kneerose Feb 20, 2025
4c27cdc
refactor: remove unused failureWithConsoleMessages function from exce…
kneerose Feb 20, 2025
5a30e6b
Merge pull request #3033 from IntersectMBO/fix/3022-helper-buttons-ar…
MSzalowski Feb 20, 2025
246ad65
Merge pull request #3036 from IntersectMBO/feat/3031-use-location-spe…
MSzalowski Feb 20, 2025
579577b
Merge pull request #3040 from IntersectMBO/chore/@intersect.mbo/pdf-u…
MSzalowski Feb 20, 2025
ca3a2fc
feat(#3035): improve default formatting of DRep directory
MSzalowski Feb 20, 2025
5167e71
Merge pull request #3041 from IntersectMBO/feat/3035-improve-default-…
MSzalowski Feb 20, 2025
a18a329
Merge pull request #3043 from IntersectMBO/develop
MSzalowski Feb 20, 2025
06fec9e
chore(outcomes): upgrade outcomes package to latest version
emmanuel-musau Feb 18, 2025
e70f13d
chore(outcomes): sync yarn.lock changes
emmanuel-musau Feb 18, 2025
11aca6f
chore: import gov actions ui package dynamically
emmanuel-musau Feb 19, 2025
750c432
test: increase timeout for visibility assertions in delegation and pr…
kneerose Feb 20, 2025
4cf4450
fix: proposal reply flaky test by using testid instead if getBytext
kneerose Feb 21, 2025
dafa56c
feat: add proposal09Wallet and corresponding auth setup
kneerose Feb 21, 2025
6599be4
feat: add function to retrieve draft proposal wallet and state based …
kneerose Feb 21, 2025
6631e39
refactor: use any proposal in proposal tests & merge 7M into a generi…
kneerose Feb 21, 2025
2949276
fix: correct constitutional URL test ID and increase timeout for draf…
kneerose Feb 21, 2025
eed7195
fix: error logging on waited loop
kneerose Feb 21, 2025
8515b5c
fix: ensure Active checkbox unchecked when filtering with a single op…
kneerose Feb 21, 2025
d266be6
fix: delegated ada format
kneerose Feb 21, 2025
dd2fd25
fix: refactor transaction polling to use functionWaitedAssert for imp…
kneerose Feb 21, 2025
a37a880
fix: wrap with functionWaitedAssertion on queryParameters
kneerose Feb 21, 2025
bb36959
Merge pull request #3044 from IntersectMBO/feat/log-inject
mesudip Feb 21, 2025
a4e87fe
fix: resetting active filter in drep directory
MSzalowski Feb 21, 2025
68ba8e2
Merge pull request #3048 from IntersectMBO/fix/resetting-active-filte…
MSzalowski Feb 21, 2025
19df972
chore: update GovTool to v2.0.12
github-actions[bot] Feb 21, 2025
5e83a7d
Merge pull request #3049 from IntersectMBO/chore/update-govtool-to-v2…
MSzalowski Feb 21, 2025
e54a962
Merge pull request #3050 from IntersectMBO/develop
MSzalowski Feb 21, 2025
fee17f6
Merge pull request #3051 from IntersectMBO/test
MSzalowski Feb 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/code_check_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: govtool/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }}
Expand All @@ -44,7 +44,7 @@ jobs:
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: govtool/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }}
Expand All @@ -70,7 +70,7 @@ jobs:
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: govtool/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend_sonar_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: govtool/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ jobs:
set -o pipefail
sudo chmod +x lint.sh && ./lint.sh 2>&1 | tee code_lint_output.txt


- name: Unit tests
id: unit_tests
run: |
Expand All @@ -90,7 +89,7 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
Expand Down Expand Up @@ -127,19 +126,19 @@ jobs:
VITE_IPFS_PROJECT_ID=${{ secrets.IPFS_PROJECT_ID }}
IPFS_GATEWAY=${{ secrets.IPFS_GATEWAY }}
IPFS_PROJECT_ID=${{ secrets.IPFS_PROJECT_ID }}

- name: Scan Docker image with Dockle
id: dockle
run: |
wget -q https://github.com/goodwithtech/dockle/releases/download/v0.4.14/dockle_0.4.14_Linux-64bit.tar.gz
tar zxf dockle_0.4.14_Linux-64bit.tar.gz
sudo mv dockle /usr/local/bin
wget -q https://github.com/goodwithtech/dockle/releases/download/v0.4.14/dockle_0.4.14_Linux-64bit.tar.gz
tar zxf dockle_0.4.14_Linux-64bit.tar.gz
sudo mv dockle /usr/local/bin

dockle --exit-code 1 --exit-level fatal -ak GHC_RELEASE_KEY -ak CABAL_INSTALL_RELEASE_KEY -ak STACK_RELEASE_KEY -ak KEY_SHA512 --format json --input '/tmp/image-${{ matrix.name }}-${{ github.sha }}-pr.tar' --output ${{ matrix.workdir }}/dockle_scan_output.json
rm -rf '/tmp/image-${{ matrix.name }}-${{ github.sha }}-pr.tar'
cat ${{ matrix.workdir }}/dockle_scan_output.json
dockle --exit-code 1 --exit-level fatal -ak GHC_RELEASE_KEY -ak CABAL_INSTALL_RELEASE_KEY -ak STACK_RELEASE_KEY -ak KEY_SHA512 --format json --input '/tmp/image-${{ matrix.name }}-${{ github.sha }}-pr.tar' --output ${{ matrix.workdir }}/dockle_scan_output.json
rm -rf '/tmp/image-${{ matrix.name }}-${{ github.sha }}-pr.tar'
cat ${{ matrix.workdir }}/dockle_scan_output.json

echo "outcome=success" >> $GITHUB_OUTPUT
echo "outcome=success" >> $GITHUB_OUTPUT

- name: Create PR comment
if: always()
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test_integration_playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ on:
workflow_run:
workflows: ["Build and deploy GovTool test stack"]
types: [completed]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
integration-tests:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
outputs:
start_time: ${{ steps.set-pending-status.outputs.timestamp }}
status: ${{ steps.run-test.outcome }}
Expand All @@ -49,7 +49,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.COMMIT_SHA }}
ref: ${{ env.COMMIT_SHA }}
- name: Set pending commit status
id: set-pending-status
run: |
Expand All @@ -70,7 +70,7 @@ jobs:

- name: Cache Playwright browsers
id: cache-playwright-browsers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/ms-playwright
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:

publish-report:
runs-on: ubuntu-latest
if: always() && needs.integration-tests.result != 'skipped'
if: always() && needs.integration-tests.result != 'skipped'
needs: integration-tests
outputs:
report_number: ${{ steps.report-details.outputs.report_number }}
Expand Down
102 changes: 102 additions & 0 deletions .github/workflows/update-govtool-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Update GovTool Version and Changelog

on:
workflow_dispatch:
inputs:
version:
description: "New version (e.g., 1.0.0)"
required: true

jobs:
update-version:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org/"
node-version-file: "./govtool/frontend/.nvmrc"
scope: "@intersect.mbo"

- name: Set Version Variable
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV

- name: Update package.json files and install dependencies
run: |
jq --arg v "$VERSION" '.version = $v' govtool/frontend/package.json > temp.json && mv temp.json govtool/frontend/package.json
jq --arg v "$VERSION" '.version = $v' govtool/metadata-validation/package.json > temp.json && mv temp.json govtool/metadata-validation/package.json

echo "Running npm install to update lock files..."
cd govtool/frontend && npm install && cd ../..
cd govtool/metadata-validation && npm install && cd ../..

- name: Update vva-be.cabal version (Preserve Spacing)
run: |
sed -i -E "s/^(version:[[:space:]]+)[0-9]+\.[0-9]+\.[0-9]+/\1$VERSION/" govtool/backend/vva-be.cabal
echo "✅ Updated version in vva-be.cabal while preserving spacing."

- name: Update Dockerfile Versions
run: |
sed -i -E "s/vva-be-[0-9]+\.[0-9]+\.[0-9]+/vva-be-$VERSION/g" govtool/backend/Dockerfile
sed -i -E "s/vva-be-[0-9]+\.[0-9]+\.[0-9]+/vva-be-$VERSION/g" govtool/backend/Dockerfile.qovery
echo "✅ Updated vva-be version in Dockerfiles."

- name: Update Metadata Validation API Version
run: |
sed -i -E "s/(\.setVersion\()[\"'][0-9]+\.[0-9]+\.[0-9]+[\"']/\1\"$VERSION\"/" govtool/metadata-validation/src/main.ts
echo "✅ Updated API version in main.ts"

- name: Update CHANGELOG.md
run: |
#!/bin/bash
VERSION="${{ github.event.inputs.version }}"
TODAY=$(date +%Y-%m-%d)
RELEASE_TAG="v$VERSION"
RELEASE_LINK="[v$VERSION](https://github.com/IntersectMBO/govtool/releases/tag/$RELEASE_TAG)"
TEMP_FILE=$(mktemp)

echo "Updating CHANGELOG.md with version $VERSION and date $TODAY..."

awk -v rl="$RELEASE_LINK" -v td="$TODAY" '
BEGIN { unreleased_found = 0; print_new_unreleased = 1 }
{
if ($1 == "##" && $2 == "[Unreleased]") {
unreleased_found = 1

# Print the new Unreleased section with required sub-sections
print "## [Unreleased]\n"
print "### Added\n"
print "### Fixed\n"
print "### Changed\n"
print "### Removed\n"

# Rename the old Unreleased section with a version and date
print "## " rl " " td "\n"
next
}
print
}' CHANGELOG.md > "$TEMP_FILE"

mv "$TEMP_FILE" CHANGELOG.md

echo "✅ CHANGELOG.md updated successfully!"

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "chore/update-govtool-to-v${{ github.event.inputs.version }}"
title: "Update GovTool to v${{ github.event.inputs.version }}"
commit-message: "chore: update GovTool to v${{ github.event.inputs.version }}"
body: |
This PR updates GovTool to version `${{ github.event.inputs.version }}`.


Workflow executed by `@${{ github.actor }}`.
sign-commits: true
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,48 @@ changes.

## [Unreleased]

### Added

### Fixed

### Changed

### Removed

## [v2.0.12](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.12) 2025-02-21


### Added

- Add metadata url and hash to drep details [Issue 2911](https://github.com/IntersectMBO/govtool/issues/2911)
- Add CC votes percentages, not voted and Ratification threshold
- Add support for submitting all 7 governance action types [Issue 2258](https://github.com/IntersectMBO/govtool/issues/2258)
- Add workflow to automatically update any of the @intersect.mbo package [Issue 2968](https://github.com/IntersectMBO/govtool/issues/2968)
- Add Propose Governance Action button in governance actions dashboard [Issue 1188](https://github.com/IntersectMBO/govtool/issues/1188)
- Add click handlers to non-interactive elements [Issue 2929](https://github.com/IntersectMBO/govtool/issues/2929)
- Allow searching for yourself in DRep Directory [Issue 2993](https://github.com/IntersectMBO/govtool/issues/2993)
- Add mathematical styling for governance actions [Issue 2984](https://github.com/IntersectMBO/govtool/issues/2984)
- Add script to update GovTool version
- Add `isStakeKeyRegistered` for the usage by pillars [Issue 2384](https://github.com/IntersectMBO/govtool/issues/2384)
- Add server side compression for large assets

### Fixed

- Fix calculating votes counting for governance actions
- Fix crashing backend on unhandled missing proposal from vote [Issue 2920](https://github.com/IntersectMBO/govtool/issues/2920)
- Remove abstain votes (not auto abstain) from total DRep stake
- Fix counting committee members [Issue 2948](https://github.com/IntersectMBO/govtool/issues/2948)
- Fix refetching DRep list on every enter [Issue 2994](https://github.com/IntersectMBO/govtool/issues/2994)
- Fix displaying helper buttons on governance action card details [Issue 3022](https://github.com/IntersectMBO/govtool/issues/3022)

### Changed

- Change threshold visual representation in governance action votes
- Resize governance action details columns
- Update @intersect.mbo/pdf-ui to v0.6.0
- Bump actions/cache to v4 across workflows
- Unify ADA Format across the application [Issue 3031](https://github.com/IntersectMBO/govtool/issues/3031)
- Change default filtering for DRep directory to show the active DReps [Issue 3035](https://github.com/IntersectMBO/govtool/issues/3035)

### Removed

Expand Down
8 changes: 4 additions & 4 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* @Ryun1 @MSzalowski

# Frontend assets templates
govtool/frontend/* @MSzalowski @jdyczka
*.tsx @MSzalowski @jdyczka
*.ts @MSzalowski @jdyczka
*.css @MSzalowski @jdyczka
govtool/frontend/* @MSzalowski
*.tsx @MSzalowski
*.ts @MSzalowski
*.css @MSzalowski

# Backend
govtool/backend/* @MSzalowski @jankun4
Expand Down
2 changes: 1 addition & 1 deletion govtool/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
WORKDIR /src
COPY . .
RUN cabal build
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.11/x/vva-be/build/vva-be/vva-be /usr/local/bin
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.12/x/vva-be/build/vva-be/vva-be /usr/local/bin
2 changes: 1 addition & 1 deletion govtool/backend/Dockerfile.qovery
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
WORKDIR /src
COPY . .
RUN cabal build
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.11/x/vva-be/build/vva-be/vva-be /usr/local/bin
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.12/x/vva-be/build/vva-be/vva-be /usr/local/bin

# Expose the necessary port
EXPOSE 9876
Expand Down
44 changes: 30 additions & 14 deletions govtool/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ This is a backend application of GovTool project.
## Prerequisites

In order to run `backend` your host machine will need access to the `cardano-db-sync` postgres database. To have this database running locally you'll need:
* `cardano-node`
* `cardano-db-sync`
* PostgreSQL database

- `cardano-node`
- `cardano-db-sync`
- PostgreSQL database

You will need your `cardano-node` and `cardano-db-sync` to be compatible with Sancho testnet. Until these features will be merged to the master branch the new Sancho compatible versions are available as releases on [github](https://github.com/IntersectMBO/cardano-db-sync/releases). You will also need a correct `cardano-node` version. The release notes for `cardano-db-sync` usualy specify that.

Expand All @@ -25,35 +26,50 @@ You can utilize the [docker-compose.node+dbsync.yml](../../scripts/govtool/docke

Due to problems with openapi3 package it's hard to build this project with plain `ghc` and `cabal-install`. Until the prolem is solved we reccomend using `nix` - this problem is fixed when you build your project from inside of the nix shell.

1. Get [Nix](https://nixos.org/download).
1. Get [Nix](https://nixos.org/download).

2. Get [direnv](https://direnv.net/).

3. Set GHC version to 9.10.1:

```sh
ghcup install ghc 9.10.1

ghcup set ghc 9.10.1
```

4. Install cabal

2. Get [direnv](https://direnv.net/).
```sh
ghcup install cabal
ghcup set cabal
```

3. Enter `govtool/backend` directory:
5. Enter `govtool/backend` directory:

```sh
cd govtool/backend
```

4. Allow direnv to setup your environment:
6. Allow direnv to setup your environment:

```sh
direnv allow
```

5. Update cabal & build project
7. Update cabal & build project
```sh
cabal update
cabal build all
```
6. Create a config file. You can use `example-config.json` as a template.
8. Create a config file. You can use `example-config.json` as a template.

7. Run project
```sh
9. Run project
`sh
cabal run vva-be -- --config <YOUR CONFIG FILE> start-app
```
> [!WARNING]
> In the context of our ongoing project enhancements, it is assumed that the executable previously known as 'vva-be' should be now officially renamed to 'govtool-backend'. This change is necessary for aligning with the updated branding and functional scope of the application and it has to be implemented in the near future as a chore and refactoring ticket. Make sure that the documentation matches the actual name of the executable.
`
> [!WARNING]
> In the context of our ongoing project enhancements, it is assumed that the executable previously known as 'vva-be' should be now officially renamed to 'govtool-backend'. This change is necessary for aligning with the updated branding and functional scope of the application and it has to be implemented in the near future as a chore and refactoring ticket. Make sure that the documentation matches the actual name of the executable.

## Development

Expand Down
Loading