Skip to content
Early bird + Black Friday · 73% off

Get ZeroDirs for $179 $49

Claim $49 deal

The submission form

/submit/ takes a listing in two steps and stores a pending row with a signed status link. features.submissions: true in site.config.ts turns it on, over a D1 database and two admin secrets.

  1. Switch the form on.

    site.config.ts
    features: { submissions: true },
    Terminal
    pnpm check:config

    site.config.ts OK — <your site name> (https://your-domain.com).

  2. Give it a database and secrets.

    Terminal
    pnpm cf:setup

    Creates the D1 database, applies the migrations, deploys, and sets TOKEN_SECRET on the Worker; pnpm cf:secrets --list shows it.

  3. Try it on a fresh clone.

    Terminal
    pnpm dev

    It writes .env from .env.example and applies the migrations to the local database, one dev: line each. Open http://localhost:4321/submit/, submit a listing, and land on /submit/status/<token>/?new=1 under “In the review queue”.

  4. Read what it wrote.

    Terminal
    pnpm exec wrangler d1 execute DB --local --command "SELECT name, status, tier, payment_status FROM listings ORDER BY created_at DESC LIMIT 1"

    One row: pending, free tier, payment_status n/a; email_outbox holds submitted and admin-new-submission rows. Sign in as an address in admin.emails (Google, or a password proven by the reset link) and open /admin/: the queue offers Approve and Reject.

What to check Where You should see
The form https://<your domain>/submit/ an address field and Continue; signed out with accounts on, a 302 to /login/?next=%2Fsubmit%2F
A free submission after “Submit for review” a 303 to /submit/status/<token>/?new=1, “In the review queue”, banner “Thanks — we have your submission.”
The row listings status pending; payment_status n/a on free, unpaid on priced
The queue https://<your domain>/admin/ the “Waiting for review” tile counts it; the row offers Approve
A bad link /submit/status/not-a-real-token/ 404 and “This link no longer works”

The form’s second step

  • A failed or oversized fetch still reaches step 2 empty. Only “Enter a full URL, including https://.” and “That address is not a public website.” stop at step 1.
  • The honeypot is a hidden field named company: filled in, nothing is written; the visitor still gets a 303 to /submit/?sent=1 and the thank-you banner.
  • One host, one live listing: a pending address answers with its status link, a listed one with the listing.
  • /submit/ is disallowed in robots.txt, the status page is noindex, and a pending free submission shows its wait estimate.
Configuration What a visitor sees What /admin/ reports Fix
features.submissions: false no Submit button; nothing on /about/, /terms/, /privacy/ nothing set it to true
TOKEN_SECRET unset step 2 answers “Submissions are temporarily unavailable. Please try again later.”; status links 404 error: “Missing secret TOKEN_SECRET … Status links and checkout links cannot be signed.” pnpm cf:secrets TOKEN_SECRET; locally, .env
TOKEN_SECRET still the placeholder from .env.example every link is forgeable error: “TOKEN_SECRET is still the value from .env.example…” pnpm cf:setup
no MEDIA bucket bound listings arrive without a logo nothing pnpm cf:setup
providers.email: 'console' no receipt arrives; it is logged as email(console): to=… subject=… warning: providers.email is "console": submitters get no mail, it is only logged. Email
features.payments on, Stripe secrets missing checkout answers 503 “Payment is temporarily unavailable…” one error per missing key, ending “Paid tiers cannot complete a checkout.” Plans and payments

features.submissions, features.honeypot, and the limits group — submissionsPerEmailPerDay, logoMaxBytes, descriptionMaxChars, unpaidTtlDays, screenshotMaxBytes, which is declared but not read by the form. Which plans are offered comes from tiers and the notification address from admin; the defaults are in features and limits.

  • site.config.ts — features, limits, tiers
  • src/pages/submit/index.astro — both steps, and the redirects after a POST
  • src/pages/submit/status/[token].astro — verifies the token, then reads the row
  • src/templates/submit/SubmitPage.astro — the form, the honeypot, the plan cards
  • src/templates/submit/StatusPage.astro — the receipt page
  • src/actions/submit.ts — submit.prefill and submit.create, glue only
  • src/server/submit.ts — the validation order and the insert
  • src/server/token.ts — status and checkout tokens
  • src/server/meta-fetcher.ts — the step-1 fetch and its SSRF list
  • src/server/media.ts — logo upload and remote logo fetch
  • src/server/secrets.ts — configGaps(), the report /admin/ renders
  • src/server/email/templates/submitted.ts — the receipt
  • tests/e2e/submit.spec.ts — the flow, the honeypot and the bad token, in a browser