Terrarium with clay soil?

So the basic setup for a terrarium, as I understand it, is that you have a drainage layer of rocks/pebbles so that excess water doesn't saturate the soil, then you have a layer of porous soil, and on top of that you have bark/leaf litter.

I want to try and make a terrarium that reflects my local environment and uses plants/inverts gathered locally, but our soil is very clay heavy, and I'm wondering if that would make an enclosed ecosystem feasible.

I'm wondering if anyone has experience making a terrarium with different soil types, or has any input on my idea.