It's common for aloes to have trouble standing upright after being potted. Prop them with sticks or rocks until their roots take hold.
Here is a thread in which many members discuss their succulent & cactus mixes.
https://garden.org/thread/go/1...
Notice they range from simple to specialized, but what all have in common is they are fast draining. I suggest reading as many of those posts as you want to get a sense of it.
I'm not a specialty grower and usually use what I have on hand, but roughly I combine equal parts bagged cactus mix, coco coir, and pumice or perlite. Sometimes just ~50/50 cactus mix and pumice or perlite. I prefer pumice but it's not always as available as perlite (which annoyingly floats to the top of pots). Btw, do not put a layer of stones or gravel in the bottom of the pot. I'm neither consistent nor scientific about proportions but because I have numerous outdoor pots, I've sort of gotten a feel for it.
With a free-draining mix, you'll water more often than you might be accustomed to, but the good part is that it's very difficult to overwater, and that is what kills most indoor aloes (water-retentive soil never fully dries down below and eventually rots the roots). If your plant is indoors, carry the pot to the sink and water thoroughly until the growing medium is completely saturated and water has run through several times, then let it drain in the sink before putting the pot back into its saucer. When I put my plants outside for spring to fall, I rarely use saucers. You can add diluted fertilizer every few waterings.