Psalm 11:3 (here @ Bible Gateway) sheds some light on this. In the context David is under attack, the wicked are loading bows with arrows with which to fire at him. Note the response. If the foundation is destroyed there is little hope.
There are seemingly two elements to the foundation. First, Christ (1 Corinthians 3:11 (here @ Bible Gateway)). Second, the Word of God (John 8:31 – 32 (here @ Bible Gateway)), if we do not abide in His Word we are not disciples. Further, if we do not abide we do not have with which to fight (Ephesians 6:10 – 20 (here @ Bible Gateway)).
It may not be a stretch to suggest that if we do not build those foundational elements into our communities, they will fail.