My name is Peter Bengtsson and I'm a web developer. This is my personal blog.

  • Born and raised in Sweden for two decades
  • Studied and lived in London, England for one decade
  • Moved to Californa, then South Carolina for the last decade

I work at GitHub on the Web Systems team (handling React in GitHub among other things). Prior to that, to that Mozilla and MDN Web Docs.

The The Mycelium Network Podcast did an interview with me in August 2022. Link to episode on Apple and Spotify.

Almost all of my work is Open Source and available on my GitHub account including this site itself: front-end, back-end.

Side projects

WebSockets are promising because the connection is kept open so that sending new data has lower overheads than a regular XHR request. This app is a demo/playground to really test this in a production-grade setting. You can run your own test from your location and it will effectively give you an insight into the latency vs. overheads balance.
This is the full blog post about the experiment. The code github.com/peterbe/sockshootout2019 is a mix of React, Tornado, and Django.

minimalcss is Node app that can analyze a URL and extract the minimal CSS needed for a first render (with JavaScript executed) and this is a web app that allows you to test it in a browser by simply typing in a URL. The front-end is a single-page React app that sends the URL into a minimalcss-server and then displays the results with some graphs.

Everybody has to make a todo list app. This is my take. I wanted to build something exactly like I want/need it.
The data is stored in IndexedDB using kinto.js and for remote storage I run a Kinto server on my personal server. The authentication is done with auth0js and the front end is React and MobX.

A fun little Node script that uses puppeteer to open https://fast.com in a headless browser, extracts your current broadband speed and then draws an ASCII graph of the measurements plus a rolling average.
This is a real project, solving a real problem, but the code is a hack built in a day (plus some paperwork to clean it up and put it on npmjs.com)

A mobile web game app where you play battleships against friends. With the silly name, iconography and sounds. The first prototype of this is simply a website but styled specifically for mobile use using Bulma.
You can either play against the computer, against a friend asynchronously or against a friend in real-time.
The front-end is written in ReactJS and the real-time traffic is handled partly in Django with Fanout.io to handle the WebSockets.
Next step is to try to submit this to the Apple App Store and see if they appreciate the name of the app.

A GitHub Webhook receiver app that sends an email to certain people when a git commit comes in that contains the trigger word headsup:. More extended blog post here and code on GitHub.
The back end is written in Django, the front-end written in React and it uses GitHub as an OAuth provider.

You enter the GitHub URL to a project and for each deployment target (e.g. "dev", "stage", "production") you enter a URL that points to a file that contains the git sha that is deployed there. Then you get an overview of what git commits been and not been deployed across those deployments. For example. Written in Flask.

It started when I was optimizing a website whose HTML files were massive. Clearly the HTML contained too many DOM nodes. But where are these big clusters of nodes?! HTML Tree takes a URL, converts it to a tree in JSON which when combined with a D3 collapsible tree becomes easier to navigate. Code on GitHub.

This app combined Leaflet with Filepicker.io with Amazon S3 to let you upload massive pictures and draw annotations on them to be able to zoom in, pan and share specific regions without having to download the whole image. And it works great on mobile too!

All the code is open source and available here and it's a Tornado app that relies very heavily on RQ.

It's for spotting out-of-state license plates in the US and tick them off on your smartphone.
This is a work in progress project. I have blogged out it first here and then here about the update. It's an ongoing project to try to build real mobile native apps from HTML and Javascript.
This is also my first ever project that actually uses Facebook's API to facilitate wall posts from the app.
The source code is here and it's a bit of a mess because it's after all just an ongoing experiment.

This was my first pure mobile web site. It's for my Fujian White Crane Kung Fu Club that I trained with when I lived in London. This site uses a remote database connection and is heavily cached. It's built taylor made for mobile as it goes straight to the basic details you need.
I originally built it because I kept forgetting when various classes started and looking it up on a slow 3G connection was a pain.
The code is here and I blogged about when this was my first site to get 100 points on YSlow!.