split api and real time files
add heart and db connect classes