Anatomy of an AI Art Generator App — how some smart technology choices helped me build and launch NightCafe Creator in under a month

First, a brief timeline

My friend thought he’d be clever and try to style grumpy cat in the style of grumpy cat. Note the beautiful UI.
Still no real url or even title or description tag
Launch day — November 13, 2019

Requirements

  • GPUs in the cloud to queue and run jobs on
  • An API to create jobs on the GPUs
  • A way for the client to be alerted of finished jobs and display them (E.g. websockets or polling)
  • A database of style transfer jobs
  • Authentication and user accounts so you can see your own creations
  • Email and/or native notifications to alert the user that their job is finished (jobs run for 5+ minutes so the user has usually moved on)
  • And of course all the usual things like UI, a way to deploy, etc

Guiding Principles

  • No premature optimisation
  • Choose the technologies that will be fastest to work with
  • Build once for as many platforms as possible
  • Play to my own strengths
  • Absolute MVP (Minimum Viable Product) — do the bare minimum to get each feature ready for launch as soon as possible

Challenge #1 — Queueing and running jobs on cloud GPUs

  • Being a front-end engineer, it would take me a long time to do all this
  • I could still only run one job at a time (unless I set up auto-scaling and load balancing, which I know even less about)
  • I don’t know enough devops to be confident in maintaining it

Data scientists never have to worry about infrastructure again

Challenge #2 — The UI

Challenge #3 — A database of style-transfer jobs

A comprehensive app development platform

Challenge #4 — Alerting the client when a job is complete

  • Polling the jobs database to look for a “completed” status
  • Keeping a websocket open to the Algorithmia layer (this seemed like it would be very difficult)

Challenge #5 — Authentication, Notifications and Deployment

The email notification template
npm run build && firebase deploy
npm run deploy

A few things I learned

Things I’ve changed or added since launching

Please try my app

NightCafe Creator

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store