Open Logic Project

See Open Logic Project Builds for a 1,000 page book on math fundamentals. From the home page:

The Open Logic Project is a collection of teaching materials on mathematical logic aimed at a non-mathematical audience, intended for use in advanced logic courses as taught in many philosophy departments. It is open-source: you can download the LaTeX code. It is open: you’re free to change it whichever way you like, and share your changes. It is collaborative: a team of people is working on it, using the GitHub platform, and we welcome contributions and feedback. And it is written with configurability in mind.

And if you like the Open Logic Project you might also like The Stacks project, an open source textbook and reference work on algebraic geometry.