Welcome to the forum!
Glad you joined us!
Like any other animal or a person, they need a balanced diet: protein, fats, fiber, vitamins, minerals, amino acids, and whatever else. They can live and even grow if they are missing certain things in the quantities and ratios the need, but they really won't thrive. You can get health or developmental problems. The commercial feed contains what they need to grow and develop if that is all they eat. That really needs to be the main part of what they eat. There is nothing wrong with giving them treats on the side, but those treats need to be limited to about what they can clean up in 10 to 20 minutes so you don't upset that balanced diet. And if you give treats, they really need grit.
If you have feed, you will have rodents. There are different strategies to deal with this, but you will have them around. I strongly suggest storing the feed in a closed metal container. Mice and rats can and will chew through plastic containers. I know that from experience.
Some people pick up the feed at the end of the day to reduce this exposure. I've seen plenty of mice during the day. Also, the chickens will spill feed onto the litter. This alone will attract rodents. I do not consider picking it up at night to be a perfect solution, but it can help. I find if I feed pellets instead of mash or crumbles, the chickens clean up more of it, but some still gets spilled and left behind.
Chickens do eat mice. They love them. But my chickens do not spend all day in the coop and they cannot see at night. Frankly, mice are usually too quick for mine to catch many of them anyway. They'll get a few, but they don't really control the problem. And that is only mice. Rats are too big.
Some people feed in the run instead of in the coop to keep the rodent problem out of the coop. But you might find that you feed a lot of wild birds doing this. Wild birds can eat a lot of expensive feed.
As others mentioned, hungry barn cats can really help. if you are in a situation where that is an option.
Good luck, and again