Data files used by Learning Studio, so they can be updated and maintained independently from the app code.
data/areas.jsondata/questions-fdl.jsondata/questions-ipc.jsondata/questions-logica1.jsontest-data/areas-mcq-tests.jsontest-data/questions-mcq-tests.jsontest-data/questions-logica1.jsontest-data/questions-ipc.jsontest-data/questions-fdl.json
Each JSON file includes:
schemaVersion(integer): bump only when the JSON shape changes.updatedAt(ISO date): bump when content changes.
- Data is static and public.
- Each questions file includes metadata (
area,type,shortName) and aquestionsarray.- Each item in
questionsincludes:section(string)number(integer)question(string)options(array of strings)answer(string)explanation(string)
- Each item in
- Script:
scripts/deploy-data.sh - What it does:
- syncs
data/tos3://studio-data.humblyproud.com/ - creates a CloudFront invalidation only for
/studio-data/*
- syncs
- Install dependencies:
npm install
- Serve production-like data:
npm run dev:data- URL:
http://localhost:4173
- Serve stable test data:
npm run dev:data:test- URL:
http://localhost:4174
- Validate language wiring and translation coverage:
npm run audit:lang
- Fail when translation coverage is below threshold:
npm run audit:lang:strict
- Folder:
scripts/ - Python scripts are managed as a standalone project with
scripts/pyproject.toml. - Install with dependency groups so future scripts can add their own requirements without conflicts.
- Purpose: translate JSON string values while preserving JSON structure.
Setup:
cd scriptspython3 -m venv .venvsource .venv/bin/activatepip install -e ".[translate]"
API key (no manual export required):
- Create
scripts/.env.translate(gitignored) with your key:DEEPL_API_KEY="<your-key-here>"
- The script auto-loads, in this order:
scripts/.env.translatescripts/.env
- Optional override:
--env-file /absolute/or/relative/path/to/envfile
Run:
python translate_json.py --in ../data/questions-ipc.json --out ../data/questions-ipc-en.json --source es --target enpython translate_json.py --in ../data/questions-ipc.json --out ../data/questions-ipc-ca.json --source es --target ca
Optional installed entrypoint (after pip install -e ".[translate]"):
translate-json --in ../data/questions-ipc.json --out ../data/questions-ipc-en.json --source es --target en