I always use Turso and Drizzle for data persistence in my apps. It's so easy and fast and cheap.
Previous Video:
https://youtu.be/z9PF8NdM4XU
Next Video:
https://youtu.be/sjcLxYbw5BQ
Join this channel to support me making more videos:
https://www.youtube.com/channel/UC6aTLuI_j4-0wiDSzmaPctQ/join
Code: https://github.com/meech-ward/code-gpt-example/tree/database
Chapters:
0:00 Intro
0:49 Setup Drizzle ORM
6:11 Setup Turso
8:41 Turso Local
11:27 Create a Chat Server Action
18:29 Save GPT Messages
23:12 View Saved Messages
32:32 Cache, Uncache, and Revalidate Messages
35:06 Selecting Chats for Context
37:23 Summary
🔗Moar Links
My Website: https://www.sammeechward.com
Instagram: https://www.instagram.com/meech_ward
Twitter: https://twitter.com/Meech_Ward
Github: https://github.com/orgs/Sam-Meech-Ward