Simon Tatham’s portable puzzle collection is a C project that features game-specific backends, platform-specific frontends, and both-agnostic middleware that lets the games and the platforms compose to give m × n combinations
When I find (or perhaps invent) further puzzle games that I like, they’ll be added to this collection and will immediately be available on [all] platforms. And if anyone feels like writing any other front ends for platforms I don’t support (which people already have) then all the games in this framework will immediately become available on another platform as well.
The project’s main page, with the puzzles and downloads/links to the various platforms: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/
The developer documentation, specifically the page introducing the front end/middle end/back end-architecture: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/devel/intro.html#intro
(About the tag choice: There is no architecture tag; but the scaling tag is for “scaling and architecture”, and I guess I can see the logic there, because a program’s architecture matters more and more as the scale of a project increases.)