can3p → Webhks.com - Dev Notes

Mon, 05 Feb 2024 15:06

Spent some time investigating why htmx stopped working suddenly. Turns out there is an issue already. The reason being that htmx initializes on DOMContentLoaded event and for <script .. async></script> it can actually happen that the script loads slightly after event has been fire, but the readystate property is still not ready

Tue, 30 Jan 2024 23:18

Webhks.com has a 7 day retention policy from now on. Initial clean up took a bit of time and a nice learning: deletes from a table that's referenced by other tables is quite slow by default in postgres, unless you manually create indexes on all referencing tables.

Learning number two: delete statement does not support limit modifier in postgres, but you can easily work around that by using a nested select query: delete from table_name where id in (select if from table_name where created_at < now() - interval '7 days')

Wed, 24 Jan 2024 22:34

Webhks was moved to bootstrap instead of ui kit. The reason is that bootstrap is objectively better designed and has a huge supply of design themes built for it. Service looks uglier now, but that'll be fixed :)

Tue, 27 Jun 2023 17:11

Webhks was down today. That's fine for mvp but of course it's not for any real users. Shortly we will move to a managed postrgres instance to make sure things like this do not happen anymore.

Why were we down? Webhks uses fly postgres instance and it simply stopped responding. A helpful troubleshooting thread is there

In the end machine restart helped:

$ flyctl checks list -a webhksdb # to see that we're in trouble
$ flyctl machine list -a webhksdb # to get the machine id
$ flyctl machine restart <machine-id> -a webhksdb # actual restart
$ flyctl checks list -a webhksdb # to observe that we're fine again

Sat, 10 Jun 2023 06:07

As you can guess, webhks is a close relative of dabdab.org in terms of design and the code base. The minimalistic framework on the backend turned to be productive enough for me to decide to take it further.

Surprisingly, the biggest trouble I had was with the mailjet and their sender validation process; while I was able to make it work, UI seemed to be useless in some broken way. Past that point however everything works perfectly.

The core functionality works now and that’s really neat. I think I’ll spend a bit of time hardening the system and working on the marketing side of things before moving on

Mon, 03 Apr 2023 00:39

First message in the dev blog for webhks.com

Dabdab.org (c) 2022 — 2023, hi@dabdab.org / Contact us / Twitter