Skip to content

valtermedeiros/stcw-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stcw-data

Public dataset for the STCW Basic Safety Training quiz (Portugal / DGRM context).
This repository is the source of truth for questions consumed by the web app (stcw private app repo uses the GitHub API to read/write here).


English

Layout

  • stcw/index.json — Registry of exams and modules. Each module points to a JSON file path.
  • stcw/<language>/<exam-slug>/modules/<module-id>.json — One file per STCW table/module, containing an array of questions.

Each module file looks like:

{
  "id": "a-vi-1-1",
  "module_name": "Técnicas pessoais de sobrevivência (Tabela A-VI/1-1)",
  "table_code": "A-VI/1-1",
  "questions": [
    {
      "id": "a-vi-1-4-q21",
      "question": "",
      "options": ["", "", "", ""],
      "correct_answer": 0
    }
  ]
}

correct_answer is the 0-based index into options.

Question ids (unique)

Each question id is a string and must be unique across the entire repository (all modules and exams), not only within one file.

  • Canonical pattern: {moduleRootId}-q{n} where moduleRootId is the module JSON root id (e.g. a-vi-1-4) and n is a positive integer (e.g. a-vi-1-4-q3).
  • When fixing wording, keep the same id. When adding a question, use the next free n in that module (e.g. after …-q40 use …-q41).
  • The web app validates ids on load; Pull Requests that break uniqueness or the pattern will fail checks.

Contributions without the admin app

Anyone can propose changes on GitHub (fork → branch → PR). The quiz site also exposes a public /contribuir page (Contributions hub) with a short guide, a simple form to draft JSON, and a list of open Pull Requests on this repo. Maintainers use the private app’s /admin tab “Contribuições (PRs)” to track the same queue.

Current scope (Basic Safety — four tables)

Module id STCW table Topic (PT)
a-vi-1-1 A-VI/1-1 Técnicas pessoais de sobrevivência
a-vi-1-2 A-VI/1-2 Prevenção e combate a incêndios
a-vi-1-3 A-VI/1-3 Primeiros socorros básicos
a-vi-1-4 A-VI/1-4 Segurança pessoal e responsabilidades sociais

More exams or modules can be added later by extending stcw/index.json and adding new module files under the same pattern.

How to collaborate

  1. Fork or clone this repository.
  2. Create a branch, edit JSON (keep valid JSON and consistent id / paths in the index).
  3. Open a Pull Request with a short description of your changes (fixes, new questions, typos).
  4. Prefer small, focused PRs (e.g. one module or one exam at a time).

Anyone can pull this repo locally to work offline or to propose changes—no access to the private app repo is required to improve the data.

The quiz website exposes a public /contribuir page (contributions hub) with a guide, a simple JSON helper, and open Pull Requests for this repository. Maintainers can track the same PR list from the private app’s /admin tab “Contribuições (PRs)”.

Syncing with the web app

The quiz app reads only from this repository via the GitHub API. Edit JSON here (or via the app’s /admin when configured) and push; there is no bundled question fallback in the app anymore.


Português (pt-PT)

Estrutura

  • stcw/index.json — Índice dos exames e módulos. Cada módulo indica o caminho do respetivo ficheiro JSON.
  • stcw/<idioma>/<slug-do-exame>/modules/<id-modulo>.json — Um ficheiro por tabela/módulo STCW, com a lista de perguntas.

Cada ficheiro de módulo segue o formato acima (inglês): id, module_name, table_code (opcional mas recomendado), questions com id string único em todo o repositório (padrão {id-do-módulo}-q{n}) e correct_answer como índice base 0 em options.

O site público inclui /contribuir para ajudar quem não edita JSON no terminal; os PRs abertos aparecem lá e no separador de contribuições do /admin (app privada).

Âmbito atual (Segurança básica — quatro tabelas)

As quatro linhas da tabela na secção em inglês correspondem aos módulos do Curso de Segurança Básica alinhados com as tabelas A-VI/1-1 a A-VI/1-4.

Como colaborar

  1. Fork ou clone deste repositório.
  2. Cria um branch, edita os JSON (mantém JSON válido e coerência com o índice).
  3. Abre um Pull Request com uma descrição clara (correções, novas perguntas, ortografia).
  4. Preferência por PRs pequenos (por exemplo um módulo de cada vez).

Qualquer pessoa pode fazer pull deste repositório para trabalhar offline ou propor melhorias—não é necessário acesso ao repositório privado da aplicação para contribuir com dados.

Sincronizar com a app

A aplicação lê apenas este repositório via API GitHub. Edita os JSON aqui (ou pelo /admin da app) e faz push.


Licence / licença

Unless stated otherwise, content is contributed for use with the STCW quiz project.
Add a LICENSE file to this repo if you want explicit terms (e.g. CC BY-SA for text).

About

A JSON database for the STCW quizz app (pt-PT focused only).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors