The document
is a textbook that leads from basics of category theory and algebra to a discussion of schemes, algebraic spaces and algebraic stacks.