File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ PLAYWRIGHT_TIMEOUT=30000
55SERVICES_JSON_PATH = ./services.json
66PORT = 3000
77SESSION_SECRET = <any long random string>
8- SSO_CLIENT_ID = <from Internal Access>
9- SSO_CLIENT_SECRET = <from Internal Access>
8+ SSO_ISSUER = http://localhost:8090/default
9+ SSO_CLIENT_ID = test-client
10+ SSO_CLIENT_SECRET = test-secret
1011APP_URL = http://localhost:3000
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ The daily cron (2 AM London) enqueues one job per service. Jobs are processed se
3737## Running locally
3838
3939``` bash
40- # Start Postgres
41- docker compose up postgres -d
40+ # Start Postgres and OIDC mock
41+ docker compose up postgres oidc-mock -d
4242
4343# Run migrations and seed
4444npm run db:migrate
@@ -56,8 +56,9 @@ Required `.env` (see `.env.example`):
5656```
5757DATABASE_URL=postgres://scraper:scraper@localhost:5432/compliance_scraper
5858SESSION_SECRET=<any long random string>
59- SSO_CLIENT_ID=<from Internal Access>
60- SSO_CLIENT_SECRET=<from Internal Access>
59+ SSO_ISSUER=http://localhost:8090/default
60+ SSO_CLIENT_ID=test-client
61+ SSO_CLIENT_SECRET=test-secret
6162APP_URL=http://localhost:3000
6263```
6364
Original file line number Diff line number Diff line change @@ -56,12 +56,18 @@ pnpm run db:seed
5656## Running locally
5757
5858``` bash
59+ # Start Postgres and OIDC mock
60+ docker compose up postgres oidc-mock -d
61+
62+ # Run migrations and seed (first time only)
63+ pnpm run db:migrate
64+ pnpm run db:seed
65+
66+ # Start the app
5967pnpm run dev
60- pnpm run dev:watch
61- pnpm run build && pnpm start
6268```
6369
64- Opens at [ http://localhost:3000 ] ( http://localhost:3000 )
70+ Opens at [ http://localhost:3000 ] ( http://localhost:3000 ) . Sign-in uses a local mock identity provider (auto-login, no credentials needed).
6571
6672### Docker Compose
6773
Original file line number Diff line number Diff line change 1616 <div class =" govuk-grid-column-one-quarter" >
1717 <div class =" govuk-form-group govuk-!-margin-bottom-2" >
1818 <label class =" govuk-label govuk-label--s" for =" organisation" >Organisation</label >
19- <select class =" govuk-select govuk-!-width-full" id =" organisation" name =" organisation" onchange = " this.form. submit() " >
19+ <select class =" govuk-select govuk-!-width-full" id =" organisation" name =" organisation" data-auto- submit >
2020 <option value =" " >All organisations</option >
2121 {% for org in organisations %}
2222 <option value =" {{ org }}" {% if currentFilters.organisation == org %}selected{% endif %} >{{ org }} </option >
2525 </div >
2626 </div >
2727 {% if currentFilters .organisation %}
28- <div class =" govuk-grid-column-one-quarter" style = " padding-top : 30 px ; " >
28+ <div class =" govuk-grid-column-one-quarter govuk-!- padding-top-6 " >
2929 <a href =" /cookies" class =" govuk-link" >Clear filters</a >
3030 </div >
3131 {% endif %}
Original file line number Diff line number Diff line change 3535 </a >
3636{% else %}
3737 <a href =" /auth/login" role =" button" draggable =" false" class =" govuk-button" data-module =" govuk-button" >
38- Sign in with Internal Access
38+ Sign in
3939 </a >
4040{% endif %}
4141
Original file line number Diff line number Diff line change 172172 });
173173 });
174174 </script >
175+ <script nonce =" {{ cspNonce }}" >
176+ document .querySelectorAll (' select[data-auto-submit]' ).forEach (function (el ) {
177+ el .addEventListener (' change' , function () { el .form .submit (); });
178+ });
179+ </script >
175180</body >
176181</html >
Original file line number Diff line number Diff line change 1515 <div class =" govuk-grid-column-one-quarter" >
1616 <div class =" govuk-form-group govuk-!-margin-bottom-2" >
1717 <label class =" govuk-label govuk-label--s" for =" organisation" >Organisation</label >
18- <select class =" govuk-select govuk-!-width-full" id =" organisation" name =" organisation" onchange = " this.form. submit() " >
18+ <select class =" govuk-select govuk-!-width-full" id =" organisation" name =" organisation" data-auto- submit >
1919 <option value =" " >All organisations</option >
2020 {% for org in organisations %}
2121 <option value =" {{ org }}" {% if currentFilters.organisation == org %}selected{% endif %} >{{ org }} </option >
2424 </div >
2525 </div >
2626 {% if currentFilters .organisation %}
27- <div class =" govuk-grid-column-one-quarter" style = " padding-top : 30 px ; " >
27+ <div class =" govuk-grid-column-one-quarter govuk-!- padding-top-6 " >
2828 <a href =" /privacy" class =" govuk-link" >Clear filters</a >
2929 </div >
3030 {% endif %}
Original file line number Diff line number Diff line change 2020 <div class =" govuk-grid-column-one-quarter" >
2121 <div class =" govuk-form-group govuk-!-margin-bottom-2" >
2222 <label class =" govuk-label govuk-label--s" for =" status" >Stated compliance</label >
23- <select class =" govuk-select govuk-!-width-full" id =" status" name =" status" onchange = " this.form. submit() " >
23+ <select class =" govuk-select govuk-!-width-full" id =" status" name =" status" data-auto- submit >
2424 <option value =" " >All statuses</option >
2525 <option value =" fully_compliant" {% if currentFilters.status == ' fully_compliant' %}selected{% endif %} >Fully compliant</option >
2626 <option value =" partially_compliant" {% if currentFilters.status == ' partially_compliant' %}selected{% endif %} >Partially compliant</option >
3232 <div class =" govuk-grid-column-one-quarter" >
3333 <div class =" govuk-form-group govuk-!-margin-bottom-2" >
3434 <label class =" govuk-label govuk-label--s" for =" organisation" >Organisation</label >
35- <select class =" govuk-select govuk-!-width-full" id =" organisation" name =" organisation" onchange = " this.form. submit() " >
35+ <select class =" govuk-select govuk-!-width-full" id =" organisation" name =" organisation" data-auto- submit >
3636 <option value =" " >All organisations</option >
3737 {% for org in organisations %}
3838 <option value =" {{ org }}" {% if currentFilters.organisation == org %}selected{% endif %} >{{ org }} </option >
4141 </div >
4242 </div >
4343 {% if currentFilters .status or currentFilters .organisation %}
44- <div class =" govuk-grid-column-one-quarter" style = " padding-top : 30 px ; " >
44+ <div class =" govuk-grid-column-one-quarter govuk-!- padding-top-6 " >
4545 <a href =" /accessibility" class =" govuk-link" >Clear filters</a >
4646 </div >
4747 {% endif %}
You can’t perform that action at this time.
0 commit comments