To make the spice paste, add all the ingredients, including the shrimp paste, if using, into a small food processor and process until you have a fairly smooth paste.
Add the groundnut oil into a wok along with the shallots. Place over a high heat and fry, stirring frequently until the oil starts to bubble. Continue frying, stirring constantly, until the shallots start to turn a golden brown colour.
Place a fine mesh sieve over a heatproof bowl and pour the shallots into the sieve,retaining the shallot-infused oil. Transfer the shallots to a baking tray lined with kitchen paper, season generously with salt and set aside.
Add the green beans to a pot of boiling, salted water and blanch for 3 minutes before straining and running under cold water to shock. Set aside.
Add the cold rice into a bowl with the cornflour and using your hands, break the rice up into individual grains, mixing the cornflour through the rice as you go.
Place 2 tablespoons of the shallot-infused oil into the wok and heat over a high heat.
Add the spice paste and cook for 2 minutes, until it smells aromatic, then add the rice and stir to coat in the paste, breaking up any clumps. Add the leftover chicken and the blanched green beans and cook for a further 2 minutes to warm through.
Finally, stir through the kecap manis, soy sauce, spring onions and chilli and season with salt and white pepper to taste. Remove from the heat and keep warm.
Meanwhile, add roughly 100ml of the reserved shallot-infused oil to a seperate small frying pan and heat over a high heat. Once hot, crack in the eggs and fry until crispy round the edges and cooked to your liking.
To serve, grab a small bowl and fill with the fried rice. Invert onto your serving plates, slightly offset, and serve the fried eggs on top of the mounds of rice. Divide the crispy shallots between your plates and serve with the sliced cucumber, tomato, extra spring onions and sliced chillies.
Notes
Essentially a slightly bastardised Indonesian nasi goreng with an egg on top.