use correct endpoint, add postgres
change backend structure to save photos, add pagination