I've been reading through Farb and Margalit's book on the action of the mapping class group on Teichmuller space to get a moduli space. This is a very topological/geometric construction, looking at hyperbolic surfaces and homeomorphisms. Specifically, $T(S)=(X,h)/\sim$ for $S$ closed orientable of genus $g\geq 2$, $X$ a hyperbolic surface, and $h$ an op homeomorphism, where $\sim$ is istomopy/homotopy.
I would like to extend this in an algebraic way, i.e., thinking about it as an algebraic stack, or looking at the moduli space of smooth algebra curves, or seeing that its compactification is both a projective algebraic variety and an augmented $T(S)$. Are there any references that build up the algebra from the topology? I've only seen algebraic geometry textbooks talk about the algebra, and then just claim that it coincides with the Teichmuller theory approach. Thanks.