Skip to content
This repository was archived by the owner on Oct 12, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@
"product:truth": "node scripts/check-product-truth.mjs",
"mobbin:run": "node scripts/run-design-system-proving-lab.mjs",
"mobbin:check": "node scripts/run-design-system-proving-lab.mjs --dry-run",
"ci": "node scripts/test-service-engine.mjs && node scripts/test-sales-intake-contract.mjs && node scripts/test-active-offer-projection.mjs && node scripts/test-active-operator-surfaces.mjs && node scripts/test-direction-proof-gate.mjs && node scripts/test-client-readiness-contract.mjs && node scripts/test-validated-service-client.mjs && node scripts/test-client-acceptance-gates.mjs && node scripts/check-product-truth.mjs && node scripts/check-human-service-kit.mjs && node scripts/test-design-system-proving-lab.mjs && node scripts/check-retention-automation.mjs && node scripts/test-retention-automation.mjs && node scripts/check-agency-defaults.mjs && node scripts/check-outbound-claim-safety.mjs && node scripts/check-outbound-send-readiness.mjs && node scripts/test-outbound-send-readiness.mjs && node scripts/test-public-conversion-signal.mjs && node scripts/test-public-heading-hierarchy.mjs && find scripts -name '*.mjs' -print0 | xargs -0 -n1 node --check",
"ci": "node scripts/test-service-engine.mjs && node scripts/test-sales-intake-contract.mjs && node scripts/test-active-offer-projection.mjs && node scripts/test-active-operator-surfaces.mjs && node scripts/test-direction-proof-gate.mjs && node scripts/test-client-readiness-contract.mjs && node scripts/test-validated-service-client.mjs && node scripts/test-client-acceptance-gates.mjs && node scripts/check-product-truth.mjs && node scripts/check-human-service-kit.mjs && node scripts/test-design-system-proving-lab.mjs && node scripts/check-retention-automation.mjs && node scripts/test-retention-automation.mjs && node scripts/check-agency-defaults.mjs && node scripts/check-outbound-claim-safety.mjs && node scripts/check-outbound-send-readiness.mjs && node scripts/test-outbound-send-readiness.mjs && node scripts/test-public-conversion-signal.mjs && node scripts/test-public-structured-data.mjs && node scripts/test-public-heading-hierarchy.mjs && find scripts -name '*.mjs' -print0 | xargs -0 -n1 node --check",
"check": "npm test",
"test": "node scripts/test-service-engine.mjs && node scripts/test-sales-intake-contract.mjs && node scripts/test-active-offer-projection.mjs && node scripts/test-active-operator-surfaces.mjs && node scripts/test-direction-proof-gate.mjs && node scripts/test-client-readiness-contract.mjs && node scripts/test-validated-service-client.mjs && node scripts/test-client-acceptance-gates.mjs && node scripts/check-product-truth.mjs && node scripts/check-human-service-kit.mjs && node scripts/test-design-system-proving-lab.mjs && node scripts/check-retention-automation.mjs && node scripts/test-retention-automation.mjs && node scripts/check-agency-defaults.mjs && node scripts/check-outbound-claim-safety.mjs && node scripts/check-outbound-send-readiness.mjs && node scripts/test-outbound-send-readiness.mjs && node scripts/test-public-conversion-signal.mjs && node scripts/test-public-heading-hierarchy.mjs && find scripts -name '*.mjs' -print0 | xargs -0 -n1 node --check"
"test": "node scripts/test-service-engine.mjs && node scripts/test-sales-intake-contract.mjs && node scripts/test-active-offer-projection.mjs && node scripts/test-active-operator-surfaces.mjs && node scripts/test-direction-proof-gate.mjs && node scripts/test-client-readiness-contract.mjs && node scripts/test-validated-service-client.mjs && node scripts/test-client-acceptance-gates.mjs && node scripts/check-product-truth.mjs && node scripts/check-human-service-kit.mjs && node scripts/test-design-system-proving-lab.mjs && node scripts/check-retention-automation.mjs && node scripts/test-retention-automation.mjs && node scripts/check-agency-defaults.mjs && node scripts/check-outbound-claim-safety.mjs && node scripts/check-outbound-send-readiness.mjs && node scripts/test-outbound-send-readiness.mjs && node scripts/test-public-conversion-signal.mjs && node scripts/test-public-structured-data.mjs && node scripts/test-public-heading-hierarchy.mjs && find scripts -name '*.mjs' -print0 | xargs -0 -n1 node --check"
},
"engines": {
"node": ">=20"
Expand Down
26 changes: 26 additions & 0 deletions public/contact/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,32 @@
<meta name="twitter:description" content="Public contact details and key public links for Tiny Studio, including support, privacy, app pages, and the Website Correction managed service.">
<meta name="twitter:image" content="https://tinystudio.in/social/tiny-studio-social.png">
<meta name="twitter:image:alt" content="Tiny Studio contact paths for support, privacy, and apps.">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"@id": "https://tinystudio.in/#organization",
"name": "Tiny Studio",
"url": "https://tinystudio.in/"
},
{
"@type": "ContactPage",
"@id": "https://tinystudio.in/contact/#webpage",
"url": "https://tinystudio.in/contact/",
"name": "Contact • Tiny Studio",
"isPartOf": {
"@id": "https://tinystudio.in/#website"
},
"about": {
"@id": "https://tinystudio.in/#organization"
},
"description": "Public contact details and key public links for Tiny Studio, including support, privacy, app pages, and the Website Correction managed service."
}
]
}
</script>
<link rel="apple-touch-icon" href="/apple-touch-icon.svg">
<link rel="preload" href="/styles.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/styles.css"></noscript>
Expand Down
26 changes: 26 additions & 0 deletions public/promptly/privacy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,32 @@
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Promptly Privacy • Tiny Studio">
<meta name="twitter:description" content="App-specific privacy policy for Promptly by Tiny Studio.">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"@id": "https://tinystudio.in/#organization",
"name": "Tiny Studio",
"url": "https://tinystudio.in/"
},
{
"@type": "WebPage",
"@id": "https://tinystudio.in/promptly/privacy/#webpage",
"url": "https://tinystudio.in/promptly/privacy/",
"name": "Promptly Privacy • Tiny Studio",
"isPartOf": {
"@id": "https://tinystudio.in/#website"
},
"about": {
"@id": "https://tinystudio.in/#organization"
},
Comment on lines +40 to +42

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point the privacy page at the Promptly app

For consumers that traverse this graph, about identifies Tiny Studio itself as the subject of an explicitly app-specific Promptly policy, even though the existing product schema defines the relevant entity as https://tinystudio.in/promptly/#app. Point about at that app entity and represent Tiny Studio as the publisher instead; otherwise the new metadata misclassifies the policy, and the assertion at scripts/test-public-structured-data.mjs:100-103 locks in that mismatch.

Useful? React with 👍 / 👎.

"description": "App-specific privacy policy for Promptly by Tiny Studio."
}
]
}
</script>
<link rel="apple-touch-icon" href="/apple-touch-icon.svg">
<link rel="preload" href="/styles.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/styles.css"></noscript>
Expand Down
120 changes: 120 additions & 0 deletions scripts/test-public-structured-data.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import { readFileSync } from "node:fs"
import { fileURLToPath } from "node:url"
import { dirname, join } from "node:path"

const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..")
const read = (p) => readFileSync(join(ROOT, p), "utf8")

let failures = 0
let checks = 0
const ok = (cond, msg) => {
checks++
if (cond) console.log(` ok ${msg}`)
else {
failures++
console.error(` FAIL ${msg}`)
}
}

const PAGES = [
{
file: "public/contact/index.html",
pageType: "ContactPage",
label: "contact page"
},
{
file: "public/promptly/privacy/index.html",
pageType: "WebPage",
label: "Promptly privacy policy page"
}
]

const ORG_ID = "https://tinystudio.in/#organization"
const ORG_NAME = "Tiny Studio"

const titleOf = (html) => {
const m = html.match(/<title>([^<]*)<\/title>/i)
return m ? m[1].trim() : ""
}
const descriptionOf = (html) => {
const m = html.match(/<meta\b[^>]*name="description"[^>]*content="([^"]*)"[^>]*>/i)
return m ? m[1] : ""
}
const canonicalOf = (html) => {
const m = html.match(/<link\s+rel="canonical"\s+href="([^"]*)">/i)
return m ? m[1] : ""
}
const jsonLdBlocksOf = (html) =>
[...html.matchAll(/<script\s+type="application\/ld\+json"[^>]*>([\s\S]*?)<\/script>/gi)].map(
(m) => m[1]
)

console.log("test-public-structured-data: JSON-LD structured data on public pages")

for (const { file, pageType, label } of PAGES) {
console.log(`A. ${file}`)
const html = read(file)
const blocks = jsonLdBlocksOf(html)

ok(blocks.length === 1, `${label} has exactly one application/ld+json block`)
if (blocks.length !== 1) continue

let graph
try {
graph = JSON.parse(blocks[0])
ok(true, `${label} JSON-LD block parses as valid JSON`)
} catch (err) {
ok(false, `${label} JSON-LD block parses as valid JSON (${err.message})`)
continue
}

ok(graph["@context"] === "https://schema.org", `${label} uses the schema.org context`)
ok(Array.isArray(graph["@graph"]), `${label} JSON-LD uses an @graph array`)

const canonical = canonicalOf(html)
const title = titleOf(html)
const description = descriptionOf(html)
ok(canonical.length > 0, `${label} page declares a canonical URL`)
ok(title.length > 0, `${label} page declares a title`)
ok(description.length > 0, `${label} page declares a description`)

const org = (graph["@graph"] || []).find(
(node) => node["@type"] === "Organization" && node["@id"] === ORG_ID
)
ok(
org && org.name === ORG_NAME && org.url === "https://tinystudio.in/",
`${label} JSON-LD carries the stable Tiny Studio organization reference`
)

const page = (graph["@graph"] || []).find((node) => node["@type"] === pageType)
ok(page !== undefined, `${label} JSON-LD declares the page as ${pageType}`)
if (!page) continue

ok(page.url === canonical, `${label} JSON-LD url matches the page canonical URL`)
ok(page.name === title, `${label} JSON-LD name matches the page title`)
ok(page.description === description, `${label} JSON-LD description matches the meta description`)
ok(
page["isPartOf"] && page["isPartOf"]["@id"] === "https://tinystudio.in/#website",
`${label} JSON-LD page is part of the Tiny Studio website`
)
ok(
page["about"] && page["about"]["@id"] === ORG_ID,
`${label} JSON-LD page is about the Tiny Studio organization`
)
}

console.log("B. npm test/ci wiring")
const pkg = JSON.parse(read("package.json"))
const wired = pkg.scripts.test.includes("test-public-structured-data.mjs")
ok(wired, "npm test runs the public structured data test")
ok(
pkg.scripts.check === "npm test",
"npm run check delegates to npm test"
)
ok(
pkg.scripts.ci.includes("test-public-structured-data.mjs"),
"npm run ci runs the public structured data test"
)

console.log(`\n${checks} checks, ${failures} failures`)
process.exit(failures === 0 ? 0 : 1)