The main aim of the present work is to arrive at a mathematical theory close to the historically original conception of generalized functions, i.e. set theoretical functions defined on, and with values in, a suitable ring of scalars and sharing a number of fundamental properties with smooth functions, in particular with respect to composition and nonlinear operations. This is how they are still used in informal calculations in Physics. We introduce a category of generalized functions as smooth set-theoretical maps on (multidimensional) points of a ring of scalars containing infinitesimals and infinities. This category extends Schwartz distributions. The calculus of these generalized functions is closely related to classical analysis, with point values, composition, non-linear operations and the generalization of several classical theorems of calculus. Finally, we extend this category of generalized functions into a Grothendieck topos of sheaves over a concrete site. This topos hence provides a suitable framework for the study of spaces and functions with singularities. In this first paper, we present the basic theory; subsequent ones will be devoted to the resulting theory of ODE and PDE.