What you're asking for is fairly unrealistic. The only way this could work sustainably would be for something to exist where you host your own tile server and routing service and patch that into OSM. Otherwise, even if the app itself is open source, the backend will cost money to run and will be proprietary.
The reason that OSM is able to be fully open source is because you host the tiles on your phone and do the routing calculations locally.