How Medina was built: The blueprint of building a society