Building a robust API server framework