an example api prototype using rails