Rehabilitation aids help people with temporal or permanent disabilities during the rehabilitation process. However, these solutions are usually expensive and, consequently, inaccessible outside of professional medical institutions. Rapid advances in software development, Internet of Things (IoT), robotics, and additive manufacturing open up a way to affordable rehabilitation solutions, even to the general population. Imagine a rehabilitation aid constructed from accessible software and hardware with local production. Many obstacles exist to using such technology, starting with the development of unified software for custom-made devices. In this paper, we address open issues in designing rehabilitation aids by proposing an extensive rehabilitation platform. To demonstrate our concept, we developed a unique platform, RehabHand. The main idea is to use domain-specific language and code generation techniques to enable loosely coupled software and hardware solutions. The main advantage of such separation is support for modular and a higher abstraction level by enabling therapists to write rehabilitation exercises in natural, domain-specific terminology and share them with patients. The same platform provides a hardware-independent part that facilitates the integration of new rehabilitation devices. Experience in implementing RehabHand with three different rehabilitation devices confirms that such rehabilitation technology can be developed, and shows that implementing a hardware-independent rehabilitation platform might not be as challenging as expected.