Place half of the shallots in a mortar and grind with a pestle until a coarse puree forms.
Add the remaining shallots, followed by the garlic, chili, and terasi (if using), grinding with a pestle until each ingredient is mostly incorporated before adding the next.
The final paste should resemble thick oatmeal. Alternatively, combine all spice paste ingredients in a small food processor and blend until they form a paste.
For the Nasi Goreng
If using day-old rice, transfer the rice to a bowl and break the rice up with your hands into individual grains.
Heat the oil in a large wok or skillet over high heat until shimmering.
Add the spice paste and cook, stirring constantly and scraping the bottom of the wok or pan to prevent the paste from burning, until a pungent aroma permeates your kitchen and the paste darkens, 2 to 3 minutes. Reduce heat to medium at any point if the paste seems to be browning too quickly.
Add the rice to the wok and stir to coat with the spice paste.
Add the kecap manis and soy sauce. Stir and cook until the rice is evenly colored and hot throughout. Season with salt and white pepper.
Divide the rice between two plates and top each plate of rice with a fried egg. Garnish with cucumber and tomato slices and shower with fried shallots, if desired.
Serve immediately with kecap manis on the side just in case
Notes
Terasi is an Indonesian shrimp paste that can be found in well-stocked Asian supermarkets. If you can't find terasi, you can substitute it with belacan (Malaysian or Singaporean shrimp paste) or Thai shrimp paste, or simply omit it altogether. Sambal oelek is an Indonesian chili paste, traditionally prepared with nothing more than red chilies and salt. You can find it in Asian markets or in the “international” aisle of some supermarkets. Kecap manis is an Indonesian sweet soy sauce, typically made by combining soy sauce with palm sugar. For more information, read my article on kecap manis and how to make it yourself. For best results, use rice that has been refrigerated for at least 12 hours and up to 3 days. If using freshly cooked rice, spread the rice on a tray and let it cool for 5 minutes before using.