The source code is here.

The minimap is just the same scene rendered from a fixed top down perspective, except units are toggled invisible and unit box markers are toggled visible and fixed at a certain height above max terrain elevation. The blue square with black border is created using this technique. In the following screenshot I zoomed the camera out so you can see that it’s just mostly the same rendering for minimap. It seems fast enough currently, but it might be worth optimizing by caching the terrain and water rendering for the minimap later. You can’t click the minimap yet, so I have a todo item there.

A screenshot follows: Minimap