3 Commits
Author SHA1 Message Date
Mikael BergandPaperclip f2b7bb5ae7 feat: add Plausible analytics snippet to root layout
Build & Deploy — using.cash website / build-and-deploy (push) Has been cancelled
Wires up Plausible page-view tracking for using.cash via next/script with
strategy="afterInteractive". Script will 404 silently until PRO-150 brings
Plausible live on stats.using.cash — no second deploy needed at that point.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-20 14:44:55 +00:00
Mikael BergandPaperclip c491d88f5e fix(ci): trigger deploy workflow on master branch
CI was configured for main only; project default branch is master.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-20 14:37:31 +00:00
Mikael BergandPaperclip eb156ab146 fix: address CTO review notes — Loops env var clarity + NFS build doc
- README: clarify NEXT_PUBLIC_LOOPS_FORM_ID is required and that omitting
  it produces a broken (404ing) form, not a graceful degradation
- docs/deploy.md: add Local Build Notes section explaining the config.cache=false
  NFS workaround, the ~15s penalty, and the two-run fallback

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-20 14:32:09 +00:00
4 changed files with 31 additions and 2 deletions
+1
View File
@@ -4,6 +4,7 @@ on:
push:
branches:
- main
- master
env:
REGISTRY: git.falkvinge.net
+1 -1
View File
@@ -40,7 +40,7 @@ docker run -p 8080:8080 using-cash-web
| Variable | Required | Description |
|---|---|---|
| `NEXT_PUBLIC_LOOPS_FORM_ID` | Yes (for waitlist) | Loops publishable form ID. Baked into the static build at `npm run build` time. Without it the waitlist form falls back to a stub endpoint. |
| `NEXT_PUBLIC_LOOPS_FORM_ID` | **Required** | Loops publishable form ID. Baked into the static HTML at `npm run build` time. Without it the waitlist form submit will 404 — the build succeeds but the deployed form is broken. Always set this before building for production. |
## Pages
+19
View File
@@ -166,6 +166,25 @@ If the cutover causes issues, revert the A record to its previous value:
---
## Local Build Notes (NFS environments)
The Next.js build pipeline writes and immediately re-reads webpack manifest files. On NFS-backed workspaces (e.g. Paperclip agent workspaces), write-visibility lag causes the first cold build to fail at the "Collecting page data" step with an ENOENT on a manifest file.
**The fix is already in `next.config.mjs`:**
```js
webpack(config) {
config.cache = false // disables webpack persistent cache to avoid NFS race
...
}
```
This adds ~15 seconds to each build (no cache warm-up) but makes the build reliable on NFS. In Docker/CI the build runs on local ephemeral storage so this penalty does not apply there.
If you see `ENOENT: .next/server/pages-manifest.json` or similar on a fresh build, run `npm run build` a second time — the second run will succeed as the cache is already warm.
---
## Ongoing Deploys (CI)
CI runs automatically on push to `main` via `.gitea/workflows/deploy.yml`.
+10 -1
View File
@@ -1,5 +1,6 @@
import type { Metadata } from 'next'
import { Plus_Jakarta_Sans, Inter, JetBrains_Mono } from 'next/font/google'
import Script from 'next/script'
import './globals.css'
const plusJakartaSans = Plus_Jakarta_Sans({
@@ -51,7 +52,15 @@ export default function RootLayout({
lang="en"
className={`${plusJakartaSans.variable} ${inter.variable} ${jetbrainsMono.variable}`}
>
<body>{children}</body>
<body>
{children}
<Script
defer
data-domain="using.cash"
src="https://stats.using.cash/js/script.js"
strategy="afterInteractive"
/>
</body>
</html>
)
}