Перейти к основному содержимому

task-bank → storefront

Зачем нужно

Task-bank отдаёт storefront public-safe projection задач, тем, источников, тегов и related blocks для открытого каталога. Storefront отвечает за rendering, SEO delivery, lead capture, analytics cookies and marketing blocks.

Public catalog не является отдельной базой задач.

Стороны

  • источник: task-bank
  • потребитель: storefront
  • вид: online read + event-driven projection updates

API

GET /api/v2/task-bank/public/tasks
GET /api/v2/task-bank/public/tasks/{taskId}
GET /api/v2/task-bank/public/topics/{path}
GET /api/v2/task-bank/public/sources/{path}
GET /api/v2/task-bank/public/tags/{slug}
GET /api/v2/task-bank/public/search?q=...

URL rules

URLНазначение
/tasksкаталог
/tasks/<taskId>canonical task page
/tasks/topic/<path>topic landing/list
/tasks/source/<path>source landing/list
/tasks/tag/<slug>tag page
/tasks/search?q=search, noindex follow

Canonical задачи: /tasks/<taskId>. Topic/source path не входит в canonical URL задачи.

Public projection fields

Storefront получает:

  • task id;
  • public statement;
  • subject;
  • difficulty;
  • age/class range;
  • primary topic;
  • secondary topics collapsed;
  • publishable source label/path;
  • tags;
  • solution visibility according to policy;
  • related task links;
  • SEO metadata.

Storefront не получает:

  • hidden answer key;
  • closed competition tasks;
  • embargoed sources;
  • private organization tasks;
  • moderation comments;
  • teacher-only notes;
  • raw attempts;
  • hidden rubrics.

События

messageTypeКогда
task-bank.public_projection.updatedpublic-safe projection задачи изменилась
task-bank.problem.retiredзадача больше не должна попадать в новые public lists
task-bank.problem_relation.confirmedможно обновить related blocks

Ошибки

СценарийПоведение
задача не public404 для public endpoint
source license restricted/unknownзадача не попадает в public projection без explicit approval
search query creates unstable filtered pagestorefront marks page noindex follow
projection requested hidden key/teacher notes403 and audit

Безопасность

  • public payload allowlist-first;
  • answer keys, hidden solutions, teacher notes and rubrics excluded by default;
  • competition embargo and private organization visibility checked before projection;
  • source license/status checked before publication;
  • access to non-public preview requires short-lived token and audit.

Связанные документы