Backend written

still todo: rest api, frontend