fix publish and add unit tests
Merge branch 'backend-new' of https://github.com/StickMen/KungFuRhino.git