Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
b3ade69
feat: `LLM_OPENAI_API_KEY` env variable
kaljarv Aug 11, 2025
329ab47
feat/refactor[backend][frontend]: user roles login and logout routes
kaljarv Aug 12, 2025
02e2c6e
feat: `AuthContext`
kaljarv Aug 12, 2025
b3ebfc2
build: add `llm` and `argument-condensation` to `frontend` deps
kaljarv Aug 13, 2025
0ec0f8e
refactor: `CandidateLoginError` messages
kaljarv Aug 13, 2025
5a23036
feat: Admin App
kaljarv Aug 13, 2025
908916c
feat[admin-app]: mock implementation of monitoring view
maximusvitutus Aug 14, 2025
b14766a
feat[admin-app]: create a job logger and store for storing long ops
maximusvitutus Aug 15, 2025
a443339
feat[admin-app]: improvements to job management and progress updates
maximusvitutus Aug 15, 2025
06d998e
feat[admin-app]: add job monitor component, use it in admin app
maximusvitutus Aug 17, 2025
55c4d0c
feat[admin-app]: use client svelte store in admin app
maximusvitutus Aug 18, 2025
b93c396
feat[admin-app]: add question info page
maximusvitutus Aug 19, 2025
1b5b74e
feat[admin-app]: failed implementation of saving to custom data
maximusvitutus Aug 19, 2025
10f9483
refactor: use a const for authToken cookie key
kaljarv Aug 21, 2025
9707dc4
refactor: move jobs to $lib/server
kaljarv Aug 21, 2025
b7a04ac
fix: remove unnecessary async from `PipelineLogger`
kaljarv Aug 21, 2025
ca33480
fix[llm][argument-condensation]: build options
kaljarv Aug 22, 2025
e5260e2
partial-revert: feat[admin-app]: failed implementation of saving to c…
kaljarv Aug 24, 2025
80c70de
chore: fix linter errors
kaljarv Aug 24, 2025
f486b03
chore[backend]: remove unnecessery logging
kaljarv Aug 25, 2025
b4102e2
feat[backend]: `question/:id/update-custom-data` api route
kaljarv Aug 25, 2025
d357f7c
feat: `DataWriter.updateQuestion` method
kaljarv Aug 25, 2025
16afe6a
refactor: global `Fetch` type
kaljarv Aug 25, 2025
cc53f4e
refactor: move client-side jobStores to `AdminContext`
kaljarv Aug 25, 2025
f2230e2
refactor: reorganize admin-only utils and components
kaljarv Aug 25, 2025
e5dfb08
refactor: `condenseArguments` admin feature
kaljarv Aug 25, 2025
3be9226
feat: preliminary route for single job details
kaljarv Aug 25, 2025
ef047ed
refactor: common Admin App parts
kaljarv Aug 25, 2025
a551e45
chore: fix formatting
kaljarv Aug 25, 2025
ac92345
refactor[llm]: add common LLM params and generation metrics types
maximusvitutus Aug 27, 2025
bde916d
rename[llm]: improve parse function sign to convey validation capability
maximusvitutus Aug 27, 2025
3487c96
feat[admin-app]: provide an abstract API for admin app job management
maximusvitutus Aug 26, 2025
d84c6f6
feat[admin]: add link feature-page link and improve info messages
maximusvitutus Aug 28, 2025
edc0830
feat[admin]: add interface JobMessage to tag a timestamp to messages
maximusvitutus Aug 28, 2025
22ca97b
refactor[admin]: move API jobs/[[id]] to jobs/single/[[id]]
maximusvitutus Aug 28, 2025
4a68151
feat[admin]: add new endpoints to admin UI's jobs api
maximusvitutus Aug 29, 2025
8103ee2
fix[admin]: show the latest jobs
maximusvitutus Aug 29, 2025
e1a8292
clean-up[admin]: remove unused admin jobs store functions
maximusvitutus Aug 29, 2025
8d3d6a3
fixes[arg-cond]: use UUID for final arguments
maximusvitutus Aug 29, 2025
68e2267
refactor[admin-app]: show warnings before info messages
maximusvitutus Aug 29, 2025
9014288
refactor[admin-app]: get admin features dynamically for the jobs page…
maximusvitutus Aug 29, 2025
f7f35f1
feat[admin-app]: disable button for arg-cond if a job is already running
maximusvitutus Aug 29, 2025
b894389
fix[arg-cond]: fix operation tree output dir
maximusvitutus Aug 30, 2025
7d16796
rename[admin-app]: rename force-fail to abort in admin-related context
maximusvitutus Aug 30, 2025
dafe2b6
feat: remove `InfoSection.visible` custom data property
kaljarv Sep 1, 2025
b98f4d9
feat: extend `Logger` into `Controller`
kaljarv Sep 1, 2025
ab38f47
feat[admin-app]: revamp job management UI and backend integration
maximusvitutus Sep 2, 2025
8dd01ac
refactor: job stores and monitoring
kaljarv Sep 28, 2025
7a62908
refactor: `UniversalDataWriter`’s methods for jobs
kaljarv Sep 28, 2025
e93f1fa
feat: remove past jobs sidebar from admin/jobs
kaljarv Sep 28, 2025
db60403
feat[backend]: Admin Job content type
kaljarv Sep 28, 2025
850021f
feat: inject `authToken` into `AdminContext` utility methods
kaljarv Sep 28, 2025
eef8b71
chore: fix linter errors
kaljarv Sep 28, 2025
339bb77
feat: require admin user on `/api/admin` routes
kaljarv Oct 1, 2025
8b327e2
"feat[llm]: add llm package that uses Vercel internally
maximusvitutus Oct 3, 2025
2dae1c4
feat[q-info]: add question-info package for generating question infor…
maximusvitutus Oct 3, 2025
97abd45
refactor[arg-cond]: use new Vercel-based llm package for llm calls
maximusvitutus Oct 3, 2025
19743a8
build[backend]: echo warning about missing .env
kaljarv Oct 5, 2025
8e3dd41
feat[llm]: add aborting functionality for object generation
maximusvitutus Oct 4, 2025
37fd205
feat[arg-cond]: use new llm package
maximusvitutus Oct 4, 2025
4c5874f
clean: remove debug logging occurring on every poll
maximusvitutus Oct 4, 2025
c275628
feat[llm]: send progress updates using controller.progress
maximusvitutus Oct 4, 2025
3a96f1b
clean: irrelevant comment fixes
maximusvitutus Oct 4, 2025
c41bbdd
feat[admin-app]: add typing for admin features' api routes
maximusvitutus Oct 4, 2025
bcac21f
feat[admin-app]: add question info generation feature
maximusvitutus Oct 4, 2025
9a79558
feat[packages]: add LLMPipelineMetrics and model to generic LLM result
maximusvitutus Oct 6, 2025
0eb3cef
fix[q-info]: use generic LLMPipelineResult for package output
maximusvitutus Oct 7, 2025
d7c1768
feat[arg-cond]: use generic LLMPipelineResult for package output
maximusvitutus Oct 7, 2025
e0a872f
clean[arg-cond]: delete unused file
maximusvitutus Oct 7, 2025
5d873a7
fix[llm]: update batch process after llm calls come back, not before
maximusvitutus Oct 7, 2025
d3ca4b2
feat: add generic operation metrics base type & llm metrics calculations
maximusvitutus Oct 20, 2025
85be288
feat[arg-cond]: use new result and input config types from llm package
maximusvitutus Oct 20, 2025
214967e
feat[q-info]: use new result and input config types from llm package
maximusvitutus Oct 20, 2025
be8f2ce
delete[old-llm-package]: remove unused, ad-hoc LLM package
maximusvitutus Oct 20, 2025
88fb9b7
chore: add yarn command to reload packages if changes are made to the…
maximusvitutus Oct 20, 2025
4b90c9f
chore: update yarn.lock
maximusvitutus Oct 20, 2025
4ad9fad
build[arg-cond][q-info]: update `tsconfig.json`
kaljarv Nov 13, 2025
1ee32ae
build: rename `llm-refactor` package to `llm`
kaljarv Nov 14, 2025
fd4fce0
build: hot-reload packages in development
kaljarv Nov 14, 2025
f0205c1
fix: use `LLMPipelineMetrics` in `StrapiData` type
kaljarv Nov 14, 2025
c9d325f
docs[q-info]: update README
kaljarv Nov 14, 2025
abe4f1b
feat[llm]: add fallback model configuration
maximusvitutus Nov 16, 2025
dafcb5d
tests[llm]: remove tests for empty configuration logic (not implemented)
maximusvitutus Nov 16, 2025
be19ca7
feat[admin-app]: add status 'aborted' for admin features
maximusvitutus Nov 17, 2025
9975470
feat[llm]: add output language as a common param
maximusvitutus Nov 17, 2025
4f9c130
feat[arg-cond]: use same runId for the same question's cons and pros
maximusvitutus Nov 17, 2025
6f22a66
chore: add minor todo comments
maximusvitutus Nov 17, 2025
eb9af21
feat[llm]: add prompt registry with output localization support
maximusvitutus Nov 17, 2025
1c00580
feat[q-info]: use new prompt registry & move prompt consts to .ts fro…
maximusvitutus Nov 19, 2025
8f881ab
fix: frontend container name in script
maximusvitutus Nov 19, 2025
62e6fba
feat[llm]: add localization instructions for all supported locales
maximusvitutus Nov 21, 2025
6deb812
feat[admin]: create language selector component
maximusvitutus Nov 21, 2025
5b5838e
feat[arg-cond]: update prompt yamls to conform to new prompt registry…
maximusvitutus Nov 22, 2025
6c371c7
feat[llm]: add no-op controller for testing
maximusvitutus Nov 22, 2025
554a283
fix[llm]: add prompt registry set up for features that use prompts
maximusvitutus Nov 22, 2025
9c59b92
fix[arg-cond]: add separate runIds for cons and pros
maximusvitutus Nov 22, 2025
0ebc2ac
feat[llm]: add better support for optional variables in prompt templates
maximusvitutus Nov 22, 2025
d3d338d
feat[arg-cond]: consolidate to prompt registry and 'app-shared' locales
maximusvitutus Nov 22, 2025
faaaf94
feat[admin-app]: save generated data from admin jobs
maximusvitutus Nov 22, 2025
ebc4bc5
fix: test expected hardcoded error string
maximusvitutus Nov 23, 2025
8cdc1db
fix: prompts' path resolution irrespective of usage environment
maximusvitutus Nov 23, 2025
6eaa0d5
refactor[q-info]: relocate types according to repo standards
maximusvitutus Nov 23, 2025
7205781
fix[llm]: use fallbackLocalization flag
maximusvitutus Nov 23, 2025
5390706
chore: add todo for testing fallback localization on arg-cond
maximusvitutus Nov 23, 2025
be07ca6
chore[q-info]: update readme.md
maximusvitutus Nov 23, 2025
eded58f
chore[arg-cond]: update readme
maximusvitutus Nov 23, 2025
b768f2a
chore: some comments
maximusvitutus Nov 23, 2025
1c27a19
fix[llm]: remove dumb if-else logic for fallback prompts
maximusvitutus Nov 23, 2025
0891d65
refactor[admin]: reduce boilerplate for aborting jobs
maximusvitutus Nov 23, 2025
f595440
chore[llm]: clarify todos
maximusvitutus Nov 23, 2025
0f39845
clean[q-info]: remove old yamls that are replaced by .ts constants
maximusvitutus Nov 23, 2025
c5c7477
build: call `build:shared` when starting `dev`
kaljarv Nov 30, 2025
a377ec6
feat: `ButtonWithConfirmation` and `ConfirmationModal` components
kaljarv Nov 30, 2025
62d75f0
chore: update translations
kaljarv Nov 30, 2025
d99da6a
refactor: handle `abortJob` within `JobDetails`
kaljarv Nov 30, 2025
9b1cf47
chore: apply lint
kaljarv Nov 30, 2025
157213a
refactor: use `ButtonWithConfirmation` for `performEmergencyCleanup`
kaljarv Nov 30, 2025
4e2e37a
refactor: `Select` component
kaljarv Nov 30, 2025
183e93d
refactor: `LanguageSelector` admin component
kaljarv Nov 30, 2025
6323ed8
refactor: `condenseArguments` and `generateQuestionInfo`
kaljarv Nov 30, 2025
bf64df1
chore: fix example code
kaljarv Nov 30, 2025
b701f39
chore: fix linter errors
kaljarv Dec 13, 2025
33ac493
chore[arg-cond][q-info]: fix unit tests
kaljarv Dec 13, 2025
a40c759
chore: replace `example.com` with `openvaa.org` in docs and tests
kaljarv Dec 13, 2025
386e11b
chore: fix translations tests primary locale
kaljarv Dec 13, 2025
7da40d4
fix: cache api route in `UNIVERSAL_API_ROUTES`
kaljarv Dec 13, 2025
43515c9
build: fix `dev:restart-frontend` script
kaljarv Dec 13, 2025
8a38a8d
fix: logout api route in `UNIVERSAL_API_ROUTES`
kaljarv Dec 13, 2025
e45b6ac
chore/fix: e2e tests
kaljarv Dec 13, 2025
578a618
docs: add info about reseeding mock data when testing
kaljarv Dec 13, 2025
f4ae82d
build: add `dev:start` script that does not watch for changes
kaljarv Dec 13, 2025
93ed535
refactor/docs: harmonize Svelte component documentation and type files
kaljarv Dec 14, 2025
38d3cc2
docs: details about Svelte component documentation
kaljarv Dec 14, 2025
135daaf
build: move Claude settings to non-local file
kaljarv Dec 14, 2025
aa6b06e
build: ignore local Claude settings
kaljarv Dec 14, 2025
6799758
docs: implement automated documentation generation system
github-actions[bot] Dec 14, 2025
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
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"permissions": {
"allow": ["Bash(yarn test:*)", "Bash(find:*)"],
"deny": [],
"ask": []
}
}
7 changes: 0 additions & 7 deletions .claude/settings.local.json

This file was deleted.

3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ GENERATE_MOCK_DATA_ON_INITIALISE=true
# Used only in development builds
GENERATE_MOCK_DATA_ON_RESTART=false

# LLM
LLM_OPENAI_API_KEY=""

# Frontend dependencies
# NB! If adding more such urls with different hosts on the server and client, please check whether /frontend/src/routes/[[lang=locale]]/api/cache/+server.ts needs to be updated accordingly
# Used to reach backend instance from a browser
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
branches:
- main
paths-ignore:
- '**.md'
- '**/*/.env.example'
- '.env.example'
- "**.md"
- "**/*/.env.example"
- ".env.example"
pull_request:
types:
- opened
Expand All @@ -17,12 +17,11 @@ on:
branches:
- main
paths-ignore:
- '**.md'
- '**/*/.env.example'
- '.env.example'
- "**.md"
- "**/*/.env.example"
- ".env.example"

jobs:

frontend-and-shared-module-validation:
runs-on: ubuntu-latest

Expand All @@ -40,10 +39,10 @@ jobs:
with:
node-version: 20.18.1
cache: "yarn"

- name: "Install all dependencies"
run: yarn install --frozen-lockfile

- name: "Build all shared modules"
run: yarn build:shared

Expand Down Expand Up @@ -100,7 +99,7 @@ jobs:

- name: "Install all dependencies"
run: yarn install --frozen-lockfile

- name: "Build all shared modules"
run: yarn build:shared

Expand Down Expand Up @@ -134,7 +133,7 @@ jobs:
uses: threeal/setup-yarn-action@v2
with:
version: 4.6

- name: Setup Node.js 20.18.1
uses: actions/setup-node@v4
with:
Expand All @@ -161,7 +160,7 @@ jobs:
run: yarn playwright install

- name: "Start OpenVAA"
run: yarn dev
run: yarn dev:start

- name: "Collect Docker logs on failure"
if: failure()
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
!.env.example
node_modules

# Claude Code local settings
.claude/*.local.json

# Yarn 4 without Zero-installs
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions

# Generated documentation
docs/generated/
typedoc.frontend.json
2 changes: 1 addition & 1 deletion backend/vaa-strapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"strapi": "strapi",
"test:e2e": "jest --forceExit --detectOpenHandles",
"test:unit": "vitest run ./src",
"generate:types": "strapi ts:generate-types"
"generate:types": "strapi ts:generate-types || echo 'Maybe you need to copy the .env file from the project root to backend/vaa-strapi?'"
},
"dependencies": {
"@aws-sdk/client-ses": "^3.741.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"kind": "collectionType",
"collectionName": "admin_jobs",
"info": {
"singularName": "admin-job",
"pluralName": "admin-jobs",
"displayName": "Admin Job",
"description": ""
},
"options": {
"draftAndPublish": false
},
"pluginOptions": {},
"attributes": {
"electionId": {
"type": "string",
"required": true
},
"jobId": {
"type": "uid",
"required": true
},
"jobType": {
"type": "string",
"required": true,
"minLength": 1
},
"author": {
"type": "email",
"required": true
},
"endStatus": {
"type": "enumeration",
"enum": [
"completed",
"failed",
"aborted"
]
},
"startTime": {
"type": "datetime"
},
"endTime": {
"type": "datetime"
},
"input": {
"type": "json"
},
"output": {
"type": "json"
},
"messages": {
"type": "json"
},
"metadata": {
"type": "json"
}
}
}
7 changes: 7 additions & 0 deletions backend/vaa-strapi/src/api/admin-job/controllers/admin-job.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* admin-job controller
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreController('api::admin-job.admin-job');
23 changes: 23 additions & 0 deletions backend/vaa-strapi/src/api/admin-job/routes/admin-job.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* admin-job router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::admin-job.admin-job', {
only: ['find', 'findOne', 'create', 'update'],
config: {
find: {
policies: ['global::user-is-admin']
},
findOne: {
policies: ['global::user-is-admin']
},
create: {
policies: ['global::user-is-admin']
},
update: {
policies: ['global::user-is-admin']
}
}
});
7 changes: 7 additions & 0 deletions backend/vaa-strapi/src/api/admin-job/services/admin-job.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* admin-job service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::admin-job.admin-job');
29 changes: 29 additions & 0 deletions backend/vaa-strapi/src/api/question/controllers/customdata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { updateCustomData } from '../../../util/updateCustomData';
import type { Data } from '@strapi/strapi';
import type { StrapiContext } from '../../../../types/customStrapiTypes';

export default {
/**
* Update the `Question`’s `customData` by merging the new data.
*/
async update(ctx: StrapiContext) {
const data = await updateQuestionCustomData(ctx);
ctx.response.status = 200;
ctx.response.body = { data };
}
};

function updateQuestionCustomData({
params,
request
}: StrapiContext): Promise<Data.ContentType<'api::question.question'>> {
console.error({ params });
const customData = request.body?.data;
if (!customData || typeof customData !== 'object')
throw new Error('[updateQuestionCustomData] No customData object provided.');
return updateCustomData({
collection: 'api::question.question',
documentId: params.id,
customData
});
}
19 changes: 19 additions & 0 deletions backend/vaa-strapi/src/api/question/routes/00-customRoutes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Contains the definitions for the `api::question.customData.update` action.
* NB. The filename starts with zeros so that it is matched before the core routes.
*/

import type { Core } from '@strapi/strapi';

export default {
routes: [
{
method: 'POST',
path: '/question/:id/update-custom-data',
handler: 'customdata.update',
config: {
policies: ['global::user-is-admin']
}
} as Core.RouteConfig
]
};
3 changes: 3 additions & 0 deletions backend/vaa-strapi/src/components/settings/access.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
},
"answersLocked": {
"type": "boolean"
},
"adminApp": {
"type": "boolean"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10011,6 +10011,9 @@
},
"answersLocked": {
"type": "boolean"
},
"adminApp": {
"type": "boolean"
}
}
},
Expand Down
Loading
Loading