Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Turso 6 min read How-to mediumAdept

Add comments to your Astro blog with AstroDB and Turso

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.

Assumes: Astro basicsTypeScriptSQL basics

Related posts

  • Write that blog… with Turso!

    Turso mediumAdept

    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. A read-only auth token is deliberately embedded in the page because the data is public anyway. The schema is one five-column table, and content is managed with a small shell script around `turso db shell` that returns the ROWID, which makes later updates and deletes trivial.

  • Build a Dynamic E-Commerce Store UI with Astro, Neon Postgres, and AWS Amplify

    Neon mediumAdept

    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. The walkthrough covers provisioning a pooled Neon connection string, adding Tailwind, configuring the astro-aws-amplify adapter and an amplify.yml that copies node_modules and .env into the compute bundle, and seeding a products table with a tsx script. It then builds a shared layout, a product listing page, and a dynamic /p/[slug] product page.

  • Render, Remix, and Strapi: Let's Build a Productivity Tips App

    Render mediumAdept

    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). Strapi is configured to use SQLite locally and PostgreSQL in production, Cloudinary for media, and a Tip content type whose schema deploys with the code while content stays per-environment. The Remix app reads tips through Strapi's REST API using a read-only API token supplied via environment variables. Suggested extensions include search, OAuth login and zoomable images.

  • Build your own Web Analytics Dashboard with Turso and Bolt

    Turso mediumAdept

    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. The walkthrough covers dumping the schema with the Turso CLI, then writing a prompt that specifies libsql-stateless-easy, shadcn/ui, server-side rendering and date-range filtering, and finally wiring up the database URL and auth token in .env. Follow-up prompts refine the output, for example adding country flags and device styling. When Bolt can't fix an error itself, the suggested remedy is to give it more context, such as the framework's latest documentation.

  • Storing Vercel's AI SDK chat messages in a Turso database

    Turso mediumAdept

    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. A server component queries the messages table and passes rows as initialMessages to useChat. The API route inserts the user's last message before calling streamText, and an onFinish callback inserts the assistant's reply. Suggested extensions include a chats/sessions table with foreign keys, background persistence via server actions, or a database per user or chat.

The quest for software engineering knowledge.

Look:
Layout: