  We investigate geometric aspects of double field theory (DFT) and its
formulation as a doubled membrane sigma-model. Starting from the standard
Courant algebroid over the phase space of an open membrane, we determine a
splitting and a projection to a subbundle that sends the Courant algebroid
operations to the corresponding operations in DFT. This describes precisely how
the geometric structure of DFT lies in between two Courant algebroids and is
reconciled with generalized geometry. We construct the membrane sigma-model
that corresponds to DFT, and demonstrate how the standard T-duality orbit of
geometric and non-geometric flux backgrounds is captured by its action
functional in a unified way. This also clarifies the appearence of
noncommutative and nonassociative deformations of geometry in non-geometric
closed string theory. Gauge invariance of the DFT membrane sigma-model is
compatible with the flux formulation of DFT and its strong constraint, whose
geometric origin is explained. Our approach leads to a new generalization of a
Courant algebroid, that we call a DFT algebroid and relate to other known
generalizations, such as pre-Courant algebroids and symplectic nearly Lie
2-algebroids. We also describe the construction of a gauge-invariant doubled
membrane sigma-model that does not require imposing the strong constraint.
