Likhten, the cause of ammonia and nitrate is fish poo, snail poo, fishfood, crab poo, etc.
The bacteria in your sand and rock need time to grow and multiply by being fed: every time you add a critter, your sandbed will be a little overwhelmed, then let a few bacteria more grow, deal with it, and expand its capacity to handle poo.
This happens with every snail you add, every hermit, every individual fish: the sandbed takes it up, adds more bacteria, and copes.
That's why you add only your 'cleaning crew' first: they're pretty tolerant of bad conditions, and their poo will make the sandbed 'grow'.
Then you quarantine a fish---a very small fish---for a few weeks in a small bare cheap tank, being sure he doesn't bring ich into your tank [do this, and you'll thank me when you read all the threads from people who just dumped their first fish straight into their tank]. When he goes in, his poo will make the sandbed grow a bit again. By this time, you've quarantined your second fish: and by the time he gets there, the sandbed will be increasingly capable of handling his output.
Never overfeed. Fish will always beg for food even if they're stuffed: feed once a day until you get a sense how much is enough.
Note my mottos: make haste slowly. Go only as fast as your tank can handle.
Don't make any changes for a few days: let your cleaning crew make their living off the algae that's surely starting up.
[A fish in a quarantine tank can be fed as needs to be, because you're going to test his water daily and scrub that filter out every few days.]