Hasty Briefsbeta

TailwindSQL – Like TailwindCSS, but for SQL Queries in React Server Components

6 hours ago
  • #SQL
  • #React
  • #TailwindCSS
  • TailwindSQL allows writing SQL queries using Tailwind-style class names in React Server Components.
  • Queries are executed directly in React Server Components with zero client-side JavaScript.
  • Built on SQLite (better-sqlite3) for fast, local database access.
  • Supports multiple render modes: text, lists, tables, or JSON.
  • Syntax follows pattern: db-{table}-{column}-where-{field}-{value}-limit-{n}-orderby-{field}-{asc|desc}.
  • Includes a parser to transform class names into SQL queries and a query builder for safe SQL generation.
  • Setup requires Node.js 18+, npm/yarn, and involves cloning the repo, installing dependencies, seeding the database, and starting the dev server.
  • Project structure includes Next.js app directory, React components, and core logic files (parser, query-builder, db connection).
  • Licensed under MIT, built with Next.js, SQLite, and described as for exploration, not production.