I've finally open-sourced and documented the two projects I've been building and using in my many TypeScript projects for the last five or so years. The first one is Trader.ts, a UI library with minimal complexity and a much simpler mental model than React, Angular, Vue, etc. The second one is SQL-Typechecker, a PostgreSQL typechecker and TypeScript type generator.
The full documentation can be found here, but in short it's the server and UI library I've been using to build classy.school and other commercial projects for quite some time now. It's very, VERY simple. It does no reconciliation, no dirty checking, none of that magic. It's heavily inspired by the frontend library of Ur/Web. As I was writing the docs, I felt almost embarrassed of how simple and archaic it looks on the surface, but I am extremely confident in its quality. The abstractions I've been able to build on top of it (most importantly my Form library, docs incoming) are impossible to do in a sane way in many of the heavy mainstream frameworks. Couldn't be happier!
The existing TypeScript libraries to interact with PostgreSQL in TypeScript were not good enough. Libraries that come close to what I wanted (but are both not good enough and for other programming languages) are sqlc (Go) and sqlx (Rust).
So I wrote my own: SQL-Typechecker. It's a PostgreSQL parser, typechecker and type generator for TypeScript using PostgreSQL's native support for function definition (CREATE FUNCTION ...). In short, it reads your SQL DDL declarations (CREATE TABLE ...) and SQL function definitions (CREATE FUNCTION ...), runs typechecking and generates TypeScript files to run these functions on your database. It's unique features include:
Even though not everything that PostgreSQL supports is supported in SQL-Typechecker, I've been able to extend it with every feature, function or piece of syntax that I've needed in my projects over the years.
If you're happy with TypeScript and JavaScript's current state of libraries, then you probably don't care and that's fine by me. But for me, the TypeScript ecosystem really missed both of these libraries, which are focused on providing full stack type safety, from Database to Browser. I'm a huge TypeScript fan but was jealous of the full stack typechecking of projects like Ur/Web or Ocaml's Ocsigen, so I set out to build the same experience in TypeScript.
Fair point. It's not for lack of trying! But TypeScript offers a bunch of advantages:
I could honestly go on for hours about this topic, but I'll keep it brief. Get in touch if you want to know more about my software building philosophy!
Not sure. I've completed my current project and have been focusing the last few weeks on classy.school. The sales part of the business is new to me but exciting. I'll probably still look for another project in the near future, but only time will tell! I've had the honor to lead two very interesting projects in the last few years, so if I can find a project where I get the stakeholder's confidence and believe in the project, I might jump!
Please check out my new open-sources libraries if you're interested and send me some feedback!
Simon