Heat cooking oil in a large pan or wok over medium heat.
Add chopped onion and minced garlic, then sauté until fragrant.
Add diced chicken or shrimp and cook until fully done.
Add the cooked rice to the pan and stir well with the mixture.
Pour sweet soy sauce over the rice and mix thoroughly to coat evenly.
Stir-fry for a few minutes until the rice is heated and slightly crispy.
Serve hot with a fried egg on top.