This project is a browser-based study tool. It is built with Vite, a fast build system that turns the source files into a simple static website you can run locally or upload to JATOS.
The instructions below are written for non web developers and include every command you need to type.
Vite is a tool that does two things:
- Development server: Starts a local website on your computer so you can test changes quickly.
- Production build: Creates a folder of static files (HTML, JS, CSS) that can be uploaded to servers like JATOS.
In this project, the production build is created in the dist/ folder.
- Node.js (includes npm)
- Git (optional, only if you want to clone the repository)
Check that Node.js and npm are installed:
node --version
npm --versionIf you already have the project folder, skip this step.
git clone https://github.com/FennStatistics/CAM_DataCollectionTool_2.git
cd cam-dct-vitenpm installStart the development server:
npm run devVite will print a local URL (usually http://localhost:5173). Open that in your browser.
This project uses a special build mode that injects jatos.js into index.html so JATOS can provide study data.
Run the JATOS build:
npm run build:jatosThe build output is in:
dist/
If you already have a running JATOS server, skip this step.
Download JATOS from the official site (https://www.jatos.org/Installation.html), unzip it, then run:
macOS / Linux:
cd /path/to/jatos
./start-jatos.shWindows (PowerShell):
cd C:\path\to\jatos
start-jatos.batOpen the JATOS UI in your browser (default is usually http://localhost:9000).
In the JATOS UI:
- Go to Studies.
- Click New Study.
- Give it a name and create it.
In your new study:
- Click New Component.
- Choose HTML as the component type.
- Upload the files from
dist/.
Important: upload the contents of dist/ (including index.html), not the dist/ folder itself.
In the component settings:
- Set the HTML file (entry point) to:
index.html
- Save the component.
In JATOS 3.8.x or higher:
- Open the study overview.
- Use the Study menu and choose Export.
- Download the
.jzipfile.
On the target JATOS server (internet-accessible):
- Sign in to that JATOS instance.
- Go to Studies.
- Choose Import Study and upload the
.jzipfile. - After import, open the study and run it.
- Study loads but JATOS features are missing: make sure you ran the JATOS build.
npm run build:jatosBlank page or 404 inside JATOS: you likely uploaded the
dist/folder itself. Upload the contents ofdist/instead (includingindex.html).Changes not showing up: rebuild and re-upload the
dist/files.
npm run build:jatosnpm install
npm run dev
npm run build
npm run build:jatos
npm run previewIf you use these materials, please cite the article (see CITATION.cff for machine-readable metadata):
Fenn, J., Gouret, F., Gorki, M., Reuter, L., Gros, W., Hüttner, P., & Kiesel, A. (2025). Cognitive-affective maps extended logic: Proposing tools to collect and analyze attitudes and belief systems. Behavior Research Methods, 57(6), 174. https://doi.org/10.3758/s13428-025-02699-y
BibTeX:
@article{fenn2025camel,
author = {Fenn, Julius and Gouret, Florian and Gorki, Michael and Reuter, Lisa and Gros, Wilhelm and H{\"u}ttner, Paul and Kiesel, Andrea},
title = {Cognitive-affective maps extended logic: Proposing tools to collect and analyze attitudes and belief systems},
journal = {Behavior Research Methods},
year = {2025},
volume = {57},
number = {6},
pages = {174},
doi = {10.3758/s13428-025-02699-y},
url = {https://doi.org/10.3758/s13428-025-02699-y}
}