Learnings from 5 years of tech startup code audits
Guilty as charged. I bootstrapped a our startup with just myself and 2 junior engineers in the last year during Covid. Junior in the sense that they are young. But actually they outperform many older engineers I&#x27;ve worked with. We are starting to close some pretty big deals and I&#x27;m dreading the moment where I have to turn this into a normal development team. In my experience velocity drops when you do that and you lose a lot of momentum. 3 people can do a lot. 6 people don&#x27;t do that much more. I&#x27;m not so young myself and quite experienced. But I lean heavily on my team for doing the work. I&#x27;m the CTO, the CPO, and I need to worry about team management, sales, and a few other things. So, less than half of my time is spent coding. This it the reality of startups. You have to do all of it.<p>I made some technology choices early on. We use docker but not Kubernetes. There is one server, it&#x27;s a monolith. There is one language, it is Kotlin. And we even use it on our frontend (web only).<p>The latter is not something I would do normally or recommend. But both my junior engineers only knew Kotlin and we just went with it and never actually ended up regretting this. This surprised me and at this point I don&#x27;t feel React&#x2F;typescript have anything that I need or want. We&#x27;re doing a lot of asynchronous stuff, websockets, maps (via libremaps), etc. And it all runs smoothly and responsively. Kotlin is kind of awesome for this actually.<p>Originally our frontend was Android only. We ditched that app in favor of a Kotlin-js based web app that started out as a proof of concept that just more than proved the concept and became the actual thing. At the time we had a demand for IOS and web and no IOS or web developers on the team. Hence Kotlin for the web. When this looked like it was workable we actually lost our Android developer. So the decision to forget about that app was pretty easy. At that point it was half working and full of bugs and technical debt. Fixing that would only half fix our problem because we&#x27;d still need IOS and Web. So we did web first. And we are packaging it up with Cordova for those people that want something from an app store.<p>It&#x27;s a good lesson on prototyping. If it works, do more of it. At the same time, I normally recommend minimizing risk and not building too many things in parallel. Like building 3 apps for 3 platforms instead of just a web app.<p>Our server is Kotlin&#x2F;Spring boot and we use a lot of Elasticsearch because that&#x27;s what I&#x27;ve been using for the last decade. A little bit of Redis and I&#x27;ve so far found no execuse to use a relational database. But I&#x27;d probably end up with mysql if that ever comes up. Done right, Elasticsearch makes for a nice key value store without transactions but with optimistic locking on documents. If I get some time, I add a database for safety at some point. But less moving parts means less headaches. Having just one language means the distinction between backend and frontend is a bit blurry. We have an api client that we use in our spring tests that also compiles to kotlin-js. That library contains a lot of code that we use in our front-end. Model classes, caching layers, functions that call various of our APIs, etc. And it&#x27;s all covered in tests. All the business logic basically. If we ever need to do native apps, we&#x27;ll use that there as well.<p>On the devops front I&#x27;m a combination of very pragmatic but also focused. We use stuff that works that doesn&#x27;t distract us. So, no terraform for a setup we only create once; in 20 minutes. Not worth spending weeks automating but worth documenting. But we do have CI&#x2F;CD via github actions. So we don&#x27;t manually deploy anything. And we have lots of API integration tests. If it builds, it ships. No rollbacks; roll forward only. Keeps things simple.<p>We use Google Cloud and keep our cost low. A couple of VMs, a loadbalancer, a managed redis, and a managed elastic cloud cluster. That&#x27;s it. Nice and simple.