hand sketched logo of electrons orbiting a nucleus

What's a Frontend Engineer to Do?

You've spent the last 10 years building things downloaded by millions of people. And yet, you've sent out over a 100 applications and aren't getting traction.

You've noticed that the vast majority of the jobs you're applying to are for Software Engineers - with the implicit or explicit expectation that you have years of experience building in the backend too. (Sure, you've written a few lambda functions, node endpoints, and fixed a bug or two in a Rails project. But is that enough?)

You've been working on your own projects, but you're not sure if you should be building full stack projects aka "0-1" (you caught on to that new term, right? It's gonna be asked in almost every interview you have. "When's the last time you went zero to one?")

You've heard mention of a new title floating around in message boards and X "Design Engineer," but haven't seen it in job postings yet. You're not sure if you should be focusing on that.

Not to mention, you've watched X drool over AI agents like Devin and wonder if you should be spending your time learning to manage AI coding agents.

You Want to Build a 0-1 Project

Database Choices

You've been in software long enough, you know its tradeoffs all the way down. You want to know how you weight the things you care about.

Right now, I want to build an app that is local-first. With that in mind, I'm thinking about using SQLite.

If my app needs other databases, I'll use them. But for the moment, I think I'll start with SQLite.

Why Local First?

You may not realize how much you already want local first.

  • Do you want your app to work when you are on the subway/camping/in airplane mode?
  • Do you want edits in your app to work across two tabs?
  • Do you want edits in you web page to work across to your native app?
  • Wanna reduce all those loading spinners on user interactions?

You get all those for free when you build your app local first.

Ok, but what local first system to use?

Possible stacks:

  • Replicache
    • Turso
    • Supabase
  • PowerSync + Supabase
  • ElectricSQL + Supabase
  • Evolu + evolu.world (can run your own server if you wish)

Evolu feels like magic, has good philosophy vibes, uses tools that look cool. This is the path forward for me, right now.

Unsolved, how will we handle user specific data?

  • Turso: will we have a separate database for each user?
  • Supabase: RLS (Row Level Security) to filter data by user?

Facebook Messenger uses SQLite to drive their UI

How will xstate/ui state management work with local first?

SQL vs. NoSQL?

SQL:

Pros:

  • structured data with predefined schema -> type safety
  • ACID compliance -> data integrity
  • powerful JOINs for complex queries -> reads across many different access patterns
  • extensive indexing -> fast reads
  • mature ecosystem -> many tools and libraries

Cons:

  • rigid schema -> hard to change, manage migrations
  • vertical scaling -> can be challenging

NoSQL:

Pros:

  • flexible schema -> easy to change data model
  • horizontal scaling -> easy to scale out
  • great for real-time and big data

Cons:

  • lack of standardization query language
  • eventual consistency -> data integrity can be compromised
  • limited support for complex queries -> can be slow for complex queries
  • relatively young technology

SQL vs. Postgres

Readings:

  • Why we migrated from PlanetScale to Turso
    • (+++) moved to turso for faster data access and lower costs at the edge
    • (+) dont need docker running for local development (open status is an OS project)
    • (-) SQLite has a less powerful type system than MySQL

What's the deal with SQL right now?

Cons:

  • hard to scale heavy write loads
    • so you won't use this to build out a chat app etc
  • eventual consistency
    • so you won't use this for a banking app

Readings:

Is NoSQL dead?

Things I found interesting:

  • "how SQLite can also be used to emulate a schemaless document pattern"

    • databases are so cheap an easy to use, you are not constrained by putting all your data in one
    • you can give each database the equivalent of a Mongo document as its schema claude chat examplee
  • shortcomings of SQL

    • hard to scale, manage, backup, and access it from serverless
    • these are all areas where Turso is trying to fill the gap

Distributed SQLite: Paradigm shift or hype?

Things I found interesting:

  • Cloudflare's SQL service is called D1
  • fly.io offers a distributed SQLite service called LiteFS
  • All services are scaled a similar way which is having one primary write db and async replicas at other locations
  • (-) authors answer? cache everything.

Response in Hacker News

What's the deal with the Edge?

Readings:

Vercel Benchmarks show Turso has low latencies everywhere: what the Data Edge is good for!