Microbial communities play profound roles in the environment, agriculture and human health. To exploit their potential for applications, a fundamental prerequisite is to decipher the basic rules of community organization in space and time. We aim to address the challenge using a bottom-up approach that integrates experimental synthetic biology with biophysical modeling. Recently, we developed a computational prototype that enables mechanistic simulation of microbial communities. We also explored how the mode of cellular social interaction and the spatial scale of interaction contribute to microbial assemblages using experimental ecosystems. With engineered cellular interactions, we further demonstrated the utility of synthetic ecosystems for metabolic engineering purposes. Our studies provide insights into the assembly of natural communities and illustrate the potential of synthetic consortia for practical purposes.