A developer has secured a key approval for a project that would bring 50 new apartments and commercial space to Dunellen’s growing downtown.