# Context and Scope

# Business Context

Wikibase Client business context diagram

Client

Provides features to a MediaWiki installation.

Editor

A MediaWiki editor uses features provided by Client in MediaWiki to connect pages to Repository Items and use structured data from a Repository in wikitext.
The editor may also choose to edit data held within the repository directly from the Client.

Repository

The Client pulls data from the Repository, as well as updating the repository with relevant changes.

# Technical Context

Wikibase Client technical context diagram

The majority, if not all, of the Client system exists within MediaWiki as extensions.
MediaWiki is not represented to keep things simple.

internet / https

APIs and UIs provided by MediaWiki that Client adds features to are contactable over the internet via https.

Both users and other systems use these APIs.

php / sql

Client pulls data from the Repository directly from the SQL database using a connection in PHP and shared PHP data access code.

php / job queue

Both Client and Repository have MediaWiki job queues, and they both "send messages" via these job queues.

# Deepdive Context

While we were still figuring out how to use the arc42 documentation model lots of diagrams were created.
The diagram below was "technical context" but probably goes too deep, but is kept here for reference until its content is represented elsewhere (most likely in building block views)

Wikibase Client is implemented as a collection of MediaWiki extensions.
These are "plugins" (= extensions) that live inside MediaWiki and add functionality to it, which is reflected in this context diagram by embedding the Wikibase Client subsystem into a higher-level MediaWiki application.
See further details on this decision in the Solution Strategy section.

Wikibase Client old technical context diagram

Component Description
Lua/Parser function Lua bindings or parser functions invoked through Wikitext to embed Entity data in Wiki articles
ChangeHandler Receives notifications to update and purge pages when an Item is changed on the Repo
UpdateRepoHookHandler Notifies the Wikibase Repository to update the connected Item when a page is moved or deleted
Data Bridge A frontend component enabling Repository edits on the Client via the Repository API
Special Pages User interfaces for viewing Entity meta data. For a full description see the term Special Pages in the Glossary
APIs WikibaseClient's actions on the MW Action API (opens new window) exposing Entity (meta) data
Usage Tracking Tracks which Repository Entities are referenced on which wiki pages, and how.
ArticlePlaceholder Special Pages TBA
ArticlePlaceholder Search Hook Handler TBA