Preheat oven to 170C / 340F. Grease a 8x5-inch baking tin and line the bottom with baking paper. Set aside.
In a large mixing bowl, beat butter with an electric mixer on medium speed until creamy, then add sugar and continue beating until pale, light and fluffy, scrapping down the sides occasionally, about 5 to 7 minutes.
Add in 1 egg and beat on medium speed for 1 minute until incorporated. Scrape down the sides.
Add in the second egg, pandan extract and water and beat on medium speed for 1 minute until incorporated. Scrape down the sides.
Add in dessicated coconut, ground almond. Sift in flour, baking powder and salt. Beat on low speed until just incorporated. Use a spatula and scrape the bottom to ensure everything is mixed together.
Transfer the batter into a cake tin and use a spatula to smooth the top. Bake for 35 to 45 minutes until a skewer inserted into the center comes out clean. Let cool completely in the tin.
Combine sugar and water in a small pot. Bring to a boil and simmer until the sugar syrup thickens slightly. Remove from heat and let cool completely before using.
In a mixing bowl, beat cream cheese, butter and salt with an electric mixer on medium speed until creamy, then sift in icing sugar. Beat until icing sugar is incorporated then beat in the sour cream. Beat on medium-high speed until frosting is light and creamy.
Place the coconut in a small frying pan and dry-fry over medium heat, tossing the coconut frequently until the coconut is lightly golden. Remove from heat and let cool completely before using.
Split the cake into half horizontally. Lay the bottom piece on a cake board and brush with sugar syrup.
Take ⅓ of the cream cheese frosting and mix with the pandan extract. Fill the cake with the pandan frosting.
Take the top piece of the cake, brush both sides with sugar syrup and place it on top of the pandan frosting. Coat the exterior sparingly with the cream cheese frosting (crumb coat), making sure that the pandan frosting do not get into the remaining batch of cream cheese frosting. Refrigerate for 15 minutes until frosting is slightly firm.
Coat the sides of the cake with a thin layer of cream cheese frosting, then press the toasted dessicated coconut gently onto the cream cheese frosting. Refrigerate for 15 minutes.
Split the remaining frosting into 2. Colour one with red food colouring. Place the red cream cheese frosting into a piping bag fitted with a plain tip and the white cream cheese frosting into a piping bag fitted with a star tip.
Pipe red cream cheese frosting on the top half of the cake. Use a spatula and smooth out the frosting. Refrigerate for 15 minutes.
Pipe the moon and stars with the white cream cheese frosting onto the red cream cheese frosting. Pipe the remaining white cream cheese frosting on the bottom half of the cake. Smooth it out with a spatula. Refrigerate for at least 15 minutes before serving.
Dip a knife in hot water and slice the cake. Wipe the knife blade and repeat the process for a clean cut. If the cake is cold, let it come to room temperature slightly before serving.