Connect your modules magnetically!!!
You'll need 6 ball magnets per module, each with a diameter of 5 mm.
For the edge, you'll also need bar magnets that are 10 mm long and 4 mm in diameter.