---
title: "Add comments to your Astro blog with AstroDB and Turso"
description: "A commenting system for an Astro blog combines AstroDB (libSQL hosted on Turso) for storage, Astro Actions for validated form submissions, and Server Islands (server:defer) to render the comment list."
url: "https://swe.quest/articles/add-comments-to-your-astro-blog-with-astrodb-and-turso-e9a7bfb6cb419242"
canonical: "https://turso.tech/blog/add-comments-to-your-astro-blog-with-astrodb-and-turso"
source: "Turso"
published: "2024-12-12"
difficulty: "medium"
kind: "How-to"
reading_minutes: 6
tags: ["frontend","sqlite","javascript","typescript"]
---

# Add comments to your Astro blog with AstroDB and Turso

A post on [Turso](https://swe.quest/sources/turso.md), published 2024-12-12, 6 min read, How-to. Original: [https://turso.tech/blog/add-comments-to-your-astro-blog-with-astrodb-and-turso](https://turso.tech/blog/add-comments-to-your-astro-blog-with-astrodb-and-turso)

## Summary

A commenting system for an Astro blog combines AstroDB (libSQL hosted on Turso) for storage, Astro Actions for validated form submissions, and Server Islands (server:defer) to render the comment list. The walkthrough defines a Comment table and seed data, switches blog pages to server rendering, queries comments by post slug, and adds a Zod-validated addComment action with inline error display. It finishes by pushing the schema to a remote Turso database with \`astro db push --remote\` and deploying with the Netlify adapter.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [SQLite](https://swe.quest/tags/sqlite.md) (Data & databases)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)

## Prerequisites

- Astro basics
- TypeScript ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))
- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))

## Keywords

Astro, AstroDB, Turso, libSQL, Astro Actions, Server Islands, Netlify, Zod

## Related posts

- [Write that blog… with Turso!](https://swe.quest/articles/write-that-blog-with-turso-eb57ed9c715594d8.md): Turso · 2024-10-08 · Medium · 4 min read · SQLite, Databases, Frontend
  WriteThatBlog!, an aggregator of engineering blog posts tagged by writing pattern, is a single static HTML page on GitHub Pages that queries a replicated Turso database directly from the browser over HTTP, with no backend functions or proxies.
- [Build a Dynamic E-Commerce Store UI with Astro, Neon Postgres, and AWS Amplify](https://swe.quest/articles/build-a-dynamic-e-commerce-store-ui-with-astro-neon-postgres-and-aws-amplify-5d8746c814ec14f2.md): Neon · 2024-04-09 · Medium · 12 min read · PostgreSQL, Frontend, Serverless, E-commerce, Deployment
  An e-commerce storefront built with Astro in server-rendered mode, reading products from Neon serverless Postgres over HTTP through the @neondatabase/serverless driver and deployed to AWS Amplify on every Git commit.
- [Render, Remix, and Strapi: Let's Build a Productivity Tips App](https://swe.quest/articles/render-remix-and-strapi-let-s-build-a-productivity-tips-app-84639accd5384502.md): Render · 2022-04-01 · Medium · 7 min read · Frontend, JavaScript, Deployment, React
  A walkthrough of building a team Productivity Tips app with Strapi as a headless CMS back end and Remix as the front end, then deploying both to Render with a Blueprint (render.yaml).
- [Build your own Web Analytics Dashboard with Turso and Bolt](https://swe.quest/articles/build-your-own-web-analytics-dashboard-with-turso-and-bolt-74317d9f01cee8fc.md): Turso · 2024-12-03 · Medium · 4 min read · AI for coding, SQLite, Frontend, Analytics & OLAP
  Bolt can generate a Next.js 14 web analytics dashboard backed by a Turso database when you feed it the database schema and a detailed requirements prompt.
- [Storing Vercel's AI SDK chat messages in a Turso database](https://swe.quest/articles/storing-vercel-s-ai-sdk-chat-messages-in-a-turso-database-14cd5acbb753b2cf.md): Turso · 2024-08-07 · Medium · 5 min read · SQLite, LLMs, React, TypeScript
  Vercel AI SDK's useChat hook doesn't persist conversations, so chat history can be stored in a Turso (libSQL) table and reloaded on page render.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
