Boil the rice until al dente, about 8 minutes, then drain.
In a small bowl, mix together the tamarind purée, kecap manis and fish sauce.
Place the garlic, shallots, the coriander stalks and ginger in a food processor and pulse until chopped.
Heat 1 tablespoon oil in a wok and fry the chopped garlic mixture and the chilli for 2–3 minutes. Add the beans and pineapple, fry for 2 minutes, then add the rice. Pour in the tamarind mixture and toss together so that it coats the rice. Remove from the heat.
Heat the remaining tablespoon of oil in a large frying pan until very hot. Crack in the eggs and fry over a high heat for 1 minute until the whites are crispy at the edges, but the yolks soft.
Spoon the rice into four bowls, then top each with a fried egg, a sprinkling of the crispy fried shallots and coriander leaves. Serve with slices of cucumber and lime wedges.