  This paper forms the first part of a series by the authors [GMV2,GMV3]
concerning the structure theory of nilspaces of Antol\'in Camarena and Szegedy.
A nilspace is a compact space $X$ together with closed collections of cubes
$C^n(X)\subseteq X^{2^n}$, $n=1,2,\ldots$ satisfying some natural axioms.
Antol\'in Camarena and Szegedy proved that from these axioms it follows that
(certain) nilspaces are isomorphic (in a strong sense) to an inverse limit of
nilmanifolds. The aim of our project is to provide a new self-contained
treatment of this theory and give new applications to topological dynamics.
  This paper provides an introduction to the project from the point of view of
applications to higher order Fourier analysis. We define and explain the basic
definitions and constructions related to cubespaces and nilspaces and develop
the weak structure theory, which is the first stage of the proof of the main
structure theorem for nilspaces. Vaguely speaking, this asserts that a nilspace
can be built as a finite tower of extensions where each of the successive
fibers is a compact abelian group.
  We also make some modest innovations and extensions to this theory. In
particular, we consider a class of maps that we term fibrations, which are
essentially equivalent to what are termed fiber-surjective morphisms by
Anatol\'in Camarena and Szegedy, and we formulate and prove a relative analogue
of the weak structure theory alluded to above for these maps. These results
find applications elsewhere in the project.
