Stack logo
Bright ideas and techniques for building with Convex.
Profile image
Jason Lengstorf
a year ago

Type-safe, data-driven apps, even if databases freak you out

Written version: https://www.learnwithjason.dev/blog/convex-type-safe-database

You can build a database-powered app with end-to-end type safety and real-time updates without needing to learn how to manage databases. This tutorial will show you how.

  • Source code: https://github.com/learnwithjason/dashboard-convex-react
  • Finished app: https://convex-dashboard-react.netlify.app/

Quick note: at 3:50 and 7:20, the mutations should also be async functions and we should await db.insert() — leaving it out isn't a bug but the Convex team let me know that it's safer to always send async functions to queries and mutations.

Huge thanks to Convex for sponsoring this video. Learn more at https://convex.dev

Resources:

  • Read this tutorial instead: https://www.learnwithjason.dev/blog/convex-type-safe-database
  • Convex documentation: https://docs.convex.dev/introduction/
  • Unsplash: https://unsplash.com/ — images of pups came from here
  • React Charts: https://react-charts.tanstack.com/ — used for the stats view