To make the dipping sauce, blend the garlic, chillies, ginger, lime leaves, lemongrass and coriander in a food processor until very finely chopped. Tip the sugar into a small saucepan, add 3 tbsp water and heat gently to dissolve. Continue to cook for another min or so until the syrup starts to thicken slightly.
Add the chilli and ginger mixture, and continue to cook for a further 2-3 mins. Then stir in the rice vinegar, fish sauce and soy sauce. Remove from the heat and leave to cool to room temperature.
Cook the beans in a small pan of boiling salted water for 1-2 mins until tender. Drain and refresh under cold running water, then leave to dry on kitchen paper. Mix the crab with the cooked beans and all the remaining ingredients, apart from the sunflower oil. Season with salt and freshly ground black pepper and shape into 8 small patties.
Heat 1-2 tbsp sunflower oil in a frying pan and cook 4 crab cakes at a time until golden brown on both sides. Remove from the pan and keep warm while you cook the remainder. Serve with the sweet chilli dipping sauce.