whatisgithub

What is better-content?

invalid8/better-content — explained in plain English

Analysis updated 2026-05-18

1TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

A TypeScript library that lets you edit content directly on your live website and save it to your own Postgres or Firestore database, with no separate hosted CMS service.

Mindmap

mindmap
  root((repo))
    What it does
      Inline editing
      Own database
      No admin panel
    Tech stack
      TypeScript
      React Vue Svelte
      Postgres Firestore
    Use cases
      Editable websites
      Multi framework sites
      Custom CMS backend
    Audience
      Developers
      Framework agnostic teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add inline text editing to an existing Next.js, Vue, or Svelte site without building a separate admin panel.

USE CASE 2

Store editable page content in your own Postgres or Firestore database instead of a third-party CMS service.

USE CASE 3

Build a shared editing experience across an Astro site that mixes React, Vue, and Svelte islands.

USE CASE 4

Let trusted admins toggle edit mode on a live site and save changes with rollback if something goes wrong.

What is it built with?

TypeScriptReactVueSveltePostgreSQLFirestoreDrizzle ORMFirebase

How does it compare?

invalid8/better-content0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardeasy
Complexity3/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Needs your own Postgres or Firestore database plus optional Firebase auth to go beyond the in-browser demo.

Use, modify, and distribute freely, including commercially, as long as you keep the copyright notice.

So what is it?

better-content is a small TypeScript library for adding inline editing to a website you already run. Instead of building a separate admin panel, you wrap parts of your page in special components, and visitors with edit rights can click directly on the text, type changes, and save them. Those changes are stored in your own database, either Postgres or Firestore, not in a service the project runs for you. The idea is that you keep full control of your content and your data. The core engine has no ties to any particular frontend framework. It exposes a simple pattern for reading and watching data, and then React, Vue, and Svelte each get a thin layer on top so any of them can use the same underlying engine. This means a single project mixing frameworks, such as an Astro site with islands built in more than one framework, can share one editing engine across all of them. Saving and loading data goes through two small interfaces you can implement yourself: a data adapter with seven methods for reading and writing records, and a transport for sending save, patch, and remove requests. The project ships working examples for Postgres, using Drizzle, and Firestore, plus a REST transport by default, but nothing stops you from writing your own if your setup is different. On the authentication side, the project includes an adapter for Firebase, checking both an admin flag and an email allowlist before granting edit access, and visitors can also try editing anonymously in a way that never actually writes anything until access is confirmed on the server. There is also an optional inspector tool that shows a live view of your stored content while you are building, so you can see your data change as you edit fields. The maintainers describe the project as pre-1.0, meaning the way it works could still change in minor updates before it settles. It is released under the MIT license and is not affiliated with other similarly named better-prefixed tools. Setup requires Node and npm, along with a database of your choosing if you want persistence beyond the in-browser demo.

Copy-paste prompts

Prompt 1
Show me how to wrap a Next.js page with better-content's PageProvider and make one heading field inline editable.
Prompt 2
Write a Postgres DataAdapter setup for better-content using Drizzle so I can persist CMS content to my own database.
Prompt 3
Explain how to add Firebase-based admin authentication to a better-content API route using createCmsHandlers.
Prompt 4
Help me set up better-content's AnonymousEditProvider so visitors can try editing without risking real writes.

Frequently asked questions

What is better-content?

A TypeScript library that lets you edit content directly on your live website and save it to your own Postgres or Firestore database, with no separate hosted CMS service.

What language is better-content written in?

Mainly TypeScript. The stack also includes TypeScript, React, Vue.

What license does better-content use?

Use, modify, and distribute freely, including commercially, as long as you keep the copyright notice.

How hard is better-content to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is better-content for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.