Skip to content
Back to skills

Site

ASecurity

appforge phase 8. The app's Next.js website (home, support, privacy, terms, in English and French), in "site only" mode with no external service, a home page crafted with /hallmark, deployed on Vercel.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
developmentpythonshellbashnextjsawsgitapidatabasesecurity

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned December 4, 2026

npx -y skills add mrasoahaingo/appforge --skill site --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Site?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Site
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mrasoahaingo-site/badge)](https://www.skillsdirectory.com/skills/mrasoahaingo-site)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: site
description: appforge phase 8. The app's Next.js website (home, support, privacy, terms, in English and French), in "site only" mode with no external service, a home page crafted with /hallmark, deployed on Vercel.
disable-model-invocation: true
---

# Phase 8: website

A placeholder version of this site (as generated by `new-app.mjs`) is deployed right after phase 2, so the URLs exist early; this phase turns it into the real one.

Apple requires a support URL and a privacy policy. The website hosts them, and receives the account webhooks (Clerk, account deletion).

## Steps

1. **"Site only" mode** (`src/lib/cloud.ts`): without Clerk or Supabase keys, no `clerkMiddleware` or `ClerkProvider`, and server routes (webhooks, cron) return 503. With the keys, everything comes back.

2. **Pages**, English at the root and French under `/fr`:
   - `support`: contact email, FAQ;
   - `privacy`: describes **this version**. Guest mode: nothing leaves the device. Optional account: what is stored (email or phone, synced data), where (Supabase region), by whom (Clerk, Supabase, Vercel), and how to delete it in the app. `LEGAL.features.accounts = true`;
   - `terms`.

3. **`src/lib/legal.ts`**:
   - publisher, contact;
   - `features` flags (`accounts`, `plus`) that hide the passages about accounts, sync and subscriptions while the feature does not exist;
   - any missing value shows highlighted.
   - What was enough for a free 1.0: publisher = the app's name, contact = `<contact_email_pattern>` (e.g. `<slug>.app@gmail.com`), no postal address. French law (LCEN) allows this for a non-professional individual who names the host. **Before selling (1.1)**: full identity (name, address or company number) and a consumer mediator.
   - The Gmail account is created in Chrome up to the date-of-birth screen, then the user finishes.

4. **Home page** with `/hallmark`, and `/ask-emil` for motion:
   - pick alone a direction consistent with the app's. For Fastkind: "nocturnal editorial", large Fraunces, the app's palette;
   - real app screenshots;
   - verifiable facts (free, no account, data on the phone);
   - nothing announced that does not exist yet (Plus, accounts);
   - an App Store badge as a `TODO` until publication, and "Coming soon to the App Store" meanwhile. At approval (`ship` step 9): Apple's official badge artwork per language (vendored SVG, never redrawn), the listing URL (`/fr/app/id<n>` for French), and the Smart App Banner (`metadata.itunes.appId`); the App Store id lives once in `src/lib/site.ts`;
   - **SEO from the same searches as the listing** (`store` step 1): title, description and section headings use them where they read naturally, never a rival's name; `alternates` (canonical + `en`/`fr`/`x-default`) on every page; `app/sitemap.ts` with the same alternates and `app/robots.ts`; `MobileApplication` JSON-LD (price 0, iOS, App Store URL, **no rating or review**) and `FAQPage` JSON-LD on support only if it mirrors visible answers. `siteUrl` falls back to the production URL, never `localhost`, so a canonical never points at a dev address;
   - if the app draws its mascot live (Skia), the hero shows that render, not a still: record the dev screen on the simulator (`xcrun simctl io <udid> recordVideo`), crop, match its background to the page's exactly (`ffmpeg lutrgb`), loop it with a short crossfade, and ship WebM + MP4 (~150 KB) with a poster; Reduce Motion shows the poster. A web port of the renderer that lacks the app's material is worse than the video;
   - when the app's UI or rules change after this phase, redo the screenshots and every sentence that states a rule (home and support), then redeploy.

5. **Vercel**, through the CLI, with the `<vercel_scope>` team from the profile:

   **From the repo root, not from `apps/web`.** The website depends on `packages/core` through `workspace:*`: uploaded alone, `apps/web` fails at install. The project builds the whole monorepo with `apps/web` as its Root Directory.

   ```bash
   # at the repo root
   vercel link --yes --project <slug> --scope <vercel_scope>
   # once per project: Root Directory apps/web, pnpm install (the CLI has no flag for these)
   TEAM=$(python3 -c 'import json;print(json.load(open(".vercel/project.json"))["orgId"])')
   vercel api "/v9/projects/<slug>?teamId=$TEAM" -X PATCH \
     -f rootDirectory=apps/web -f "installCommand=pnpm install --frozen-lockfile" -f framework=nextjs < /dev/null
   vercel api "/v9/projects/<slug>?teamId=$TEAM" < /dev/null \
     | python3 -c 'import sys,json;d=json.load(sys.stdin);print(d["rootDirectory"],"|",d["installCommand"])'   # check
   vercel deploy --prod --yes --scope <vercel_scope>            # still from the repo root
   vercel inspect <url> --logs --scope <vercel_scope>           # if it fails
   ```

   `vercel api` answers nothing in an agent shell unless its stdin is closed: keep the `< /dev/null`. `.vercel/` stays git-ignored. Run the deploy in the background or with a long timeout: a foreground shell call is cut at 10 minutes.

   The Hobby plan allows only one cron per day: no cron in `vercel.json` for 1.0.

   **Security, once per project** (projects created by the CLI come with none of it):
   - **Deployment Protection**: every `<slug>-<hash>.vercel.app` deployment URL is public by default. Standard protection keeps only the production domain public:
     ```bash
     vercel api "/v9/projects/<slug>?teamId=$TEAM" -X PATCH --input - <<'EOF'
     {"ssoProtection":{"deploymentType":"all_except_custom_domains"}}
     EOF
     ```
     Check: a deployment URL answers 302 to `vercel.com/sso-api`, the production domain 200.
   - **Function region next to the database** the privacy page names: `"regions": ["cdg1"]` in `apps/web/vercel.json` for a Paris Supabase (the default is `iad1`, in the US).
   - **HTTP headers** in `next.config.ts` `headers()` for `/:path*`: a nonce-free CSP (`default-src 'self'`, `script-src 'self' 'unsafe-inline'` because pages are prerendered with Cache Components and a nonce would make each render per request; `'unsafe-eval'` in dev only; `vercel.live` only when `VERCEL_ENV === "preview"`; `object-src 'none'`, `base-uri 'self'`, `form-action 'self'`, `frame-ancestors 'none'`), `X-Content-Type-Options: nosniff`, `Referrer-Policy: strict-origin-when-cross-origin`, `X-Frame-Options: DENY`, a `Permissions-Policy` denying camera, microphone, geolocation, payment…, `Cross-Origin-Opener-Policy: same-origin`. Test in a browser that the fonts, images and hero video load with no CSP error. (`access-control-allow-origin: *` on static files comes from Vercel, not from the app.)
   - **Webhooks**: only `POST` exported; 400 before reading the body when the Svix headers are missing, 413 above a size cap, signature verified before any parsing, nothing secret or personal in logs, 503 without keys ("site only" mode).
   - Secrets added later (`CLERK_WEBHOOK_SIGNING_SECRET`, `SUPABASE_SECRET_KEY`): **Sensitive**, Production only, never Preview.

   **Custom domain** (bought on the user's yes with `vercel domains buy <domain> --scope <vercel_scope> --amount <approved price> --use-billing-details --first-name … --last-name … --phone … --auto-renew`): add it and `www` (308 to the apex) to the project with `vercel api /v10/projects/<slug>/domains`; switch `PRODUCTION_URL` in `site.ts` and the URLs in `store.config.json`. **Redirect `<slug>.vercel.app` to it only once `https://<domain>` answers 200**: a fresh `.app` takes minutes to publish its nameservers, and an early redirect takes the site down.

6. **Check online** the 8 pages (`curl -sL`, the root redirects by language; read the HTML with a parser, a proxied shell may truncate it), plus every video and image the home page loads (a proxy matcher that does not exclude `.mp4`/`.webm` turns them into 404s; the overlay's `proxy.ts` excludes them): home, support, privacy and terms, in English and in French. Each returns 200, and `curl` + `grep` finds neither "to be completed" nor brackets.

## Done when

- The `https://<slug>.vercel.app` URL is recorded in the log and in `store.config.json` (support, marketing, privacy).
- The 8 pages are checked online, with the security headers, canonical and hreflang in the HTML, `/sitemap.xml` and `/robots.txt` answering 200.
- Deployment Protection is standard and the function region matches the database's.
- Commit done.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.