create-ailk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +39 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +80 -0
- package/dist/copy.d.ts +8 -0
- package/dist/copy.js +109 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/lib/pro-callout.d.ts +12 -0
- package/dist/lib/pro-callout.js +20 -0
- package/dist/parse-args.d.ts +13 -0
- package/dist/parse-args.js +81 -0
- package/dist/programmatic.d.ts +49 -0
- package/dist/programmatic.js +89 -0
- package/dist/substitute.d.ts +31 -0
- package/dist/substitute.js +45 -0
- package/dist/validate.d.ts +8 -0
- package/dist/validate.js +70 -0
- package/package.json +47 -0
- package/templates/.claude/.gitkeep +0 -0
- package/templates/.claude/agents/web.md +80 -0
- package/templates/.claude/rules/architecture.md +62 -0
- package/templates/.claude/rules/preserve-existing-style.md +51 -0
- package/templates/.claude/skills/README.md +43 -0
- package/templates/.claude/skills/add-schema/SKILL.md +270 -0
- package/templates/.claude/skills/add-schema/references/conflict-handling.md +200 -0
- package/templates/.claude/skills/add-schema/references/file-finding.md +123 -0
- package/templates/.claude/skills/add-schema/references/schema-types.md +131 -0
- package/templates/.claude/skills/audit-site/SKILL.md +213 -0
- package/templates/.claude/skills/audit-site/references/common-errors.md +113 -0
- package/templates/.claude/skills/audit-site/references/findings-glossary.md +138 -0
- package/templates/.claude/skills/audit-site/references/severity-levels.md +114 -0
- package/templates/.claude/skills/provision-config/SKILL.md +243 -0
- package/templates/.claude/skills/provision-config/references/env-vars-template.md +184 -0
- package/templates/.claude/skills/provision-config/references/runbook-template.md +248 -0
- package/templates/.claude/skills/provision-config/references/vercel-json-template.md +98 -0
- package/templates/.claude/skills/scaffold-auth/SKILL.md +261 -0
- package/templates/.claude/skills/scaffold-auth/references/env-vars.md +91 -0
- package/templates/.claude/skills/scaffold-auth/references/oauth-app-setup.md +171 -0
- package/templates/.claude/skills/scaffold-commerce/SKILL.md +310 -0
- package/templates/.claude/skills/scaffold-commerce/references/lookup-keys-template.md +71 -0
- package/templates/.claude/skills/scaffold-commerce/references/marketplace-brand-pages.md +83 -0
- package/templates/.claude/skills/scaffold-commerce/templates/marketplace-cta-route.tsx.tmpl +72 -0
- package/templates/.claude/skills/scaffold-page/SKILL.md +243 -0
- package/templates/.claude/skills/scaffold-page/references/page-types.md +169 -0
- package/templates/.claude/skills/scaffold-page/templates/content.mdx.tmpl +28 -0
- package/templates/.claude/skills/scaffold-page/templates/route.tsx.tmpl +28 -0
- package/templates/.claude/skills/suggest-site-pages/SKILL.md +242 -0
- package/templates/.claude/skills/suggest-site-pages/references/categories.md +287 -0
- package/templates/.env.example +205 -0
- package/templates/.gitkeep +2 -0
- package/templates/CLAUDE.md +142 -0
- package/templates/CONVENTIONS.md +222 -0
- package/templates/README.md +110 -0
- package/templates/apps/api/.env.example +40 -0
- package/templates/apps/api/CLAUDE.md +63 -0
- package/templates/apps/api/api/index.ts +144 -0
- package/templates/apps/api/jest.config.cjs +74 -0
- package/templates/apps/api/package.json +54 -0
- package/templates/apps/api/src/__tests__/factories/content-fixture.ts +138 -0
- package/templates/apps/api/src/__tests__/factories/index.ts +70 -0
- package/templates/apps/api/src/__tests__/factories/lead-fixture.ts +82 -0
- package/templates/apps/api/src/__tests__/index.test.ts +118 -0
- package/templates/apps/api/src/__tests__/server.test.ts +207 -0
- package/templates/apps/api/src/__tests__/services/enrichment-shim.test.ts +126 -0
- package/templates/apps/api/src/__tests__/setup.ts +24 -0
- package/templates/apps/api/src/cli.ts +30 -0
- package/templates/apps/api/src/config/__tests__/index.test.ts +97 -0
- package/templates/apps/api/src/config/index.ts +56 -0
- package/templates/apps/api/src/index.ts +32 -0
- package/templates/apps/api/src/lib/__mocks__/prisma-client.js +15 -0
- package/templates/apps/api/src/lib/__mocks__/prisma.ts +45 -0
- package/templates/apps/api/src/lib/__tests__/content-adapter.test.ts +178 -0
- package/templates/apps/api/src/lib/__tests__/error-serializer.test.ts +100 -0
- package/templates/apps/api/src/lib/__tests__/errors.test.ts +94 -0
- package/templates/apps/api/src/lib/__tests__/file-fallback.test.ts +144 -0
- package/templates/apps/api/src/lib/__tests__/fixtures/HomePage/home.mdx +8 -0
- package/templates/apps/api/src/lib/__tests__/lead-capture-store.test.ts +227 -0
- package/templates/apps/api/src/lib/__tests__/outbound-http.test.ts +125 -0
- package/templates/apps/api/src/lib/__tests__/prisma.test.ts +165 -0
- package/templates/apps/api/src/lib/__tests__/require-paid-tier.test.ts +129 -0
- package/templates/apps/api/src/lib/__tests__/stripe.test.ts +74 -0
- package/templates/apps/api/src/lib/content-adapter.ts +86 -0
- package/templates/apps/api/src/lib/error-serializer.ts +77 -0
- package/templates/apps/api/src/lib/errors.ts +95 -0
- package/templates/apps/api/src/lib/file-fallback.ts +87 -0
- package/templates/apps/api/src/lib/lead-capture-store.ts +110 -0
- package/templates/apps/api/src/lib/locales.ts +201 -0
- package/templates/apps/api/src/lib/outbound-http.ts +122 -0
- package/templates/apps/api/src/lib/prisma.ts +21 -0
- package/templates/apps/api/src/lib/require-paid-tier.ts +53 -0
- package/templates/apps/api/src/lib/stripe.ts +30 -0
- package/templates/apps/api/src/lib/webhook-idempotency.ts +92 -0
- package/templates/apps/api/src/middleware/__tests__/adversarial/bearer-token-format.test.ts +111 -0
- package/templates/apps/api/src/middleware/__tests__/adversarial/cookie-or-bearer-precedence.test.ts +172 -0
- package/templates/apps/api/src/middleware/__tests__/adversarial/csrf-bearer-skip.test.ts +119 -0
- package/templates/apps/api/src/middleware/__tests__/adversarial/csrf-cookie-path.test.ts +138 -0
- package/templates/apps/api/src/middleware/__tests__/adversarial/session-fixation.test.ts +149 -0
- package/templates/apps/api/src/middleware/__tests__/adversarial/session-timeout.test.ts +139 -0
- package/templates/apps/api/src/middleware/__tests__/auth.bearer-path.test.ts +175 -0
- package/templates/apps/api/src/middleware/__tests__/auth.both-present-precedence.test.ts +76 -0
- package/templates/apps/api/src/middleware/__tests__/auth.cookie-path.test.ts +153 -0
- package/templates/apps/api/src/middleware/__tests__/auth.neither-present.test.ts +72 -0
- package/templates/apps/api/src/middleware/__tests__/rate-limit.test.ts +292 -0
- package/templates/apps/api/src/middleware/auth.ts +246 -0
- package/templates/apps/api/src/middleware/rate-limit.ts +132 -0
- package/templates/apps/api/src/openapi/__tests__/openapi.test.ts +129 -0
- package/templates/apps/api/src/openapi/index.ts +12 -0
- package/templates/apps/api/src/openapi/spec.ts +408 -0
- package/templates/apps/api/src/routes/auth/__tests__/auth-tokens.functional.test.ts +193 -0
- package/templates/apps/api/src/routes/auth/__tests__/auth-user.functional.test.ts +201 -0
- package/templates/apps/api/src/routes/auth/__tests__/tokens.test.ts +294 -0
- package/templates/apps/api/src/routes/auth/__tests__/user.test.ts +486 -0
- package/templates/apps/api/src/routes/auth/tokens.ts +199 -0
- package/templates/apps/api/src/routes/auth/user.ts +244 -0
- package/templates/apps/api/src/routes/checkout/__tests__/sessions.test.ts +588 -0
- package/templates/apps/api/src/routes/checkout/index.ts +13 -0
- package/templates/apps/api/src/routes/checkout/sessions.ts +185 -0
- package/templates/apps/api/src/routes/content/__tests__/create.test.ts +239 -0
- package/templates/apps/api/src/routes/content/__tests__/delete.test.ts +201 -0
- package/templates/apps/api/src/routes/content/__tests__/get-page.test.ts +141 -0
- package/templates/apps/api/src/routes/content/__tests__/list-pages.test.ts +122 -0
- package/templates/apps/api/src/routes/content/__tests__/list-types.test.ts +44 -0
- package/templates/apps/api/src/routes/content/__tests__/locale.test.ts +118 -0
- package/templates/apps/api/src/routes/content/__tests__/rate-limit.test.ts +51 -0
- package/templates/apps/api/src/routes/content/__tests__/update.test.ts +252 -0
- package/templates/apps/api/src/routes/content/create.ts +114 -0
- package/templates/apps/api/src/routes/content/delete.ts +81 -0
- package/templates/apps/api/src/routes/content/get-page.ts +98 -0
- package/templates/apps/api/src/routes/content/index.ts +32 -0
- package/templates/apps/api/src/routes/content/list-pages.ts +83 -0
- package/templates/apps/api/src/routes/content/list-types.ts +19 -0
- package/templates/apps/api/src/routes/content/rate-limit.ts +13 -0
- package/templates/apps/api/src/routes/content/slug.ts +9 -0
- package/templates/apps/api/src/routes/content/update.ts +111 -0
- package/templates/apps/api/src/routes/leads/__tests__/index.test.ts +415 -0
- package/templates/apps/api/src/routes/leads/__tests__/track.test.ts +165 -0
- package/templates/apps/api/src/routes/leads/index.ts +130 -0
- package/templates/apps/api/src/routes/test/auth/__tests__/session.test.ts +296 -0
- package/templates/apps/api/src/routes/test/auth/session.ts +141 -0
- package/templates/apps/api/src/routes/webhooks/README.md +57 -0
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-idempotency.test.ts +247 -0
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-rate-limit.test.ts +198 -0
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe.test.ts +633 -0
- package/templates/apps/api/src/routes/webhooks/index.ts +41 -0
- package/templates/apps/api/src/routes/webhooks/stripe.ts +253 -0
- package/templates/apps/api/src/server.ts +157 -0
- package/templates/apps/api/src/services/__tests__/lead-routing.test.ts +395 -0
- package/templates/apps/api/src/services/enrichment-shim.ts +53 -0
- package/templates/apps/api/src/services/lead-routing.ts +338 -0
- package/templates/apps/api/tsconfig.json +34 -0
- package/templates/apps/api/vercel.json +17 -0
- package/templates/apps/mcp/.env.example +52 -0
- package/templates/apps/mcp/CLAUDE.md +84 -0
- package/templates/apps/mcp/__tests__/abuse/daily-cap.test.ts +52 -0
- package/templates/apps/mcp/__tests__/abuse/email-validator.test.ts +46 -0
- package/templates/apps/mcp/__tests__/abuse/honeypot.test.ts +36 -0
- package/templates/apps/mcp/__tests__/abuse/user-agent-deny.test.ts +54 -0
- package/templates/apps/mcp/__tests__/aeo-cli-parity.test.ts +110 -0
- package/templates/apps/mcp/__tests__/audit-single-page.test.ts +213 -0
- package/templates/apps/mcp/__tests__/audit.test.ts +217 -0
- package/templates/apps/mcp/__tests__/catalog-drift.test.ts +52 -0
- package/templates/apps/mcp/__tests__/create_page.test.ts +201 -0
- package/templates/apps/mcp/__tests__/delete_page.test.ts +176 -0
- package/templates/apps/mcp/__tests__/get_business_hours.test.ts +82 -0
- package/templates/apps/mcp/__tests__/get_faq.test.ts +80 -0
- package/templates/apps/mcp/__tests__/get_locations.test.ts +65 -0
- package/templates/apps/mcp/__tests__/get_offerings.test.ts +90 -0
- package/templates/apps/mcp/__tests__/get_pricing.test.ts +80 -0
- package/templates/apps/mcp/__tests__/get_site_info.test.ts +81 -0
- package/templates/apps/mcp/__tests__/http-transport.test.ts +323 -0
- package/templates/apps/mcp/__tests__/lib/errors.test.ts +75 -0
- package/templates/apps/mcp/__tests__/lib/require-paid-tier.test.ts +75 -0
- package/templates/apps/mcp/__tests__/list_pages.test.ts +112 -0
- package/templates/apps/mcp/__tests__/locale.test.ts +135 -0
- package/templates/apps/mcp/__tests__/parity.test.ts +205 -0
- package/templates/apps/mcp/__tests__/purchase-disabled.test.ts +34 -0
- package/templates/apps/mcp/__tests__/read_content.test.ts +153 -0
- package/templates/apps/mcp/__tests__/request_callback.test.ts +163 -0
- package/templates/apps/mcp/__tests__/search_content.test.ts +153 -0
- package/templates/apps/mcp/__tests__/server.test.ts +115 -0
- package/templates/apps/mcp/__tests__/submit_lead.test.ts +165 -0
- package/templates/apps/mcp/__tests__/subscribe_newsletter.test.ts +161 -0
- package/templates/apps/mcp/__tests__/tools/purchase.test.ts +227 -0
- package/templates/apps/mcp/__tests__/tools/scaffold.test.ts +237 -0
- package/templates/apps/mcp/__tests__/update_page.test.ts +195 -0
- package/templates/apps/mcp/jest.config.cjs +82 -0
- package/templates/apps/mcp/package.json +37 -0
- package/templates/apps/mcp/src/abuse/daily-cap.ts +47 -0
- package/templates/apps/mcp/src/abuse/email-validator.ts +25 -0
- package/templates/apps/mcp/src/abuse/honeypot.ts +21 -0
- package/templates/apps/mcp/src/abuse/index.ts +111 -0
- package/templates/apps/mcp/src/abuse/user-agent-deny.ts +58 -0
- package/templates/apps/mcp/src/http-transport.ts +303 -0
- package/templates/apps/mcp/src/index.ts +67 -0
- package/templates/apps/mcp/src/lib/audit-single-page.ts +194 -0
- package/templates/apps/mcp/src/lib/errors.ts +61 -0
- package/templates/apps/mcp/src/lib/locales.ts +171 -0
- package/templates/apps/mcp/src/lib/require-paid-tier.ts +44 -0
- package/templates/apps/mcp/src/lib/resolve-locale.ts +30 -0
- package/templates/apps/mcp/src/server.ts +139 -0
- package/templates/apps/mcp/src/tools/audit.ts +103 -0
- package/templates/apps/mcp/src/tools/capture_lead.ts +52 -0
- package/templates/apps/mcp/src/tools/create_page.ts +95 -0
- package/templates/apps/mcp/src/tools/delete_page.ts +73 -0
- package/templates/apps/mcp/src/tools/get_business_hours.ts +66 -0
- package/templates/apps/mcp/src/tools/get_faq.ts +69 -0
- package/templates/apps/mcp/src/tools/get_locations.ts +85 -0
- package/templates/apps/mcp/src/tools/get_offerings.ts +66 -0
- package/templates/apps/mcp/src/tools/get_pricing.ts +74 -0
- package/templates/apps/mcp/src/tools/get_site_info.ts +84 -0
- package/templates/apps/mcp/src/tools/index.ts +125 -0
- package/templates/apps/mcp/src/tools/list_pages.ts +72 -0
- package/templates/apps/mcp/src/tools/purchase.ts +89 -0
- package/templates/apps/mcp/src/tools/read_content.ts +61 -0
- package/templates/apps/mcp/src/tools/request_callback.ts +51 -0
- package/templates/apps/mcp/src/tools/scaffold.ts +119 -0
- package/templates/apps/mcp/src/tools/search_content.ts +59 -0
- package/templates/apps/mcp/src/tools/subscribe_newsletter.ts +47 -0
- package/templates/apps/mcp/src/tools/update_page.ts +91 -0
- package/templates/apps/mcp/tsconfig.json +19 -0
- package/templates/apps/web/.env.example +47 -0
- package/templates/apps/web/CLAUDE.md +81 -0
- package/templates/apps/web/__tests__/auth/adversarial/cookie-attributes.test.ts +94 -0
- package/templates/apps/web/__tests__/auth/adversarial/oauth-state-parameter.test.ts +75 -0
- package/templates/apps/web/__tests__/auth/adversarial/redirect-uri-allowlist.test.ts +82 -0
- package/templates/apps/web/__tests__/auth/env-helpers.test.ts +168 -0
- package/templates/apps/web/__tests__/authority-list-routes.test.tsx +208 -0
- package/templates/apps/web/__tests__/better-stack.test.ts +66 -0
- package/templates/apps/web/__tests__/blog-dir-resolution.test.ts +87 -0
- package/templates/apps/web/__tests__/blog-source-populated.test.ts +130 -0
- package/templates/apps/web/__tests__/data-testid-coverage.test.tsx +60 -0
- package/templates/apps/web/__tests__/google-analytics.test.tsx +104 -0
- package/templates/apps/web/__tests__/i18n/middleware.test.ts +119 -0
- package/templates/apps/web/__tests__/i18n/routing.test.ts +114 -0
- package/templates/apps/web/__tests__/i18n/translations.test.ts +191 -0
- package/templates/apps/web/__tests__/json-ld.test.ts +98 -0
- package/templates/apps/web/__tests__/knowledge-events-routes.test.tsx +580 -0
- package/templates/apps/web/__tests__/layout-stealth.test.ts +39 -0
- package/templates/apps/web/__tests__/lighthouse-fixtures/improvement-image-shrink.tsx +103 -0
- package/templates/apps/web/__tests__/lighthouse-fixtures/override-fixture.md +114 -0
- package/templates/apps/web/__tests__/lighthouse-fixtures/regression-bloat.tsx +94 -0
- package/templates/apps/web/__tests__/page.test.tsx +230 -0
- package/templates/apps/web/__tests__/products-services-phase1.test.tsx +321 -0
- package/templates/apps/web/__tests__/projects-routes.test.tsx +392 -0
- package/templates/apps/web/__tests__/resources-downloads-integrations-phase2.test.tsx +475 -0
- package/templates/apps/web/__tests__/routes/ai-plugin-json.test.ts +53 -0
- package/templates/apps/web/__tests__/routes/blog-route.test.tsx +191 -0
- package/templates/apps/web/__tests__/routes/llms-txt.test.ts +123 -0
- package/templates/apps/web/__tests__/routes/robots-txt.test.ts +52 -0
- package/templates/apps/web/__tests__/routes/sitemap-xml.test.ts +78 -0
- package/templates/apps/web/__tests__/routes/well-known-mcp.test.ts +203 -0
- package/templates/apps/web/__tests__/section-routes.test.tsx +693 -0
- package/templates/apps/web/__tests__/security-headers.test.ts +201 -0
- package/templates/apps/web/__tests__/sentry-config.test.ts +116 -0
- package/templates/apps/web/__tests__/setup.ts +82 -0
- package/templates/apps/web/__tests__/sitemap-locales.test.ts +415 -0
- package/templates/apps/web/__tests__/standalone-informational-routes.test.tsx +844 -0
- package/templates/apps/web/app/.well-known/ai-plugin.json/route.ts +81 -0
- package/templates/apps/web/app/.well-known/mcp.json/build-manifest.ts +110 -0
- package/templates/apps/web/app/.well-known/mcp.json/route.ts +58 -0
- package/templates/apps/web/app/[locale]/__tests__/layout.test.tsx +120 -0
- package/templates/apps/web/app/[locale]/__tests__/page-renderer-migration.test.tsx +202 -0
- package/templates/apps/web/app/[locale]/about/page.tsx +31 -0
- package/templates/apps/web/app/[locale]/blog/[[...slug]]/page.tsx +173 -0
- package/templates/apps/web/app/[locale]/careers/[slug]/page.tsx +45 -0
- package/templates/apps/web/app/[locale]/careers/__tests__/page-renderer-migration.test.tsx +117 -0
- package/templates/apps/web/app/[locale]/careers/page.tsx +25 -0
- package/templates/apps/web/app/[locale]/case-studies/[slug]/page.tsx +44 -0
- package/templates/apps/web/app/[locale]/case-studies/__tests__/page-renderer-migration.test.tsx +113 -0
- package/templates/apps/web/app/[locale]/case-studies/page.tsx +25 -0
- package/templates/apps/web/app/[locale]/clients/__tests__/page-renderer-migration.test.tsx +63 -0
- package/templates/apps/web/app/[locale]/clients/page.tsx +27 -0
- package/templates/apps/web/app/[locale]/contact/ContactForm.tsx +130 -0
- package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +152 -0
- package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +92 -0
- package/templates/apps/web/app/[locale]/contact/contact.actions.ts +79 -0
- package/templates/apps/web/app/[locale]/contact/error.tsx +24 -0
- package/templates/apps/web/app/[locale]/contact/page.tsx +38 -0
- package/templates/apps/web/app/[locale]/courses/[slug]/page.tsx +34 -0
- package/templates/apps/web/app/[locale]/courses/__tests__/page-renderer-migration.test.tsx +119 -0
- package/templates/apps/web/app/[locale]/courses/page.tsx +25 -0
- package/templates/apps/web/app/[locale]/dev/purchase/__tests__/actions.test.ts +160 -0
- package/templates/apps/web/app/[locale]/dev/purchase/error.tsx +25 -0
- package/templates/apps/web/app/[locale]/dev/purchase/page.tsx +117 -0
- package/templates/apps/web/app/[locale]/dev/purchase/purchase.actions.ts +58 -0
- package/templates/apps/web/app/[locale]/docs/[[...slug]]/page.tsx +118 -0
- package/templates/apps/web/app/[locale]/downloads/__tests__/page-renderer-migration.test.tsx +72 -0
- package/templates/apps/web/app/[locale]/downloads/page.tsx +25 -0
- package/templates/apps/web/app/[locale]/events/[slug]/page.tsx +47 -0
- package/templates/apps/web/app/[locale]/events/__tests__/page-renderer-migration.test.tsx +130 -0
- package/templates/apps/web/app/[locale]/events/page.tsx +25 -0
- package/templates/apps/web/app/[locale]/faq/page.tsx +36 -0
- package/templates/apps/web/app/[locale]/how-to/[slug]/page.tsx +34 -0
- package/templates/apps/web/app/[locale]/how-to/__tests__/page-renderer-migration.test.tsx +78 -0
- package/templates/apps/web/app/[locale]/how-to/page.tsx +40 -0
- package/templates/apps/web/app/[locale]/integrations/[slug]/page.tsx +43 -0
- package/templates/apps/web/app/[locale]/integrations/__tests__/page-renderer-migration.test.tsx +129 -0
- package/templates/apps/web/app/[locale]/integrations/page.tsx +25 -0
- package/templates/apps/web/app/[locale]/launch-service/page.tsx +31 -0
- package/templates/apps/web/app/[locale]/layout.tsx +241 -0
- package/templates/apps/web/app/[locale]/page.tsx +41 -0
- package/templates/apps/web/app/[locale]/partners/[slug]/page.tsx +44 -0
- package/templates/apps/web/app/[locale]/partners/__tests__/page-renderer-migration.test.tsx +113 -0
- package/templates/apps/web/app/[locale]/partners/page.tsx +25 -0
- package/templates/apps/web/app/[locale]/products/[slug]/page.tsx +43 -0
- package/templates/apps/web/app/[locale]/products/__tests__/page-renderer-migration.test.tsx +129 -0
- package/templates/apps/web/app/[locale]/products/page.tsx +25 -0
- package/templates/apps/web/app/[locale]/projects/[slug]/page.tsx +39 -0
- package/templates/apps/web/app/[locale]/projects/__tests__/page-renderer-migration.test.tsx +138 -0
- package/templates/apps/web/app/[locale]/projects/page.tsx +30 -0
- package/templates/apps/web/app/[locale]/resources/[slug]/page.tsx +51 -0
- package/templates/apps/web/app/[locale]/resources/__tests__/page-renderer-migration.test.tsx +117 -0
- package/templates/apps/web/app/[locale]/resources/page.tsx +27 -0
- package/templates/apps/web/app/[locale]/services/[slug]/page.tsx +43 -0
- package/templates/apps/web/app/[locale]/services/__tests__/page-renderer-migration.test.tsx +129 -0
- package/templates/apps/web/app/[locale]/services/page.tsx +25 -0
- package/templates/apps/web/app/[locale]/software/[slug]/page.tsx +34 -0
- package/templates/apps/web/app/[locale]/software/__tests__/page-renderer-migration.test.tsx +81 -0
- package/templates/apps/web/app/[locale]/software/page.tsx +39 -0
- package/templates/apps/web/app/[locale]/tech-articles/[slug]/page.tsx +34 -0
- package/templates/apps/web/app/[locale]/tech-articles/__tests__/page-renderer-migration.test.tsx +82 -0
- package/templates/apps/web/app/[locale]/tech-articles/page.tsx +39 -0
- package/templates/apps/web/app/[locale]/testimonials/__tests__/page-renderer-migration.test.tsx +63 -0
- package/templates/apps/web/app/[locale]/testimonials/page.tsx +27 -0
- package/templates/apps/web/app/[locale]/use-cases/__tests__/page-renderer-migration.test.tsx +63 -0
- package/templates/apps/web/app/[locale]/use-cases/page.tsx +27 -0
- package/templates/apps/web/app/[locale]/whitepapers/[slug]/page.tsx +34 -0
- package/templates/apps/web/app/[locale]/whitepapers/__tests__/page-renderer-migration.test.tsx +82 -0
- package/templates/apps/web/app/[locale]/whitepapers/page.tsx +39 -0
- package/templates/apps/web/app/__tests__/error-boundaries.test.tsx +152 -0
- package/templates/apps/web/app/api/auth/[...all]/route.ts +16 -0
- package/templates/apps/web/app/error-fallback.tsx +75 -0
- package/templates/apps/web/app/error.tsx +23 -0
- package/templates/apps/web/app/layout.tsx +18 -0
- package/templates/apps/web/app/llms.txt/route.ts +101 -0
- package/templates/apps/web/app/not-found.tsx +48 -0
- package/templates/apps/web/app/og/__tests__/route.test.ts +164 -0
- package/templates/apps/web/app/og/route.tsx +135 -0
- package/templates/apps/web/app/robots.txt/route.ts +36 -0
- package/templates/apps/web/app/sitemap.xml/route.ts +146 -0
- package/templates/apps/web/auth.ts +141 -0
- package/templates/apps/web/components/ThemeToggle.tsx +60 -0
- package/templates/apps/web/components/google-analytics.tsx +34 -0
- package/templates/apps/web/content/en/blog/index.mdx +15 -0
- package/templates/apps/web/content/en/blog/launching-ailk.mdx +20 -0
- package/templates/apps/web/content/en/docs/getting-started.mdx +30 -0
- package/templates/apps/web/i18n/request.ts +36 -0
- package/templates/apps/web/jest.config.cjs +100 -0
- package/templates/apps/web/lib/__mocks__/next-mdx-remote-rsc.js +12 -0
- package/templates/apps/web/lib/__mocks__/source-server.js +31 -0
- package/templates/apps/web/lib/__tests__/og.test.ts +65 -0
- package/templates/apps/web/lib/auth-env.ts +66 -0
- package/templates/apps/web/lib/blog-list-data.ts +95 -0
- package/templates/apps/web/lib/blog-post-data.ts +79 -0
- package/templates/apps/web/lib/nav-config.ts +13 -0
- package/templates/apps/web/lib/observability/better-stack.ts +27 -0
- package/templates/apps/web/lib/og.ts +23 -0
- package/templates/apps/web/lib/prisma-for-auth.ts +34 -0
- package/templates/apps/web/lib/source.ts +34 -0
- package/templates/apps/web/messages/en.json +131 -0
- package/templates/apps/web/middleware.ts +80 -0
- package/templates/apps/web/next.config.mjs +167 -0
- package/templates/apps/web/package.json +62 -0
- package/templates/apps/web/public/.well-known/security.txt +17 -0
- package/templates/apps/web/public/android-chrome-192x192.png +0 -0
- package/templates/apps/web/public/android-chrome-512x512.png +0 -0
- package/templates/apps/web/public/apple-touch-icon.png +0 -0
- package/templates/apps/web/public/favicon-16x16.png +0 -0
- package/templates/apps/web/public/favicon-32x32.png +0 -0
- package/templates/apps/web/public/favicon.ico +0 -0
- package/templates/apps/web/public/favicon.svg +4 -0
- package/templates/apps/web/public/logo-dark.svg +21 -0
- package/templates/apps/web/public/logo-light.svg +21 -0
- package/templates/apps/web/public/logomark-dark.svg +4 -0
- package/templates/apps/web/public/logomark-light.svg +4 -0
- package/templates/apps/web/public/og-default.png +0 -0
- package/templates/apps/web/public/site.webmanifest +19 -0
- package/templates/apps/web/scripts/assert-content-bundled.ts +55 -0
- package/templates/apps/web/security-headers.config.ts +132 -0
- package/templates/apps/web/sentry.client.config.ts +27 -0
- package/templates/apps/web/sentry.edge.config.ts +15 -0
- package/templates/apps/web/sentry.server.config.ts +20 -0
- package/templates/apps/web/source.config.ts +78 -0
- package/templates/apps/web/src/components/SiteNav.tsx +21 -0
- package/templates/apps/web/src/lib/routes.ts +37 -0
- package/templates/apps/web/tsconfig.json +35 -0
- package/templates/apps/web/types/messages.d.ts +19 -0
- package/templates/content/.gitkeep +0 -0
- package/templates/content/CLAUDE.md +85 -0
- package/templates/content/_site.mdx +38 -0
- package/templates/content/ar/HomePage/home.mdx +123 -0
- package/templates/content/ar/_site.mdx +35 -0
- package/templates/content/de/_site.mdx +29 -0
- package/templates/content/en/.gitkeep +0 -0
- package/templates/content/en/AboutPage/about.mdx +19 -0
- package/templates/content/en/AboutPage/about.schema.json +82 -0
- package/templates/content/en/BookCall/book-call.mdx +19 -0
- package/templates/content/en/BookCall/book-call.schema.json +121 -0
- package/templates/content/en/BreadcrumbList/site-breadcrumbs.mdx +20 -0
- package/templates/content/en/CareersList/careers.mdx +24 -0
- package/templates/content/en/CaseStudiesList/case-studies.mdx +22 -0
- package/templates/content/en/CaseStudiesList/showcase.mdx +8 -0
- package/templates/content/en/CaseStudy/ailk-aeo-rollout.mdx +32 -0
- package/templates/content/en/CaseStudy/schema-builder-migration.mdx +41 -0
- package/templates/content/en/ClientsList/clients.mdx +38 -0
- package/templates/content/en/ContactPage/contact.mdx +19 -0
- package/templates/content/en/ContactPage/contact.schema.json +100 -0
- package/templates/content/en/ContactPoint/primary.mdx +14 -0
- package/templates/content/en/Course/aeo-fundamentals.mdx +37 -0
- package/templates/content/en/Course/schema-builder-workshop.mdx +62 -0
- package/templates/content/en/CoursesList/courses.mdx +22 -0
- package/templates/content/en/DownloadsList/downloads.mdx +22 -0
- package/templates/content/en/Event/aeo-office-hours-may-2026.mdx +39 -0
- package/templates/content/en/Event/ailk-launch-day-2026.mdx +35 -0
- package/templates/content/en/EventsList/events.mdx +26 -0
- package/templates/content/en/FAQPage/faq.mdx +420 -0
- package/templates/content/en/FAQPage/faq.schema.json +231 -0
- package/templates/content/en/GlossaryList/glossary.mdx +19 -0
- package/templates/content/en/GlossaryList/glossary.schema.json +300 -0
- package/templates/content/en/HomePage/home.mdx +312 -0
- package/templates/content/en/HomePage/home.schema.json +88 -0
- package/templates/content/en/HomePage/launch-service.mdx +475 -0
- package/templates/content/en/HomePage/launch-service.schema.json +138 -0
- package/templates/content/en/HowTo/add-mdx-content.mdx +38 -0
- package/templates/content/en/HowTo/configure-aeo-scoring.mdx +35 -0
- package/templates/content/en/HowTo/set-up-json-ld.mdx +36 -0
- package/templates/content/en/Integration/github-actions.mdx +31 -0
- package/templates/content/en/Integration/openai-api.mdx +26 -0
- package/templates/content/en/Integration/vercel.mdx +32 -0
- package/templates/content/en/IntegrationsList/integrations.mdx +22 -0
- package/templates/content/en/JobPosting/content-strategist.mdx +46 -0
- package/templates/content/en/JobPosting/developer-advocate.mdx +47 -0
- package/templates/content/en/JobPosting/senior-fullstack-engineer.mdx +57 -0
- package/templates/content/en/LandingPage/aeo-audit.mdx +19 -0
- package/templates/content/en/LandingPage/aeo-audit.schema.json +92 -0
- package/templates/content/en/LandingPage/agency-waitlist.mdx +340 -0
- package/templates/content/en/LandingPage/agency-waitlist.schema.json +152 -0
- package/templates/content/en/LandingPage/developers.mdx +19 -0
- package/templates/content/en/LandingPage/developers.schema.json +109 -0
- package/templates/content/en/LandingPage/for-agencies.mdx +390 -0
- package/templates/content/en/LandingPage/for-agencies.schema.json +107 -0
- package/templates/content/en/LandingPage/for-ai-search-agencies.mdx +417 -0
- package/templates/content/en/LandingPage/for-ai-search-agencies.schema.json +105 -0
- package/templates/content/en/LandingPage/for-businesses.mdx +19 -0
- package/templates/content/en/LandingPage/for-businesses.schema.json +96 -0
- package/templates/content/en/LandingPage/platform.mdx +369 -0
- package/templates/content/en/LandingPage/platform.schema.json +166 -0
- package/templates/content/en/LandingPage/vs-ai-website-builders.mdx +19 -0
- package/templates/content/en/LandingPage/vs-ai-website-builders.schema.json +102 -0
- package/templates/content/en/LandingPage/vs-wordpress.mdx +19 -0
- package/templates/content/en/LandingPage/vs-wordpress.schema.json +53 -0
- package/templates/content/en/NewsletterSignup/newsletter.mdx +236 -0
- package/templates/content/en/NewsletterSignup/newsletter.schema.json +91 -0
- package/templates/content/en/Organization/site-owner.mdx +16 -0
- package/templates/content/en/Partner/prisma.mdx +31 -0
- package/templates/content/en/Partner/supabase.mdx +30 -0
- package/templates/content/en/Partner/vercel.mdx +28 -0
- package/templates/content/en/PartnersList/partners.mdx +22 -0
- package/templates/content/en/Person/founder.mdx +18 -0
- package/templates/content/en/Pricing/pricing.mdx +538 -0
- package/templates/content/en/Pricing/pricing.schema.json +209 -0
- package/templates/content/en/PrivacyPage/privacy.mdx +165 -0
- package/templates/content/en/PrivacyPage/privacy.schema.json +64 -0
- package/templates/content/en/Product/ailk.mdx +19 -0
- package/templates/content/en/Product/ailk.schema.json +94 -0
- package/templates/content/en/Product/api-launch-kit.mdx +26 -0
- package/templates/content/en/Product/launch-kit.mdx +28 -0
- package/templates/content/en/ProductsList/products.mdx +26 -0
- package/templates/content/en/Project/ailk-phase-2.mdx +54 -0
- package/templates/content/en/ProjectsList/projects.mdx +25 -0
- package/templates/content/en/ResourceDetail/aeo-scoring-guide.mdx +27 -0
- package/templates/content/en/ResourceDetail/content-model-whitepaper.mdx +28 -0
- package/templates/content/en/ResourceDetail/schema-org-quick-reference.mdx +39 -0
- package/templates/content/en/ResourcesHub/resources.mdx +22 -0
- package/templates/content/en/Service/consulting.mdx +22 -0
- package/templates/content/en/Service/implementation.mdx +30 -0
- package/templates/content/en/Service/launch-service.mdx +232 -0
- package/templates/content/en/Service/launch.mdx +228 -0
- package/templates/content/en/ServicesList/services.mdx +84 -0
- package/templates/content/en/SoftwareProduct/ailk-aeo.mdx +44 -0
- package/templates/content/en/SoftwareProduct/ailk-content-adapters.mdx +47 -0
- package/templates/content/en/SoftwareProduct/ailk-schema.mdx +49 -0
- package/templates/content/en/TeamList/team.mdx +63 -0
- package/templates/content/en/TeamMember/founder.mdx +72 -0
- package/templates/content/en/TermsPage/terms.mdx +19 -0
- package/templates/content/en/TermsPage/terms.schema.json +99 -0
- package/templates/content/en/TestimonialsList/testimonials.mdx +44 -0
- package/templates/content/en/UseCasesList/use-cases.mdx +30 -0
- package/templates/content/en/Whitepaper/ax-first-product-development.mdx +27 -0
- package/templates/content/en/Whitepaper/open-core-commercial-strategy.mdx +27 -0
- package/templates/content/en/Whitepaper/structured-data-for-answer-engines.mdx +31 -0
- package/templates/content/en-XA/AboutPage/about.mdx +8 -0
- package/templates/content/en-XA/FAQPage/faq.mdx +8 -0
- package/templates/content/en-XA/HomePage/home.mdx +8 -0
- package/templates/content/es/_site.mdx +30 -0
- package/templates/content/fr/_site.mdx +30 -0
- package/templates/content/ja/_site.mdx +30 -0
- package/templates/content/pt-BR/AboutPage/about.mdx +8 -0
- package/templates/content/pt-BR/FAQPage/faq.mdx +8 -0
- package/templates/content/pt-BR/HomePage/home.mdx +23 -0
- package/templates/database/CHANGELOG.md +5 -0
- package/templates/database/README.md +234 -0
- package/templates/database/__tests__/user-cascade.test.ts +125 -0
- package/templates/database/auth/.gitkeep +0 -0
- package/templates/database/config/.gitkeep +0 -0
- package/templates/database/content/.gitkeep +0 -0
- package/templates/database/inbox/.gitkeep +0 -0
- package/templates/database/inbox/README.md +3 -0
- package/templates/database/inbox/__tests__/schema.test.ts +40 -0
- package/templates/database/inbox/schema.prisma +52 -0
- package/templates/database/jest.config.cjs +29 -0
- package/templates/database/migrations/20260508000000_add_inbox_namespace/migration.sql +328 -0
- package/templates/database/migrations/20260513000000_better_auth_migration/migration.sql +100 -0
- package/templates/database/migrations/20260515000000_add_user_billing_fields/migration.sql +28 -0
- package/templates/database/migrations/20260516000000_add_user_tier_care_plan_seat/migration.sql +25 -0
- package/templates/database/migrations/20260518000000_add_telemetry_records/migration.sql +42 -0
- package/templates/database/migrations/20260525000000_theme_wiring/migration.sql +67 -0
- package/templates/database/migrations/20260710000000_retire_commercial_tier/migration.sql +21 -0
- package/templates/database/migrations/migration_lock.toml +3 -0
- package/templates/database/ops/.gitkeep +0 -0
- package/templates/database/package.json +45 -0
- package/templates/database/prisma.config.ts +20 -0
- package/templates/database/schema.prisma +487 -0
- package/templates/database/scripts/db-generate-locked.sh +80 -0
- package/templates/database/seed-test.ts +85 -0
- package/templates/database/tsconfig.build.json +16 -0
- package/templates/database/tsconfig.json +9 -0
- package/templates/package.json +125 -0
- package/templates/pnpm-workspace.yaml +6 -0
- package/templates/project.yaml +59 -0
- package/templates/tsconfig.base.json +18 -0
- package/templates/tsconfig.json +45 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": "https://schema.org",
|
|
3
|
+
"@graph": [
|
|
4
|
+
{
|
|
5
|
+
"@type": "Product",
|
|
6
|
+
"additionalType": "https://schema.org/SoftwareApplication",
|
|
7
|
+
"@id": "https://ailaunchkit.ai/#product",
|
|
8
|
+
"name": "AI Launch Kit",
|
|
9
|
+
"alternateName": [
|
|
10
|
+
"AI Launch Kit by Working Theory",
|
|
11
|
+
"AILK by Working Theory",
|
|
12
|
+
"AILK",
|
|
13
|
+
"@ailaunchkit",
|
|
14
|
+
"@ailk",
|
|
15
|
+
"@working-theory",
|
|
16
|
+
"ai-launch-kit"
|
|
17
|
+
],
|
|
18
|
+
"url": "https://ailaunchkit.ai",
|
|
19
|
+
"description": "AI Launch Kit is the open-source website foundation for the agent-first internet — Apache 2.0, agent-ready, AEO-scored, deployable in days.",
|
|
20
|
+
"sameAs": [
|
|
21
|
+
"https://github.com/working-theory-labs/ai-launch-kit",
|
|
22
|
+
"https://x.com/ailaunchkit",
|
|
23
|
+
"https://www.npmjs.com/org/ailk",
|
|
24
|
+
"https://youtube.com/@working-theory",
|
|
25
|
+
"https://linkedin.com/company/working-theory"
|
|
26
|
+
],
|
|
27
|
+
"foundingDate": "2026",
|
|
28
|
+
"category": "Open-source website foundation",
|
|
29
|
+
"applicationCategory": "DeveloperApplication",
|
|
30
|
+
"operatingSystem": "Cross-platform (Node.js)",
|
|
31
|
+
"license": "https://www.apache.org/licenses/LICENSE-2.0",
|
|
32
|
+
"codeRepository": "https://github.com/working-theory-labs/ai-launch-kit",
|
|
33
|
+
"manufacturer": {
|
|
34
|
+
"@type": "Organization",
|
|
35
|
+
"@id": "https://ailaunchkit.ai/#organization",
|
|
36
|
+
"name": "SalesSmyth LLC"
|
|
37
|
+
},
|
|
38
|
+
"brand": {
|
|
39
|
+
"@type": "Brand",
|
|
40
|
+
"name": "Working Theory",
|
|
41
|
+
"url": "https://workingtheory.ai"
|
|
42
|
+
},
|
|
43
|
+
"creator": {
|
|
44
|
+
"@id": "https://samhenry.org/#person"
|
|
45
|
+
},
|
|
46
|
+
"offers": [
|
|
47
|
+
{
|
|
48
|
+
"@type": "Offer",
|
|
49
|
+
"name": "Free (OSS)",
|
|
50
|
+
"price": "0",
|
|
51
|
+
"priceCurrency": "USD"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"@type": "Offer",
|
|
55
|
+
"name": "Pro",
|
|
56
|
+
"price": "249",
|
|
57
|
+
"priceCurrency": "USD",
|
|
58
|
+
"priceSpecification": {
|
|
59
|
+
"@type": "UnitPriceSpecification",
|
|
60
|
+
"price": "249",
|
|
61
|
+
"priceCurrency": "USD",
|
|
62
|
+
"unitText": "per user per year"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"@type": "Offer",
|
|
67
|
+
"name": "Pro Plus",
|
|
68
|
+
"price": "449",
|
|
69
|
+
"priceCurrency": "USD",
|
|
70
|
+
"priceSpecification": {
|
|
71
|
+
"@type": "UnitPriceSpecification",
|
|
72
|
+
"price": "449",
|
|
73
|
+
"priceCurrency": "USD",
|
|
74
|
+
"unitText": "per user per month"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"@type": "Offer",
|
|
79
|
+
"name": "Launch Service",
|
|
80
|
+
"price": "2495",
|
|
81
|
+
"priceCurrency": "USD"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"@type": "WebPage",
|
|
87
|
+
"@id": "https://ailaunchkit.ai/terms#webpage",
|
|
88
|
+
"url": "https://ailaunchkit.ai/terms",
|
|
89
|
+
"name": "Terms of Service",
|
|
90
|
+
"description": "The terms governing use of ailaunchkit.ai and the AI Launch Kit paid offerings — Pro, Pro Plus, and Launch Service — operated by SalesSmyth LLC.",
|
|
91
|
+
"isPartOf": {
|
|
92
|
+
"@id": "https://ailaunchkit.ai/#product"
|
|
93
|
+
},
|
|
94
|
+
"about": {
|
|
95
|
+
"@id": "https://ailaunchkit.ai/#organization"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: TestimonialsList
|
|
3
|
+
slug: testimonials
|
|
4
|
+
title: Testimonials
|
|
5
|
+
description: What teams building with AI Launch Kit have to say about their experience.
|
|
6
|
+
schema:
|
|
7
|
+
mainEntity:
|
|
8
|
+
"@type": ItemList
|
|
9
|
+
name: AI Launch Kit Testimonials
|
|
10
|
+
description: Testimonials from teams using AI Launch Kit.
|
|
11
|
+
itemListElement:
|
|
12
|
+
- "@type": ListItem
|
|
13
|
+
position: 1
|
|
14
|
+
item:
|
|
15
|
+
"@type": Review
|
|
16
|
+
reviewBody: >
|
|
17
|
+
AI Launch Kit cut our time-to-structured-content from weeks to hours.
|
|
18
|
+
The schema builders and AEO scoring gave us immediate, measurable wins.
|
|
19
|
+
author:
|
|
20
|
+
"@type": Person
|
|
21
|
+
name: Alex Kim
|
|
22
|
+
jobTitle: Lead Engineer
|
|
23
|
+
- "@type": ListItem
|
|
24
|
+
position: 2
|
|
25
|
+
item:
|
|
26
|
+
"@type": Review
|
|
27
|
+
reviewBody: >
|
|
28
|
+
The section catalog pattern let our team build and iterate on pages
|
|
29
|
+
without touching layout code. A genuine force-multiplier for small teams.
|
|
30
|
+
author:
|
|
31
|
+
"@type": Person
|
|
32
|
+
name: Morgan Lee
|
|
33
|
+
jobTitle: Head of Product
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
# Testimonials
|
|
37
|
+
|
|
38
|
+
What teams building with AI Launch Kit have to say.
|
|
39
|
+
|
|
40
|
+
> "AI Launch Kit cut our time-to-structured-content from weeks to hours."
|
|
41
|
+
> — Alex Kim, Lead Engineer
|
|
42
|
+
|
|
43
|
+
> "The section catalog pattern let our team build and iterate on pages without touching layout code."
|
|
44
|
+
> — Morgan Lee, Head of Product
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: UseCasesList
|
|
3
|
+
slug: use-cases
|
|
4
|
+
title: Use Cases
|
|
5
|
+
description: How teams use AI Launch Kit in production — from agent-first SaaS to AEO-optimized content sites.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Use Cases
|
|
9
|
+
|
|
10
|
+
AI Launch Kit is a template, not a product category. These use cases describe how teams have adapted it to their specific situations.
|
|
11
|
+
|
|
12
|
+
## Agent-first SaaS
|
|
13
|
+
|
|
14
|
+
Teams building SaaS products where AI agents are first-class users of the API. The MCP server scaffolding in `apps/mcp` gives agents typed tool access to the same data as human users, enforced by the same boundary rules.
|
|
15
|
+
|
|
16
|
+
## AEO-Optimized Marketing Sites
|
|
17
|
+
|
|
18
|
+
Marketing and content teams who want their pages to surface in AI search results. AILK's `@working-theory/schema` layer covers 60 schema.org page types. Every page emits valid JSON-LD from frontmatter — no per-page configuration required.
|
|
19
|
+
|
|
20
|
+
## Internal Tooling with Agent Access
|
|
21
|
+
|
|
22
|
+
Small engineering teams building internal tools that need both a human-facing UI and agent-accessible APIs. The architecture boundary rules prevent the two surfaces from coupling, so the agent API can evolve independently.
|
|
23
|
+
|
|
24
|
+
## API Platforms with Structured Outputs
|
|
25
|
+
|
|
26
|
+
Teams building APIs that need to return data in formats compatible with downstream LLM tooling. The `@working-theory/validation` package provides Zod schemas that double as both request validators and structured-output contracts for agent consumers.
|
|
27
|
+
|
|
28
|
+
## Getting started
|
|
29
|
+
|
|
30
|
+
Clone the repository, set the environment variables in `.env.example`, and run `pnpm dev`. The four apps start together. Use the case that fits your situation as a starting point and strip what you don't need.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Whitepaper
|
|
3
|
+
slug: ax-first-product-development
|
|
4
|
+
title: AX-First Product Development
|
|
5
|
+
description: Why treating the API and MCP server as first-class surfaces — not the web app — produces more durable products in the agent era.
|
|
6
|
+
publishedAt: "2026-04-15"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AX-First Product Development
|
|
10
|
+
|
|
11
|
+
The conventional web product has a single canonical surface: the browser. An AX-first product has three: the browser, the API, and the MCP server. This paper explains why the shift matters and how AI Launch Kit bakes the pattern in from day one.
|
|
12
|
+
|
|
13
|
+
## The problem with web-first
|
|
14
|
+
|
|
15
|
+
Web-first products accumulate UI debt that makes agent integration painful. Data is locked behind HTML rather than behind stable API contracts. Business logic lives in React components rather than route handlers. When an agent needs to act on behalf of a user, it has to scrape or emulate a browser — which is fragile.
|
|
16
|
+
|
|
17
|
+
## The AX-first principle
|
|
18
|
+
|
|
19
|
+
AX-first means the API and MCP tool surface are designed before the web UI, not after. The web app becomes the human edge — a presentation layer for capabilities that also exist in machine-readable form.
|
|
20
|
+
|
|
21
|
+
## How AILK implements it
|
|
22
|
+
|
|
23
|
+
AILK ships three peer apps behind a shared `packages/` layer. `apps/api` exposes Fastify routes validated by Zod. `apps/mcp` exposes the same capabilities as MCP tools. `apps/web` calls `apps/api` via `@working-theory/api-client` — it never touches the database directly. The architecture boundary linter fails CI if any app crosses these lines.
|
|
24
|
+
|
|
25
|
+
## The payoff
|
|
26
|
+
|
|
27
|
+
Teams that start AX-first can add AI features as natural extensions of existing capabilities, not as retrofits. Agent tools are the same code as API routes. Structured data is the same code as API responses.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Whitepaper
|
|
3
|
+
slug: open-core-commercial-strategy
|
|
4
|
+
title: Open-Core Commercial Strategy for Developer Tools
|
|
5
|
+
description: How open-core licensing enables sustainable developer-tool businesses — the model AILK uses and why it works for agent-era infrastructure.
|
|
6
|
+
publishedAt: "2026-04-29"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Open-Core Commercial Strategy for Developer Tools
|
|
10
|
+
|
|
11
|
+
The open-core model — a free OSS core with paid extensions — has produced some of the most durable developer-tool businesses of the last decade. This paper explains why it works and how AILK applies it.
|
|
12
|
+
|
|
13
|
+
## Why open-core for developer tools
|
|
14
|
+
|
|
15
|
+
Developers evaluate tools before they pay for them. A free OSS tier removes the evaluation barrier and builds genuine trust — you can't fake a working codebase. The paid tier captures value from the users who build significant businesses on top of the free core.
|
|
16
|
+
|
|
17
|
+
## The AILK tier structure
|
|
18
|
+
|
|
19
|
+
AILK ships a `packages/` layer under the MIT license. The core schema builders, content adapter, and AEO scorer are OSS. Paid extensions — advanced scoring rules, the Pro CMS adapter, multi-tenant infrastructure — ship separately under a commercial license.
|
|
20
|
+
|
|
21
|
+
## The commoditization line
|
|
22
|
+
|
|
23
|
+
AILK draws the OSS/paid boundary at the point where the open-source alternative is free anyway (schema.org JSON-LD generation) and the commercial alternative is expensive (a custom structured-data pipeline). OSS below the line; commercial above it.
|
|
24
|
+
|
|
25
|
+
## Why this works for agent-era infrastructure
|
|
26
|
+
|
|
27
|
+
Agent-era infrastructure is early enough that developers are still learning the patterns. OSS is the fastest path to pattern adoption; commercial tiers capture value from teams running those patterns in production at scale.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Whitepaper
|
|
3
|
+
slug: structured-data-for-answer-engines
|
|
4
|
+
title: Structured Data for Answer Engines
|
|
5
|
+
description: How schema.org JSON-LD markup improves citation rates in AI-generated answers — the Layer 1 citation-readiness model explained.
|
|
6
|
+
publishedAt: "2026-04-22"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Structured Data for Answer Engines
|
|
10
|
+
|
|
11
|
+
Answer engines — AI systems that generate responses by synthesizing information across sources — prefer pages that declare their meaning explicitly. Schema.org JSON-LD is the most widely understood mechanism for doing so.
|
|
12
|
+
|
|
13
|
+
## Why structured data matters for AEO
|
|
14
|
+
|
|
15
|
+
When an answer engine encounters two pages covering the same topic, the page with valid structured data has a structural advantage. The engine can confirm the page's claimed authority (`Organization`, `author`, `datePublished`) without natural-language inference.
|
|
16
|
+
|
|
17
|
+
## The Layer 1 model
|
|
18
|
+
|
|
19
|
+
AILK's AEO scorer defines Layer 1 as a set of deterministic, field-level checks. A page passes Layer 1 when it satisfies all of:
|
|
20
|
+
|
|
21
|
+
- `@type` is a recognized schema.org type
|
|
22
|
+
- `name` or `headline` is present and non-empty
|
|
23
|
+
- `description` is present and non-empty
|
|
24
|
+
- `inLanguage` is set to the page locale
|
|
25
|
+
- `url` is an absolute URL
|
|
26
|
+
|
|
27
|
+
These checks are structural — they require no network access and produce identical results on every run.
|
|
28
|
+
|
|
29
|
+
## Implementation in AILK
|
|
30
|
+
|
|
31
|
+
Every page type in `@working-theory/schema` emits a JSON-LD object that satisfies Layer 1. The `pageToJsonLd` bridge in `apps/web` wires MDX frontmatter to the right builder automatically. Teams using AILK get Layer 1 compliance out of the box.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: AboutPage
|
|
3
|
+
slug: about
|
|
4
|
+
title: "[!!! Ŵĥó búíĺţ ÁÍĹK, áñð ŵĥý ŵé ŕúñ óñ íţ →→ →→ →→ →→ →→ →→ →→ !!!]"
|
|
5
|
+
description: Pseudolocale smoke-gate placeholder — en-XA content mirrors en with pseudolocalization applied.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- en-XA pseudolocale content. The page renders from frontmatter title; sections are intentionally omitted for the smoke gate. -->
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: FAQPage
|
|
3
|
+
slug: faq
|
|
4
|
+
title: "[!!! Fŕéqúéñţĺý áškéð qúéšţíóñš ábóúţ ÁÍ Ĺáúñçĥ Kíţ →→ →→ →→ →→ →→ →→ →→ →→ →→ !!!]"
|
|
5
|
+
description: Pseudolocale smoke-gate placeholder — en-XA content mirrors en with pseudolocalization applied.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- en-XA pseudolocale content. The page renders from frontmatter title; sections are intentionally omitted for the smoke gate. -->
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: HomePage
|
|
3
|
+
slug: home
|
|
4
|
+
title: "[!!! ÁÍ Ĺáúñçĥ Kíţ — ţĥé ópéñ-šóúŕçé ŵébšíţé fóúñðáţíóñ fóŕ ţĥé áĝéñţ-fíŕšţ íñţéŕñéţ →→ →→ →→ →→ →→ →→ →→ →→ →→ →→ →→ →→ →→ →→ →→ →→ !!!]"
|
|
5
|
+
description: Pseudolocale smoke-gate placeholder — en-XA content mirrors en with pseudolocalization applied.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- en-XA pseudolocale content. The page renders from frontmatter title; sections are intentionally omitted for the smoke gate. -->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "1"
|
|
3
|
+
siteName: AI Launch Kit
|
|
4
|
+
baseUrl: https://ailaunchkit.ai
|
|
5
|
+
defaultLocale: es
|
|
6
|
+
siteIdentity:
|
|
7
|
+
kind: Organization
|
|
8
|
+
name: AI Launch Kit
|
|
9
|
+
url: https://ailaunchkit.ai
|
|
10
|
+
logo: https://ailaunchkit.ai/opengraph-image.png
|
|
11
|
+
description: >
|
|
12
|
+
AI Launch Kit es la base de sitio web open-source para la internet
|
|
13
|
+
centrada en agentes. Apache 2.0, listo para agentes, con puntuación AEO,
|
|
14
|
+
desplegable en días.
|
|
15
|
+
sameAs:
|
|
16
|
+
- https://github.com/tailwind-ai/ai-launch-kit
|
|
17
|
+
foundingDate: "2024"
|
|
18
|
+
founderName: Sam Henry
|
|
19
|
+
analytics:
|
|
20
|
+
vercelAnalytics: true
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<!--
|
|
24
|
+
Locale-specific site configuration for the 'es' (Spanish) locale.
|
|
25
|
+
Theme fonts for this locale are declared in app/[locale]/layout.tsx
|
|
26
|
+
under the LOCALE_FONTS registry (locale key: "es" → Lato).
|
|
27
|
+
|
|
28
|
+
Per-route font scoping: Spanish pages ship Lato (Latin coverage).
|
|
29
|
+
Japanese font (Noto Sans JP) is NOT registered on Spanish pages.
|
|
30
|
+
-->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "1"
|
|
3
|
+
siteName: AI Launch Kit
|
|
4
|
+
baseUrl: https://ailaunchkit.ai
|
|
5
|
+
defaultLocale: fr
|
|
6
|
+
siteIdentity:
|
|
7
|
+
kind: Organization
|
|
8
|
+
name: AI Launch Kit
|
|
9
|
+
url: https://ailaunchkit.ai
|
|
10
|
+
logo: https://ailaunchkit.ai/opengraph-image.png
|
|
11
|
+
description: >
|
|
12
|
+
AI Launch Kit est la fondation de site web open-source pour l'internet
|
|
13
|
+
centré sur les agents. Apache 2.0, prêt pour les agents, noté AEO,
|
|
14
|
+
déployable en quelques jours.
|
|
15
|
+
sameAs:
|
|
16
|
+
- https://github.com/tailwind-ai/ai-launch-kit
|
|
17
|
+
foundingDate: "2024"
|
|
18
|
+
founderName: Sam Henry
|
|
19
|
+
analytics:
|
|
20
|
+
vercelAnalytics: true
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<!--
|
|
24
|
+
Locale-specific site configuration for the 'fr' (French) locale.
|
|
25
|
+
Theme fonts for this locale are declared in app/[locale]/layout.tsx
|
|
26
|
+
under the LOCALE_FONTS registry (locale key: "fr" → Source Sans 3).
|
|
27
|
+
|
|
28
|
+
Per-route font scoping: French pages ship Source Sans 3 (Latin-ext coverage).
|
|
29
|
+
Japanese font (Noto Sans JP) is NOT registered on French pages.
|
|
30
|
+
-->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "1"
|
|
3
|
+
siteName: AI Launch Kit
|
|
4
|
+
baseUrl: https://ailaunchkit.ai
|
|
5
|
+
defaultLocale: ja
|
|
6
|
+
siteIdentity:
|
|
7
|
+
kind: Organization
|
|
8
|
+
name: AI Launch Kit
|
|
9
|
+
url: https://ailaunchkit.ai
|
|
10
|
+
logo: https://ailaunchkit.ai/opengraph-image.png
|
|
11
|
+
description: >
|
|
12
|
+
AI Launch Kitはエージェントファーストのインターネット向けオープンソースウェブサイト基盤です。
|
|
13
|
+
Apache 2.0、エージェント対応、AEOスコア付き、数日でデプロイ可能。
|
|
14
|
+
sameAs:
|
|
15
|
+
- https://github.com/tailwind-ai/ai-launch-kit
|
|
16
|
+
foundingDate: "2024"
|
|
17
|
+
founderName: Sam Henry
|
|
18
|
+
analytics:
|
|
19
|
+
vercelAnalytics: true
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<!--
|
|
23
|
+
Locale-specific site configuration for the 'ja' (Japanese) locale.
|
|
24
|
+
Theme fonts for this locale are declared in app/[locale]/layout.tsx
|
|
25
|
+
under the LOCALE_FONTS registry (locale key: "ja" → Noto Sans JP).
|
|
26
|
+
|
|
27
|
+
Per-route font scoping: Japanese pages ship Noto Sans JP (JP + Latin coverage).
|
|
28
|
+
Escalation per spec §5.3: if Noto Sans JP causes LCP regression on /ja routes,
|
|
29
|
+
stop and escalate — subsetting strategy / CDN config required.
|
|
30
|
+
-->
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: AboutPage
|
|
3
|
+
slug: about
|
|
4
|
+
title: Quem construiu o AILK e por que o usamos
|
|
5
|
+
description: AI Launch Kit é a fundação open-source para sites da internet orientada a agentes. Um produto Working Theory, liderado por Sam Henry, usado em três marcas.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Corpo MDX preservado para adaptadores de conteúdo que o utilizam, mas a página renderiza a partir das seções do frontmatter. -->
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: FAQPage
|
|
3
|
+
slug: faq
|
|
4
|
+
title: Perguntas frequentes sobre o AI Launch Kit
|
|
5
|
+
description: Perguntas comuns sobre o AI Launch Kit, agrupadas por tema. Cada resposta pode ser lida de forma independente.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Corpo MDX preservado para adaptadores de conteúdo que o utilizam, mas a página renderiza a partir das seções do frontmatter. -->
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: HomePage
|
|
3
|
+
slug: home
|
|
4
|
+
title: AI Launch Kit — a fundação open-source para sites da internet orientada a agentes
|
|
5
|
+
description: O starter de sites open-source Apache 2.0 construído para busca por IA. Pronto para agentes, com pontuação AEO, implantável em dias.
|
|
6
|
+
sections:
|
|
7
|
+
- id: hero-1
|
|
8
|
+
type: hero
|
|
9
|
+
data:
|
|
10
|
+
variant: centered
|
|
11
|
+
headline: AI Launch Kit — a fundação open-source para sites da internet orientada a agentes
|
|
12
|
+
subheadline: O starter de sites open-source Apache 2.0 construído para busca por IA. Pronto para agentes, com pontuação AEO, implantável em dias.
|
|
13
|
+
body: Construído pela equipe Working Theory e usado pela equipe para rodar Sam Henry, Working Theory e SalesSmyth no mesmo substrato.
|
|
14
|
+
primaryCta:
|
|
15
|
+
label: Escolha seu caminho
|
|
16
|
+
href: "#escolha-seu-caminho"
|
|
17
|
+
secondaryCta:
|
|
18
|
+
label: Star no GitHub
|
|
19
|
+
href: https://github.com/working-theory/ai-launch-kit
|
|
20
|
+
external: true
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<!-- Corpo MDX preservado para adaptadores de conteúdo que o utilizam, mas a página renderiza a partir das seções do frontmatter. -->
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# Customer Template Database
|
|
2
|
+
|
|
3
|
+
Minimal but extensible Prisma schema for customer-hosted instances.
|
|
4
|
+
|
|
5
|
+
## Namespace Layout
|
|
6
|
+
|
|
7
|
+
Five namespace subfolders organise database concerns. See [namespaces](../docs/database/namespaces.md) for the full boundary doc, and [ADR 0009](../docs/adr/0009-database-namespace-separation.md) for the formal decision record.
|
|
8
|
+
|
|
9
|
+
- `auth/` — NextAuth, API tokens, OAuth, push tokens
|
|
10
|
+
- `config/` — site settings and customer configuration
|
|
11
|
+
- `content/` — content-related extensions
|
|
12
|
+
- `inbox/` — messaging and notification data
|
|
13
|
+
- `ops/` — operational and observability data
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
This database stores **only auth and customer extensions**. All business data (leads, orders, analytics) lives on the Platform.
|
|
18
|
+
|
|
19
|
+
| Category | Tables | Purpose |
|
|
20
|
+
| ---------- | ----------------------------------------- | -------------------------------- |
|
|
21
|
+
| NextAuth | User, Account, Session, VerificationToken | Web dashboard login |
|
|
22
|
+
| API Auth | ApiToken, RefreshToken | Mobile apps, long-lived sessions |
|
|
23
|
+
| OAuth | OAuthClient, OAuthAuthorization | ChatGPT plugin, Slack bot, etc. |
|
|
24
|
+
| Push | PushToken | Mobile push notifications |
|
|
25
|
+
| Extensions | UserData, SiteSetting | Customer customizations |
|
|
26
|
+
|
|
27
|
+
**Total: 11 tables**
|
|
28
|
+
|
|
29
|
+
## Why This Architecture?
|
|
30
|
+
|
|
31
|
+
1. **Customer sites are nearly stateless** - No business logic in DB
|
|
32
|
+
2. **All data centralized on Platform** - Leads, orders, analytics, conversions
|
|
33
|
+
3. **Extensibility built-in** - Customers can add preferences/custom data
|
|
34
|
+
4. **Multi-client support** - Web sessions + API tokens for mobile
|
|
35
|
+
|
|
36
|
+
## Schema
|
|
37
|
+
|
|
38
|
+
### NextAuth (Web Authentication)
|
|
39
|
+
|
|
40
|
+
```prisma
|
|
41
|
+
model User {
|
|
42
|
+
id, email, name, image, role
|
|
43
|
+
accounts, sessions, apiTokens, userData
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
model Account { /* OAuth connections */ }
|
|
47
|
+
model Session { /* Active sessions */ }
|
|
48
|
+
model VerificationToken { /* Email verification */ }
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### API Tokens (Mobile/External Auth)
|
|
52
|
+
|
|
53
|
+
```prisma
|
|
54
|
+
model ApiToken {
|
|
55
|
+
userId, name, token, tokenPrefix
|
|
56
|
+
clientType // "mobile", "api", "cli"
|
|
57
|
+
deviceInfo // "iPhone 15 Pro"
|
|
58
|
+
scopes // ["read:profile", "write:data"]
|
|
59
|
+
expiresAt, lastUsedAt, revokedAt
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
model RefreshToken {
|
|
63
|
+
userId, apiTokenId, token
|
|
64
|
+
expiresAt, usedAt, revokedAt
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Usage:**
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Mobile app authenticates with token
|
|
72
|
+
curl -H "Authorization: Bearer tok_abc123..." \
|
|
73
|
+
https://api.customer-site.com/api/user/profile
|
|
74
|
+
|
|
75
|
+
# Refresh expired access token
|
|
76
|
+
curl -X POST https://api.customer-site.com/api/auth/refresh \
|
|
77
|
+
-d '{"refresh_token": "ref_xyz789..."}'
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### OAuth (ChatGPT, Slack, External Apps)
|
|
81
|
+
|
|
82
|
+
```prisma
|
|
83
|
+
model OAuthClient {
|
|
84
|
+
name, clientId, clientSecret
|
|
85
|
+
redirectUris, scopes
|
|
86
|
+
enabled, trusted
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
model OAuthAuthorization {
|
|
90
|
+
userId, clientId, scopes
|
|
91
|
+
accessToken, refreshToken
|
|
92
|
+
expiresAt, revokedAt
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Usage:** ChatGPT plugin authenticates users via OAuth flow, stores authorization.
|
|
97
|
+
|
|
98
|
+
### Push Notifications (Mobile)
|
|
99
|
+
|
|
100
|
+
```prisma
|
|
101
|
+
model PushToken {
|
|
102
|
+
userId, token, platform // "ios", "android", "web"
|
|
103
|
+
deviceId, deviceName, appVersion
|
|
104
|
+
enabled, failedAt, failCount
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Usage:**
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
// Register device for push notifications
|
|
112
|
+
await prisma.pushToken.upsert({
|
|
113
|
+
where: { token: fcmToken },
|
|
114
|
+
update: { updatedAt: new Date() },
|
|
115
|
+
create: {
|
|
116
|
+
userId,
|
|
117
|
+
token: fcmToken,
|
|
118
|
+
platform: "android",
|
|
119
|
+
deviceName: "Pixel 8",
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Extensions (Customer Customizations)
|
|
125
|
+
|
|
126
|
+
```prisma
|
|
127
|
+
model UserData {
|
|
128
|
+
userId, key, value // Flexible per-user storage
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
model SiteSetting {
|
|
132
|
+
key, value // Site-wide config/cache
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Usage:**
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
// Store user preferences
|
|
140
|
+
await prisma.userData.upsert({
|
|
141
|
+
where: { userId_key: { userId, key: "preferences" } },
|
|
142
|
+
update: { value: { theme: "dark", notifications: true } },
|
|
143
|
+
create: { userId, key: "preferences", value: { theme: "dark" } },
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// Store site-wide cache
|
|
147
|
+
await prisma.siteSetting.upsert({
|
|
148
|
+
where: { key: "cached_config" },
|
|
149
|
+
update: { value: platformConfig },
|
|
150
|
+
create: { key: "cached_config", value: platformConfig },
|
|
151
|
+
});
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Prisma config (`prisma.config.ts`)
|
|
155
|
+
|
|
156
|
+
Required by Prisma 7 for non-default CLI configuration. AILK uses it to:
|
|
157
|
+
|
|
158
|
+
- Point the CLI at `./schema.prisma`.
|
|
159
|
+
- Declare the migrate-time DB URL (`DATABASE_URL_NON_POOLED`) for `prisma migrate`. The runtime DB URL (`DATABASE_URL`) is injected into the driver adapter at PrismaClient construction in `apps/api` and `apps/web`.
|
|
160
|
+
|
|
161
|
+
Forks: do not edit unless your deployment uses different env-var names. The two-env-var contract (pooled + non-pooled) is part of the AILK template; changing the names requires updating both the runtime singletons and this file.
|
|
162
|
+
|
|
163
|
+
## Setup
|
|
164
|
+
|
|
165
|
+
### 1. Configure Database URL
|
|
166
|
+
|
|
167
|
+
```env
|
|
168
|
+
DATABASE_URL="postgresql://user:password@localhost:5432/mydb"
|
|
169
|
+
DATABASE_URL_NON_POOLED="postgresql://user:password@localhost:5432/mydb"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 2. Generate Prisma Client
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
pnpm db:generate
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### 3. Push Schema (Development)
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
pnpm db:push
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### 4. Create Migration (Production)
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
pnpm db:migrate
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Available Scripts
|
|
191
|
+
|
|
192
|
+
| Script | Description |
|
|
193
|
+
| ------------------ | --------------------------------------- |
|
|
194
|
+
| `pnpm db:generate` | Generate Prisma Client |
|
|
195
|
+
| `pnpm db:migrate` | Create and apply migrations (dev) |
|
|
196
|
+
| `pnpm db:push` | Push schema changes directly (dev only) |
|
|
197
|
+
| `pnpm db:studio` | Open Prisma Studio GUI |
|
|
198
|
+
|
|
199
|
+
## What's NOT in This Schema
|
|
200
|
+
|
|
201
|
+
Business data is **intentionally excluded** - it lives on the Platform:
|
|
202
|
+
|
|
203
|
+
| Data | Where | Why |
|
|
204
|
+
| --------- | -------- | ----------------------------- |
|
|
205
|
+
| Leads | Platform | ROI tracking, tied to content |
|
|
206
|
+
| Orders | Platform | Conversion tracking |
|
|
207
|
+
| Analytics | Platform | Aggregate dashboards |
|
|
208
|
+
| Content | Platform | Created in Studio |
|
|
209
|
+
|
|
210
|
+
## Extending the Schema
|
|
211
|
+
|
|
212
|
+
Customers can extend the schema for custom features:
|
|
213
|
+
|
|
214
|
+
```prisma
|
|
215
|
+
// Example: Add a SavedItem model for wishlists
|
|
216
|
+
model SavedItem {
|
|
217
|
+
id String @id @default(cuid())
|
|
218
|
+
userId String
|
|
219
|
+
itemType String // "product", "blog_post"
|
|
220
|
+
itemId String // Platform ID
|
|
221
|
+
savedAt DateTime @default(now())
|
|
222
|
+
|
|
223
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
224
|
+
|
|
225
|
+
@@unique([userId, itemType, itemId])
|
|
226
|
+
@@map("saved_items")
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Remember to:
|
|
231
|
+
|
|
232
|
+
1. Add the relation to the `User` model
|
|
233
|
+
2. Run `pnpm db:migrate`
|
|
234
|
+
3. Update your backend routes
|