The Dirac equation can be derived basically "directly" from the Representation theory of the Lorentz group for the spin half representation, this is shown for example at Physics from Symmetry by Jakob Schwichtenberg (2015) 6.3 "Dirac Equation".
The Diract equation is the spacetime symmetry part of the quantum electrodynamics Lagrangian, i.e. is describes how spin half particles behave without interactions. The full quantum electrodynamics Lagrangian can then be reached by adding the internal symmetry.
As mentioned at spin comes naturally when adding relativity to quantum mechanics, this same method allows us to analogously derive the equations for other spin numbers.
Bibliography:
- Video 2. "Quantum Mechanics 12a - Dirac Equation I by ViaScience (2015)" at youtu.be/OCuaBmAzqek?t=743
- www.youtube.com/watch?v=zM-Lc16nyho&list=PL54DF0652B30D99A4&index=66 "L3. The Dirac Equation" by doctorphys
- Video 6. "Dirac equation for the electron and hydrogen Hamiltonian by Barton Zwiebach (2019)"