3 Answers
3

Try Steven Weinbergs comprehensive The Quantum Theory of Fields (Vol. 1, "Foundations"). He follows a very systematic approach from "first principles", i.e. from Wigner's classification of unitary irreducible representations of the Poincaré group, over free fields for different mass/spin configurations (including spin 1 and 1/2, which in different formulation lead up to the Klein-Gordon and Dirac equations) to perturbation theory and Lagrangian densities (and lots more).

If you're interested in a more compact treatment of the "first principles" part only (but not Lagrangian densities!), plus theorems that can be proven as a direct consequence of them, such as PCT or spin/statistics, the standard textbook/primer of mathematical QFT is Streater/Wightman, PCT, spin and statistics, and all that.

The "first principle" for any Lagrangian is the corresponding equation. If you advance, for any particular reason, an equation, you may construct its Lagrangian knowing the structure of the Lagrange equations:$$\frac{d}{dt}\frac{\partial L}{\partial \dot {\phi}}=\frac{\partial L}{\partial {\phi}}$$