Grind the whole spices to a fine powder in a spice grinder, or use a pestle and mortar.
Mix with the cayenne pepper and turmeric.
Heat 3 tablespoons of the coconut oil in a wide, shallow pan.
Add the onion and season lightly.
Cover and cook over a low heat for 10 minutes until nicely soft but not browned.
Add the garlic, ginger and chilli, cover and cook for 2-3 minutes.
Stir in the ground spices and cook for 2 minutes more.
Add the coconut milk, cinnamon stick, sugar, lime juice, stock and butternut squash.
Cover and simmer gently for 10 minutes, stirring now and then.
Add the green beans, cover and simmer for a further 10 minutes or until the butternut squash is just tender.
Meanwhile, heat the remaining tablespoon of coconut oil in a frying pan and fry the red peppers for 4-5 minutes until just soft.
Stir the fried peppers, tomato quarters, kidney beans and spinach into the curry.
Cover and simmer for 2 minutes or until the tomatoes are just beginning to soften.
Season to taste with salt, drizzle over some coconut cream and scatter over the chopped coriander and flaked coconut.
Serve with lime wedges.