  In this paper we develop a new groupoid-based structure theory for the class
of regular $*$-semigroups. This class occupies something of a `sweet spot'
between the important classes of inverse and regular semigroups, and contains
many natural examples. Some of the most significant families include the
partition, Brauer and Temperley-Lieb monoids, among other diagram monoids.
  Our main result is that the category of regular $*$-semigroups is isomorphic
to the category of so-called `chained projection groupoids'. Such a groupoid is
in fact a triple $(P,\mathcal G,\varepsilon)$, where:
  $\bullet$ $P$ is a projection algebra (in the sense of Imaoka and Jones),
  $\bullet$ $\mathcal G$ is an ordered groupoid with object set $P$, and
  $\bullet$ $\varepsilon:\mathscr C\to\mathcal G$ is a special functor, where
$\mathscr C$ is a certain natural `chain groupoid' constructed from $P$.
  Roughly speaking: the groupoid $\mathcal G=\mathcal G(S)$ remembers only the
`easy' products in a regular $*$-semigroup $S$; the projection algebra $P=P(S)$
remembers only the `conjugation action' of the projections of $S$; and the
functor $\varepsilon=\varepsilon(S)$ tells us how $\mathcal G$ and $P$ `fit
together' in order to recover the entire structure of $S$. In this way, we
obtain the first completely general structure theorem for regular
$*$-semigroups.
  As a consequence of our main result, we give a new proof of the celebrated
Ehresmann--Schein--Nambooripad Theorem, which establishes an isomorphism
between the categories of inverse semigroups and inductive groupoids. Other
applications will be given in future works.
  We consider several examples along the way, and pose a number of problems
that we believe are worthy of further attention.
