Add JSON API, task model, and routes