async function generate(context) {
  const appName = context.spec?.metadata?.name ?? context.spec?.name ?? "specverse-starter-app";
  const packageName = slugify(appName);
  const pkg = {
    name: packageName,
    private: true,
    version: "0.1.0",
    type: "module",
    scripts: {
      dev: "vite",
      build: "tsc && vite build",
      preview: "vite preview",
      typecheck: "tsc --noEmit"
    },
    dependencies: {
      react: "^18.2.0",
      "react-dom": "^18.2.0",
      "@tanstack/react-query": "^5.0.0",
      "lucide-react": "^0.400.0"
    },
    devDependencies: {
      "@types/react": "^18.2.0",
      "@types/react-dom": "^18.2.0",
      "@vitejs/plugin-react": "^4.2.0",
      autoprefixer: "^10.4.20",
      postcss: "^8.4.47",
      tailwindcss: "^3.4.13",
      typescript: "^5.2.0",
      vite: "^6.0.0"
    }
  };
  return JSON.stringify(pkg, null, 2) + "\n";
}
function slugify(s) {
  return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "specverse-starter-app";
}
export {
  generate
};
