Documentation

Guides for setting up and using goodnight-web, explanations of how it works, and reference pages.

goodnight-web is a starter kit for company and shop websites. It runs on Cloudflare: one Worker with Static Assets serves the pages and runs the API, and one D1 database stores the inquiries. The only other service is GitHub, where your website's repository lives. Slack notifications are optional.

What you get

  • Pages and a blog. A website built with Astro, with a home page, company profile, services, news, blog, contact page, and privacy policy, in Japanese and English. Blog posts are Markdown files in the repository.
  • A contact form. You add, remove, and reorder its fields in the admin screen, with no code changes and no deploy. Submissions are checked with Turnstile and rate limited. Each one is saved to D1 before the visitor gets a response.
  • An admin screen for inquiries. You sign in with a passkey instead of a password. You can read inquiries, mark them unread or read, search by email address, review suspected spam separately, delete inquiries, export them as CSV, and edit the form fields.

Who it is for

  • A developer or a small web agency that builds websites for clients and hands them over.
  • Someone at a small company or startup who looks after the website. It also fits people without an engineering background who edit the site with AI tools.

You do not need to write server code. The contact API and the admin screen come from an npm package that you do not edit. Some maintenance remains; Maintenance lists it.

Start here

  • Getting started: create a copy of the website with the Deploy to Cloudflare button, enter the secrets, and create the first admin.
  • Set up Turnstile: create the Turnstile widget. The contact form does not accept submissions until you do.
  • Customizing the contact form: edit the fields in the admin screen. Also covers versions and history, the inquiry list, and the CSV export.

Concepts

  • Architecture: the parts of one website and what happens to a contact submission.
  • Database: the D1 tables, how queries are written, and how migrations reach your website and are applied.
  • Distribution and updates: what comes from the npm package and what you own in the starter, Dependabot updates, and why your repository must be private.
  • Maintenance: the work that remains once your website runs, such as reviewing and merging update pull requests.
  • How it works: how each part works and why it is built that way, such as passkey sign-in and deleting old data without Cron.

Reference

  • Security model: what protects the admin screen and the contact form, and what goodnight-web does not protect against.
  • Privacy notes: where data is stored, how long deleted data can be restored, and what the privacy policy template says.

On this page