The currently deployed web app built using Laravel.
toolforge contains documentation and resources for deploying the web app.
Question generation is done using Laravel jobs.
For the primary questions (depicts), checkout the spec folder the the yaml that is used to generate the questions.
To get the dependencies you'll need to do a composer install...
composer installIf you have docker you should be able to use sail to run the development system.
./vendor/bin/sail up -d
npm run watchOn first setup you'll need to create the databases.
./vendor/bin/sail artisan migrateYou can then generate questions using the YAML that is on commons in the queue...
https://commons.wikimedia.org/wiki/User:Addshore/wikicrowd.yaml
./vendor/bin/sail artisan job:dispatchNow GenerateDepictsQuestionsFromYamlYou can also apply an item filter, and generate questions in the same process...
./vendor/bin/sail artisan job:dispatchNow GenerateDepictsQuestionsFromYaml Q133585 "" 1 trueAnd also manually generate specific questions...
./vendor/bin/sail artisan job:dispatchNow GenerateDepictsQuestions "Bicycles" "[\"foo\",\"bar\"]" "/(Videos)/i" Q11442 "Bicycle (pedal-driven two-wheel)" 10 trueThen find the site at http://localhost
In order to have the API fully setup you'll need to make your own .env file, including your own mediawiki oauth details.
You can run basic php linting:
composer run lintYou need to ssh into the tool, and then run ./src/toolforge/update.sh.
