Vincent Ritter

< back to projects

Sublime Ads

A privacy focused ad management service for your apps, websites and others.

Sublime Ads is a platform to allow you to manage and serve your very own ads in your own apps, on your websites, or other services using a simple API, or a lightweight drop-in JS script. You are in complete control on what you want to show, and how.

Everything is in one place and is easy to manage, no need to write your own custom solution. On top, Sublime Ads is privacy conscious to you and your users. Only taps/clicks will be registered for served ads and nothing else (can also be disabled per ad). I also don't use any tracking for the web application and other things, just like the internet is supposed to be.

Launched early 2021 as an MVP product to satisfy my very own needs as a developer with multiple apps and sites.

Visit the website here.

Project posts JSON/RSS Feed...

Coded up a real quick and simple feature to Sublime Ads, allowing you to filter your ads by client. Simples. Something I needed more and more.

Sublime Ads - Downtime report (2022-11-13)

So sorry for the unexpected downtime today (I hate downtime!). Long story short, here are the series of events that caused this, and how I fixed it:

  • As part of the general application framework updates today, I also wanted to re-size the server instance. This was due to the fact that it was running on a quite large server that I did not need. Deployments used to be slow due to assets having to compile on deploy, so the larger server was used to accommodate that. However, the framework upgrades make this redundant... as I am moving away from webpacker and upgrading the project to use Propshaft and import-maps (at a later stage).
  • I resized the server without issue, however immediately on boot the application was throwing an internal server error.
  • I tried a re-deploy of the application, to see if something has gone amiss. No dice.
  • Investigation showed that the internal server network has somehow corrupted both Redis and Postgres connection strings, now no longer connecting as intended. The network was set up by the service provider that provisions the servers on my behalf (I hate server management). Unfortunate for me, out-of-hours support was not possible to help me try and resolve this.
  • Going to my server provider I deleted the internal network interface, and re-created it. The server provisioning provider picked up on this fact, and told me to re-deploy so it can re-create the connection strings and other variables for the changed network.
  • No-go. All still failing.

🛏️📖 Bed and story time for my daughter.

Stressed me, returning after 45 minutes:

  • I have a fail-over group, that should allow me to fail over to another server. Unfortunate for me, the internal network was screwed.
  • Tried then to spin up a new server, with a clone of the application so that I can point the "failover" to a new primary server.
  • That did not work as it couldn't find the network ID it created initially on the server provider (which I deleted in the step above). Damn!
  • Enabled "maintenance mode", which shows a placeholder message.

At this stage, I downloaded the latest database backup, which runs every hour and is available to me at any time I so require. I didn't want to take any chances. Of course I couldn't do a backup right there and then, because the network was... fucked. Even SSH'ing wasn't playing ball. Thankfully the last backup was recent.

Where was I?

  • Spin up a new application, cloning my existing application settings, as a new project. This takes time! A long time, as it has to provision new servers and everything else. Oh the joys of waiting.
  • Whilst waiting 20 minutes for a brand spanking new server to provision, I decided to also provision the application on another server of mine that is the new way I want to do things - which actually runs shoutouts.lol. Of course this is a bit more involved, like copying across all the secrets, SSL certs and all that good stuff.
  • After 20 mins of waiting for the other server, it told me it failed. OK, so try again I guess, which starts the whole process again. Another wait.
  • Back to my nice server, everything seems to have been deployed, but got one failed attempt as I hadn't given it access to the encryption keys for the database used for Sublime Ads (I hate the fact I did it like this in the first place...). OK, added, deploy again.
  • I set up a new hostname to point to the "nice" server. The application was up and running, and it was working. Database backup restore next...
  • The other server was still provisioning.
  • I wanted to restore the database using my GUI client, TablePlus, but it didn't want to play ball, so I SSH'd into the server and just did it via the CLI. Super easy once I figured out that I can put a full psql url in there for authentication!
  • Another notification from my other server saying deploys have failed... urgh. Complaining about encryption. At least I know what that was about. It needed the keys to encrypt and decrypt the database.
  • I hit up the new subdomain of my "nice" server that is serving my application, and I can see good things. It seems to be up and running with the data intact.
  • I run a few manual tests, like account creation, ad creation and so on, just to make sure it's not running into any issues with encryption (I had that once). But everything was A-OK.
  • I give up on the screwed servers.

This is where I am happy I choose Cloudflare as my DNS host. Changing A records would have caused even more downtime than I wanted (because it had none for the root domains - see next sentence), but the subdomain was already resolving nicely. The problem was that the root domain was pointing at a fail-over group CNAME, which means it could direct traffic as needed without DNS config. Deleting the CNAME was not an option for me, as that would certainly cause even more disruption.

So, really long story short, I pointed the CNAME to the subdomain... and BOOM, Sublime Ads was up and running again.

Cloudflare proxies requests, so this was an instant switch.

What have I learned? Don't do this close to your kid going to bed.

And the second lesson is, if your server provisioning provider makes stuff really complicated, don't go for them because it's a huge blackbox...

Now Sublime Ads runs with Puma behind Caddy, and I am happy. Not because it works, but because it's easier for me to manage.

An unexpected change that I did plan (to move to the "nice" servers) at some stage, but not today... I certainly would have done it without the downtime... but here we are.

Whilst the app was down, there might have been a few missed tracking events, like Views and Taps. I am making plans to make this more robust and move all this to the edge network which will queue up anything that could not hit the main servers.

OK, Sublime Ads is back up and running as of an hour ago. So sorry for the unexpected downtime today (I hate downtime! I really do!). Writing a short update and will post why it happened.

Some unexpected downtime for Sublime Ads. There is an internal networking issue that I'm trying to resolve. Sorry for the trouble. Edge API is not affected and continues to work.

Sublime Ads is back in action. Thanks for your patience ✌️❤️

No downtime to Sublime Ads as of yet. However I am now expecting up to 30 mins of downtime. Will keep you posted.

I'm making underlying changes to Sublime Ads throughout the day, starting now. There might be a little bit of downtime as I deploy changes to the main web application. This means the API might be a little slow to handle requests, unless you're on the edge network - this is not affected and will continue serving requests as normal.

For reasons, Sublime Ads had a small presence on Twitter. I have now removed all posts from there. If you need to follow along and you're on any Mastodon instance, you can do so by using @[email protected] RSS, or Micro.blog is still great though! ✌️

Just shipped a new feature for Sublime Ads, allowing you to add any category to a parent category, so now you can have... sub categories with a main category. My head is spinning.

Documentation here and API options here.

As usual, this is a PRO feature only.

I've added the ability to make client portals public in Sublime Ads. That means you can just share the link without asking for a passkey.

Here is mine, for my ads running in Gluon (nothing grand, but nice anyway).

You can find documentation here.

Sublime Ads - Client Portals

I’m happy to release a new feature for Sublime Ads, called Client Portals. This was a quick itch I wanted to scratch, which sets the groundwork for more things that I have planned. But let’s get to portals!

Portals allow you to share a private page with your client (saucy?) so that they can see an overview of their stats for their ads. That means they’ll see nice graphs showing just how well, or bad, their campaign is working out with your app…

Here is one from last night that I created locally:

They’re super simple and fun (and probably boring).

Each portal is passkey protected and they all have a unique URL. Here is what it looks like in the admin area:

On top of stats, they’ll also be able to see the status of their ads, for example if they are active, inactive, or expired (if they have a schedule). Here is another screenshot of ads I am running myself:

I’m super excited to have worked on this over the weekend, it was well worth it… and unexpected.

Not to feed the hype machine, but this paves the way for new features that I have planned, for example… wait… let’s not get ahead of ourselves.

As with every release, there are minor fixes and tweaks also, for example a stats counter on the client list view is now available.

Client portals are available with the PRO plan and as always, there is good documentation here: https://docs.sublimeads.com/getting-started/clients.html#client-portals

Deployed a new feature to Sublime Ads. More info tomorrow. Started working on it last night (24 hours ago). Didn't track time, but took me a little longer than I thought 😋

Will write about it tomorrow.

Looks like 2 ad block lists caught wind of the Sublime Ads image CDN (and some other sub domains)... 💩

Sublime Ads, MRR: €6.12 😍🥳 I know it's not much in the grand scheme of things, but I am over the moon. This makes me happy! Thank you so much to everyone that subscribed so far ✌️

Continuing work for Sublime Ads today, I deployed a few extras for the ad and category lists which now shows you stats right there for you. It'll honour the date range you set last on the charts. You can hide it via settings if you don't like it. It's a pro feature.