backl.io - backlink builder for startups

Early 2022 I started weegee - the biggest flat search in Switzerland. I’m still operating it but shifted my focus to a new startup:

backl.io - a backlink builder for startups

I’m having two products which build upon eachother:

  1. SEO Kickstarter - if you just start with SEO and are not listed on Google at all, then this helps you to get “somewhere”: Based on my original research based on 200 startups I extracted the 60 most effective backlinks which are achievable without any cold email reachout.
  2. Backlink builder - once you have the basic backlink you’ll need an automated way to do backlink outreach. This tool computes the backlink gap to your competitor, creates a list of potential backlink sources, crawls their email addresses, lets you create an email template and off you go with a semi automated way of emailling likely linkers.

"Irene hilft" - new offer of my wife about 'Hilfe im Alltag'

My wife Irene started an offer “Hilfe im Alltag”, where she focusses on people overwhelmed with their household who need help and support in certain areas of everyday life:

  1. Decluttering
  2. Keeping the household in order
  3. Budgeting
  4. Cleaning
  5. Menu planning / Cooking

Her region is restricted to the area of Bülach/Rafzerfeld.

She helps people to get back into a well working household where everything is tidy and clean and to regain confidence in their own abilities.

Link: irenehilft.ch

How to stream chatGPT from Flask to react (using only HTTP)

Streaming chatGPT API response to react frontend. GIF depicts actual speed

ChatGPT’s UI (and most of the 3rd party tools) have streaming output. This is not just a gimmick but follows the way LLMs generate the output: word for word.

So you usually also want to output to the user: word for word.

Turns out this is very simple to achieve.

My first attempt was using web sockets - which turned out to be unstable and needs lots of overhead. In came Ilias, who created a ChatGPT to Telegram Bot that streams responses to users. He was like: »man, why are you using sockets for this!?« And enlightened me that the same thing is possible with good ol’ http requests.

Plus: This method uses zero additional dependencies.

Hope that I’ve wet your appetite.

So enough of those introductory bubbles, let’s talk tech.

The whole idea is that the frontend (react) POSTs a JSON to backend (flask) which then “streams” the data back by outputting line by line, leaving the HTTP connection open until all is done.

How to stream ChatGPT output from python backend to react frontend

Streaming chatGPT API response to react frontend. GIF depicts actual speed

ChatGPT is great, no question. But when I tried using the API, I found the speed of the response lacking.

When using OpenAIs web frontend I saw that the answer is appearing word for word.

I thought: »I might be able to stream the chatGPT api response in realtime. This way the user has immediate feedback without needing to wait for 20 seconds«.

And - lo and behold - this is possible!

Update 2023-10: Turns out there is a much simpler way to achieve the same without websockets, without needing to run gunicorn with only one worker, patching openai etc: read here.

What we’re building today:

  1. Call ChatGPT API
  2. Stream the data with SocketIO from python (flask)
  3. Receive the data in react using SocketIO and display it bit as bit in realtime

How to use firebase to authenticate next.js/react against flask backend

What you'll have at the end of this howto

I’m migrating my frontend away from Flask to next.js, reducing my flask app to only backend apis.

This blogpost explains how a next.js app authenticates against flask backend using flask-login.

It assumes that you have in your flask backend:

  • an endpoint auth/sign-in which…
    • accepts a POST request with the firebase idToken
    • checks the token against firebase
    • when successful, logs it in with flask_login’s login_user
  • your api routes secured with @login_required

How to use Brightdata with scrapy

Brightdatas Proxy Manager (click to see full res)

With weegee.ch I run a handful crawlers. At the beginning I didn’t have problems with crawling protection but over time my little project got more successful (I’m on the first page of Google for the relevant search queries since a few weeks) so I see more and more websites blocking me.

I went for Brightdata as they offer a good “pay as you use” model which works well for smaller sites like mine (and don’t require to pay a minimal price per month).

I couldn’t find a documentation which covers the whole install process, that’s why I’m writing this post.

Launching weegee.ch - my first side project

During the past few months I’ve been busy creating my first side project. This week, I’ve reached a milestone - both Web and mobile apps are now available, may I present to you:

weegee.ch - the biggest shared flat search in Switzerland. In Switzerland, shared flats are called WGs (for WohnGemeinschaft), pronounced “weegee”, that’s where the domain name comes from.

It’s available for web, iOS and android.

The data is coming from crawling shared flats from wgzimmer, flatfox, urbanhome, ronorp and tutti - creating a shared flat search which is twice as big as any of the other portals!

How to install matomo for nginx on amazon linux 2

Matomo is a replacement for google analytics which is free when you self-host it. Honestly, I underestimated the effort it takes. Turns out it needs php, mysql and fastcgi running, since I’m running a python/postgres stack it adds quite a bit of clutter onto the server…

But anyway: here you are, the following guide installs Matomo with…

  • php8
  • mysql 8.0
  • nginx / letsencrypt
  • php-fpm (fastcgi)