Making sure that all species inside of an aquarium can live peacefully, or can live with some aggression (but have spots to hide, and test their limits with other species) is key to providing a happy environment to see their natural behaviors. Without that, you can end up having a tank full of species that might not align at all, which can end up in the species fighting, becoming ill from being too stressed within their tank, or at worst - them being killed due to them being too passive against a more aggressive species (or actual food for the bigger species). Below we have provided some good points in order to follow to make sure that you are adding the correct species you want into the same community tank.
Research Before Purchasing
In many cases, species can be very timid, shy, or have completely different diet requirements. A very common example of this is the well-known algae eater (Chinese Algae Eater) that is known to eat algae when it's a juvenile and is very timid/shy around other fish, however, once it matures into an adult this fish can get up to 12" inches (30.48" centimeters) long, requires a more meaty based diet compared to algae, and is very territorial around a space inside of their habitat. Make sure that you go through a few known reliable sources to learn more about the species in question, and do not rely on just one person's experience as species can have wildly different temperaments between individuals.
Planning for Adult Size
While deciding what you want to stock with, ideally one should make sure that they go over the requirements of a species while it is a juvenile (common size when they are sold in stores, or online retailers), and while it also is an adult. Sadly, this is in a vast majority of species sold are in the early-middle size of their adult size, and this can change rapidly dependent on the lifespan of the fish (normally, the longer the lifespan the slower the growth is from juvenile to adult size within the same conditions). Always making sure to have an aquarium that can not only handle what you want but also handle all of the stocking once they reach their adult size is critical (unless you plan to upgrade a few years later to adjust for the size difference they may have).
Centralizing on a Region
Although this may only apply to more community-mixed species (for example, cichlids), make sure to focus on a single region in order to provide the best water parameters, habitat decor, and species are known to co-exist without having any issues with accidentally having a predator and prey situation. Additionally, in some cases, fish that are from different regions may require completely different diet needs and might be more skittish when it comes to seeing larger (or more colorful) species than they are accustomed to naturally. In our case for cichlids, this may also play a huge factor in the activity of the species (many South American species are slower moving than African species) or their normal behavior when interacting near other species (some may view being too close as aggression, or this might cause issues where some species might require a hierarchy but others may not understand what a hierarchy is at all).
Checking for Breeding Possibilities
Many fish sold are normally not labeled or separated by their gender (some that are common, include guppies due to their unique coloration) and this can cause issues when you suddenly see eggs/fry within your aquarium. Although many species do not provide any parental care after the fry has been free-swimming, there are a handful of known species (cichlids) that will become very aggressive in defending their fry from anything getting anywhere close to them. This can be an issue if they stake out a large portion of the aquarium, and can cause aggression issues with other species that might take this as a threat (or might cause bullying issues from species that don't understand the breeding behavior of these species).
Please note that some species' temperament may vary from one individual to another, so for example one example might be extremely passive and another extremely aggressive - ALWAYS have a backup plan in mind in case one species do not align nicely with the rest (whether this is adding them to another spare tank, returning them to the store, or giving them away to another responsible aquarium hobbyist).