Heat coconut oil in a large pot over medium heat. Add onion and cook until softened, about 5 minutes.
Add garlic and ginger, cook for 1 minute until fragrant.
Stir in curry powder, cumin, and red pepper flakes. Cook for another minute.
Add sweet potatoes, chickpeas, diced tomatoes, and coconut milk. Bring to a boil, then reduce heat and simmer for 20-25 minutes until sweet potatoes are tender.
Stir in spinach and cook until wilted, about 2 minutes.
Season with salt to taste.
Serve over rice and garnish with fresh cilantro.