... 前に => Before ... N4
Relationship before and after
... 前に => ... in front of, before N4
Relationship before and after
前に => before; in front of ~ N5
に代わって => instead of; replacing; on behalf of ~ N3
を前提に => On the premise of N1
Premise
手前 => considering; before; in front of; one’s standpoint N1
代わりに => instead of; as a substitute for​; in exchange for; in return for N3
~[前「まえ」]に => Before N/Vる(occurs/happens) N5
Time
当然だ/当たり前だ => natural; as a matter of course N2
[代「か」]わり => Not A, but B, B in place of A, Instead of A, B; In exchange for A, B N3
Comparison, Exchange