add templates dir and base html for layout.
move database.