How I Built Subtis from Zero

February 25, 2025

TL;DR

After almost 2 years of development, Subtis is now a reality!

Currently is handling 2M requests per month and serving around 400 MAU.

Subtis Landing

Context

Subtis began as a simple idea to solve a problem I was facing. And as a software engineer, I decided to build it. Basically there is not a single Subtitle service that you could find on the internet that could give you the best experience. Let me show you a few examples of what I'm talking about.

Subdivx OpenSubtitles

But don't get me wrong all these services are great and they have their own purpose but they are not meant for the average user.

In the beginning

I started by building a indexer that would index all the subtitles from the internet. And while I was coding that primary piece of software, I began to do some sketches of what the UI could look like.

Subtis Sketch

Maybe you find this silly but you can iterate more faster with just pen and paper than going directly to Figma. When you have a clear idea of what you want, you can just go to Figma and start sketching or show it to a designer as I usually do. Designers work much better in my experience having a solid idea of what you are trying to solve and how you want to solve it with some creative freedom that is necessary for them to express their ideas.

Different Problems, Different Solutions

One of the biggest problems I've faced is that is practically impossible to index all the subtitles for all the different versions for each movie and TV show episode, since usually there's around ~20 different versions for each movie or TV show episode.

For this particular problem, I've decided to build a service that would be able to index in real-time the version of the movie or TV show episode that they are looking for. So in this case WebSockets were a great fit.

Subtis Real Time search

This real-time search process takes about 20-30 seconds to get the results so I built an endpoint that returns the teaser or trailer for the user to watch while the search is being processed.

Core Flow

How Subtis works is by using a combination of different technologies to achieve the best possible experience. Let me show you a diagram that would be easier to understand instead of explaining it with words.

Subtis Architecture
  1. There's a indexer that runs once per day to keep the database up to date.
  2. The user request a subtitle and if found it will be served from the API.
  3. If the subtitle is not found, the API will store the file name in a table and process it asynchronously.
  4. The user will be redirected to the real time search page that will be connected to the WebSocket service.
  5. If this service founds the subtitle, it will be served from the database and the user will be redirected to the subtitle page.
  6. If this service doesn't find the subtitle, it will be processed asynchronously and the user will be notified that the subtitle will be available soon.
  7. Last but not least the indexer will invalidate the Cloudfare cache for the movie or TV show episode so the users can see the new subtitle in those pages.

By tackling the problem this way we can assure that the user always finds the perfect subtitle that they are looking for either directly by already having the subtitle pre-stored in our database or by indexing the subtitles in real-time.

Current Stack

I like to use cutting edge technologies but at the same time trying not to over-complicate the stack or the solution itself.

Subtis Architecture
  • Bun as the core runtime (blazing fast lol and with mono-repo support)
  • Fly.io to host the real-time search service and the Stremio plugin
  • Hono as the API framework (with support for Cloudflare)
  • Supabase as the database and storage system
  • Cloudfare Workers for the API deployment
  • React Router V7 as the client-side meta-framework
  • Shadcn UI as the UI library
  • Cloudfare Pages for the website deployment

All these technologies are great and I haven't had any issues with them so far. I've such a fun time using Bun is really fast and the DX is great, you have all batteries included, you don't have to configure TypeScript or any testing suite for it to get up and running.

Having Fun

I've had such a fun time building this project, I've learned a lot of new things through it since this project involved a lot of moving pieces. In my opinion Software Engineers should build cool projects to showcase their abilities but at the same time to keep sharp and don't forget about the fun that is to code and solve problems for a ton of users.