If you're looking for something like Appwrite or Supabase but with a more end-to-end typesafety approach + optimistic updates, check out Thin Backend https://thin.dev/ (https://github.com/digitallyinduced/thin-backend) It takes a bit more of a higher level approach to database operations than appwrite, supabase or firebase, which allows us to do things like optimistic updates that are hard to do in other tools.
To see some code examples, here's a small example project done with thin-backend: https://github.com/digitallyinduced/thin-backend-todo-app/bl... It's running on Vercel here: https://thin-backend-todo-app.vercel.app/