Starting from the largest scales, I will first describe how the cosmic web is woven across cosmic time into a gigantic bubble-like tapestry made of nodes, filaments, walls and voids. A particular emphasize will be put on the geometry and connectivity of this cosmic foam. Recent theoretical works aiming to precisely model the Universe on those mildly non-linear scales will be presented. In particular, I will identify a regime where large-deviation theory can be successfully implemented to predict the so-called count-in-cells statistics and describe promising applications for future galaxy surveys.
The second part of the talk will focus on the birth and evolution of haloes and galaxies within these large cosmic highways. The highly anisotropic galactic environment set by the cosmic web will be shown to play a significant role in shaping them, an effect inducing large-scale galaxy alignments that are difficult to model but represent an important contamination for weak lensing experiments.