  This is the first in a series of papers that deals with duality statements
such as Mukai-duality (T-duality, from algebraic geometry) and the Baum-Connes
conjecture (from operator $K$-theory). These dualities are expressed in terms
of categories of modules. In this paper, we develop a general framework needed
to describe these dualities. In various geometric contexts, e.g. complex
geometry, generalized complex geometry, and noncommutative geometry, the
geometric structure is encoded in a certain differential graded algebra. We
develop the module theory of such differential graded algebras in such a way
that we can recover the derived category of coherent sheaves on a complex
manifold. In this paper and ones to follow we apply this to stating and proving
the duality statements mentioned above. After developing the general framework,
we look at a (complex) Lie algebroid $\A\to T_\cx X$. One can then consider our
analogue of the derived category of coherent sheaves, integrable with respect
to the Lie algebroid. We then establish a (Serre) duality theorem for
"elliptic" Lie algebroids and for noncommutative tori.
