🛠️

Cinemus Development Log #1

08/07/2023

This is the first (and potentially only) blog post covering my experience developing my new app Cinemus.

For the past few months, I have been working on this app in my spare time. As it currently stands it is far from perfect, but I feel comfortable starting to share the app more widely, so alongside this blogpost, it has also been added to the projects page of this site.

Humble beginnings and naive decisions

This project was born out of a problem I’ve been having for a while:

1. Catch up with person
2. Chat about shows you have been watching
3. Recieve recommendations of movie/show to watch
4. Take note of recommendation
5. Completely forget about recommendation when trying to find something to watch

This seemed like a simple CRUD app I could spin up in a few afternoons. I initially decided to create this using SvelteKit, Go and MongoDB. Naive decision #1. As I’ve told myself for so long, it’s never worthwhile trying to solve a new problem using new technologies. Since I hadn’t written anything in Go for nearly 12 months and never built anything worthwhile in SvelteKit, learning these tools while also trying to create an application in a new problem space this quickly became a very painful and slow process.

Once I felt that the pain was too much, I pivoted. This time I chose to use React instead of SvelteKit and Serverless Framework instead of a Go Monolith. Naive decision #2. This was initially great, I could move quickly since I was familiar with the tools and created a basic MVP within a few weeks. I did a round of Alpha user testing with around 10 people to check how usable the app was to people other than myself. The testing went well, most people could use the app with little to no issues and I gathered a lot of really insightful feedback.

This was a great feeling!

I had built something that was half-way decent and looked useful to those that had tested it out. This was exactly what I needed to light a fire under my ass and get to planning out features and developing even faster. I was very keen to keep expanding the app, but I started to notice my developer experience was slowly falling apart and the performance was beginning to dip.

I was quite concerned about the performance problems since this was an app with barely a single daily user, so I dug into logs and performance metrics and came to the conclusion that the best way forward was yet another technical restructure.

Maturing tech and breaking things

As I realised I wanted to do another technical rewrite, I remembered the wise words of a Senior Engineer I used to work with “If you use the popular tech, when it falls out of favour others will migrate to the new popular tech so the migration will be widely documented”. This was instrumental in my making my next technical decision.

This led me down the path of NextJS, TRPC and PlanetScale. I looked into templates for this like the T3 stack and they looked like exactly what I was after. Once again I created a fresh repo and slowly rebuilt the entire application using the new stack. This was done in small segments, starting with the API routes.

I copied the files directly from the original codebase to the new one. Since I had written these in a decently decoupled manner this was pretty much a “lift-n-shift”. Wiring this code up to TRPC was also pretty painless considering that was a completely new tech to me. Once I had moved across all of the APIs, I moved on to the frontend.

This was quite a bit more painful than the API migration. Since I decided to migrate the app from an SPA architecture to a more traditional MPA, I had to disassemble and reassemble a few components to support the new architecture. All-in-all this was also quite simple thanks to the extensive documentation for NextJS and its great developer experience.

Next up was the database. This was the hardest bit of the migration. Since I had originally used MongoDB, the database schema was essentially non-existent. I had a few TypeScript types that I was using as a schema, but as I began to migrate them, I noticed quite a few issues in my database design and had to redesign quite a lot of the data. This also led to me nuking the original database and users, meaning that everyone that had used the app now has to start from scratch. I was pretty annoyed that I had to do this, but it felt like a necessary evil and could be done at this point of the app’s life since I had communicated to my users that this was an alpha version and things would change and break without notice. Once I had made this last migration step, I was ready to deploy the app.

Keeping the ball rolling and where to now

Since I’ve moved to the new stack, I’ve been able to keep developing features at a decent rate. I’ve been looking forward to working on Cinemus almost every day and pouring an immense amount of energy into planning features and developing them.

During this time, I went on a holiday for a fortnight and development slowed. This was a blessing as it gave me time to really think about how I want the new features to work since I didn’t have the time to impulsively build a half-designed feature. Since I’ve returned from my break, I’ve released the collaborative lists feature allowing users to share lists with each other for viewing and collaboration.

From here I’ve got a few more feature ideas in my notes, however I think I’m going to pause feature work for a little and focus more on improving the UX of the existing features. The app very much looks like an MVP (and to a degree it still is) however I feel like the most basic value of the app has been achieved so I should start to carve out a solid design language and keep the app looking consistent.

In saying that, there’s a decent chance I’ll get too excited and start to work on a new feature. Design is definitely not my strong suit and it takes quite a lot of time and effort from me while not delivering much satisfaction for quite a while. I may chat to a designer and see what they estimate the costs to be for some designs from them if the work becomes too painful for me. I guess only time will tell what gets worked on next. All I know is that I’m excited to keep working on Cinemus and quite satisfied with what I’ve built so far.