Github - https://github.com/gopinav/Next.js-AI-Tutorials Become a Fullstack Developer with Scrimba - https://scrimba.com/fullstack-path-c0fullstack?via=Codevolution Message Metadata with AI SDK and Next.js In this lesson, we go beyond simple text messages in your Next.js chat application by adding valuable metadata. Learn how to attach and display timestamps and token counts to each message, providing greater transparency and insights for users. This tutorial covers setting up the necessary files, defining metadata schemas using Zod, creating typed UI messages, and integrating metadata handling in both your API route handler and frontend UI. By the end, you'll have a fully functional chat interface showing detailed message metadata, perfect for enhancing user experience, debugging, and analytics. 00:00 Introduction 00:45 Setting Up the Project 02:19 Defining Metadata Types 04:17 Attaching Metadata to Messages 06:08 Displaying Metadata in the UI 07:58 Testing 09:12 Summary Follow me + Twitter - https://twitter.com/CodevolutionWeb Business - codevolution.business@gmail.com

5 AI Coding Practices That Changed My Next.js Workflow
10.4K views

AI & I: Found a Cheat Code for Design (As a Developer)
8.8K views

AI & I: Pivoting for 2026
10.4K views

The React + AI Stack for 2026
19.3K views

React 19 Tutorial - 38 - Manipulate the DOM with Refs
4.4K views

React 19 Tutorial - 37 - Refs and useRef Hook
3.2K views