Coastal dunes, in particular foredunes, support a resilient ecosystem and reduce coastal vulnerability to storms. In contrast to dry desert dunes, coastal dunes arise from interactions between biological and physical processes. Ecologists have traditionally addressed coastal ecosystems by assuming that they adapt to preexisting dune topography, whereas geomorphologists have studied the properties of foredunes primarily in connection to physical, not biological, factors. Here, we study foredune development using an ecomorphodynamic model that resolves the coevolution of topography and vegetation in response to both physical and ecological factors. We find that foredune growth is eventually limited by a negative feedback between wind flow and topography. As a consequence, steady-state foredunes are scale invariant, which allows us to derive scaling relations for maximum foredune height and formation time. These relations suggest that plant zonation (in particular for strand "dune-building" species) is the primary factor controlling the maximum size of foredunes and therefore the amount of sand stored in a coastal dune system. We also find that aeolian sand supply to the dunes determines the timescale of foredune formation. These results offer a potential explanation for the empirical relation between beach type and foredune size, in which large (small) foredunes are found on dissipative (reflective) beaches. Higher waves associated with dissipative beaches increase the disturbance of strand species, which shifts foredune formation landward and thus leads to larger foredunes. In this scenario, plants play a much more active role in modifying their habitat and altering coastal vulnerability than previously thought.