Photo by Marten Bjork on Unsplash

Recently I was working on a mobile app project with my friend, Steven where the user can receive location updates from friends and family. Each user will have a tracking code and a list of users with their most recent location.

The biggest challenge of this project was the timeline. We needed to deliver it within two weeks while working a day job.

However, we managed to deliver it in one weekend.

I was assigned to build the backend API for the mobile app. In this article, I’d like to share with you the key practices that I used to deliver the backend API in such a short time.

Key practices:

Design your API before writing code Write API with Lumen, not Laravel Simplify your code by using Single Action Controllers

Design your API before writing code

When starting development, most of the inexperienced developers jump into writing code immediately.

That is a common mistake.

Without designing your API before writing code,

You could be frustrated by the unexpected workload in the later stage You could miss the deadline

Draft API endpoints

Draft your API endpoints in document collaboration tools like Google Docs or Dropbox.

Here is the example API I drafted.