Preheat oven to 425ºf.
Shred the sweet potatoes (peeling the sweet potato first is optional). I do this in my food processor, and it takes seconds.
Coat the bottom of a baking dish with 1 teaspoon olive oil.
Add the sweet potatoes, and lightly season with sea salt and black pepper.
Cover tightly with foil, and bake for 30 minutes.
While the sweet potatoes are baking, thinly slice the onion, and add it to a frying pan with 2 teaspoons of olive oil. Cook over medium low heat, stirring occasionally, until the onions have softened. Season with sea salt. If they seem dry, rather than adding more oil, add a few tablespoons of water. Set aside when the onions are very soft and caramelized.
Beat the eggs, and mix in thawed spinach (or chopped fresh spinach), parmesan, and spices.
When the sweet potatoes have finished cooking, remove the baking dish, and let cool for 5 or 10 minutes.
After it's cooled down a bit, loosen the foil. Use a dish towel to protect your hand from the heat, and compress the sweet potatoes to form a crust. I allowed mine to cool for a bit longer so that I could form the crust up the sides of my baking dish as well, and make the crust more uniform across the bottom-- hard to do when it's very hot!
Once the crust has been formed, add the egg mixture. Top the egg mixture with caramelized onions.
Cover the dish tightly with foil, and bake at 425ºf for another 20 minutes.
Remove the foil, and lower the oven temperature to 320ºf. Bake for another 10-15 minutes, depending on your oven, until the eggs are firm in the center.
Sprinkle with extra parmesan.