// @bun
var l=Object.defineProperty;var n=(t)=>t;function s(t,i){this[t]=n.bind(null,i)}var m=(t,i)=>{for(var o in i)l(t,o,{get:i[o],enumerable:!0,configurable:!0,set:s.bind(i,o)})};var u=(t,i)=>()=>(t&&(i=t(t=0)),i);import{CodeBlock as r,InstallCommand as c}from"@contractspec/lib.design-system";import p from"@contractspec/lib.ui-link";import{ChevronRight as d}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function v(){return a("div",{className:"space-y-8",children:[a("div",{className:"space-y-2",children:[e("h1",{className:"font-bold text-4xl",children:"Installation"}),e("p",{className:"text-lg text-muted-foreground",children:"Add ContractSpec to your existing Next.js or Bun project, or start fresh."})]}),a("div",{className:"space-y-6",children:[a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Prerequisites"}),a("ul",{className:"space-y-2 text-muted-foreground",children:[e("li",{children:"Node.js 20+ (or Bun 1.0+)"}),e("li",{children:"Existing Next.js app or Bun HTTP server"}),e("li",{children:"PostgreSQL database (for persistence)"})]})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Install Core Libraries"}),e("p",{className:"text-muted-foreground",children:"Add the contracts runtime and your choice of adapter:"}),e(c,{package:["@contractspec/lib.contracts-spec","@contractspec/lib.schema"]})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"For Next.js projects"}),e(c,{package:"@contractspec/lib.contracts-spec"})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"For database models"}),e(c,{package:["@contractspec/app.cli-database","prisma","@prisma/client"]})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Set up your project"}),e("p",{className:"text-muted-foreground",children:"Initialize a new ContractSpec project structure:"}),e(r,{language:"bash",filename:"installation-init",code:`bunx contractspec init
# Follow the interactive prompts to configure your project`})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Initialize the database"}),e("p",{className:"text-muted-foreground",children:"If using Prisma, set up your schema and generate the client:"}),e(r,{language:"bash",filename:"installation-prisma",code:`bunx prisma init
# Edit prisma/schema.prisma with your models
bunx prisma generate
bunx prisma migrate dev --name init`})]}),e("div",{className:"flex items-center gap-4 pt-4",children:a(p,{href:"/docs/getting-started/hello-world",className:"btn-primary",children:["Next: First Operation ",e(d,{size:16})]})})]})]})}export{v as InstallationPage};
