I used to work in a soda factory as a teen. We made syrup, and then the bottling machine simply added the syrup to the carbonated water. I've made soda from Kool-Aid and sugar, added to a clean soda bottle with a chip of dry ice. You have to release the pressure every twenty minutes or so to keep the bottle from bursting. I've also added vanilla and sugar to carbonated water to make cream soda.
A syrup made from stepped wintergreen leaves and sugar, plus a little brown sugar, added to carbonated water gives you a flavor very close to root beer.
Orange peel steeped in water and made into a syrup gives you orange soda. Add a little lemon peel and you get a flavor similar to Mountain Dew. Lemon and lime peels give you 7-Up flavor. I could go on, but I think you get the idea.
You can make your own syrups with grape juice, cherry, cranberry, apple, blueberry, raspberry, strawberry, etc. Let your imagination go wild. Have fun with it.
Try coconut and lime juice/peel for a Pina Colada soda flavor.
Seeeeeeya; Chief Longwind of the North