Building a full-stack iOS app in one hour

The Story

Let me be honest for a second: I love giving tech talks, but my brain hates them. Every single time I sit down to prepare for a tech talk, I hit a writer’s block more substantial than The Wall in Game of Thrones. Writer’s block is not something I am used to dealing with. I can usually sit down at my keyboard and crank out elegant solutions to incredibly hairy distributed systems problems, but when it comes to speaking in front of a room full friends and strangers alike my brain seems to just shut itself off and give me the finger in the process. The tech talk I gave at NodeJS Austin this last week was no exception.

The Constraints

Flash forward about an hour to 3pm, and I was finally at home in front of my computer ready to build the app. The tech talk was at 7pm, so I only had a couple of hours to build the app. I set a few constraints for myself to keep things simple:

  1. I needed to put together the presentation, shower, get dressed, Uber down town, and have dinner before the talk. This meant I had about an hour to build the app and get it working reliably on the new iPad.
  2. While it doesn’t have to be super secure, the app should interact with our CRM, Copper, in a way that limits blast radius. This means an API is necessary to avoid sticking Copper API keys in the mobile app.

The Design

Like all programmers, I love white boards. I usually start projects by wire-framing UIs and/or backend components necessary to get the job done. From my point of view, there were 3 necessary components to this job in order to satisfy the scope, quality, and cost constraints I was imposing on myself:

  1. A public API that accepts Lead objects via HTTP request, transforms the payload into the shape that Copper’s API expects, and loads the Lead into the CRM via a secure API call. For the sake of time and simplicity, running this API on Now.sh seemed like the best option.
  2. Copper CRM’s API, with a secure access key only accessible to the public API mentioned above.

The API

This entire project hinged my the ability to easily submit leads via Copper’s well-documented API. On paper this seemed easy enough, but I decided to start with the API to remove the biggest piece of perceived risk from the project.

The App

If you haven’t tried Expo before, you are really missing out. You know the feeling you get when you buy a brand new MacBook, open the package, and set it up for the first time? For me, it feels like simplicity made manifest in a physical expression, a lot like the developer experience when building websites with GatsbyJS. When it comes to building native applications, Expo feels the same way. All of the rough edges and decisions that you usually have to make when working with React Native are automated away. Expo handles building the app into binaries on a free remote service, push notification delivery, optimization of assets, social authentication, native graphics via WebGL, and more. You don’t even have to run native build tools, everything is done in the cloud for you and for free. The entire app build was relatively simple, requiring just around 200 lines of code:

The Result

After a bit of UI tweaking a few minutes of testing, I was pretty happy with the end result:

Partner with us

You have the vision for a gorgeous product experience. We are the software design and engineering team that can bring it to life. Learn more

Founder & CEO @BoltSourceIO