[{"data":1,"prerenderedAt":601},["ShallowReactive",2],{"docs-nav:en":3,"docs:\u002Fdocs\u002Fexisting-app":134},[4],{"title":5,"path":6,"stem":7,"children":8},"Docs","\u002Fdocs","docs",[9,12,16,20,24,42,63,92,113],{"title":10,"path":6,"stem":11},"What is Fougere","docs\u002Findex",{"title":13,"path":14,"stem":15},"Getting started","\u002Fdocs\u002Fgetting-started","docs\u002F01.getting-started",{"title":17,"path":18,"stem":19},"Existing Nuxt app","\u002Fdocs\u002Fexisting-app","docs\u002F02.existing-app",{"title":21,"path":22,"stem":23},"The CLI","\u002Fdocs\u002Fcli","docs\u002F03.cli",{"title":25,"path":26,"stem":27,"children":28,"page":41},"Concepts","\u002Fdocs\u002Fconcepts","docs\u002F2.concepts",[29,33,37],{"title":30,"path":31,"stem":32},"Philosophy","\u002Fdocs\u002Fconcepts\u002Fphilosophy","docs\u002F2.concepts\u002F1.philosophy",{"title":34,"path":35,"stem":36},"The Frond","\u002Fdocs\u002Fconcepts\u002Ffrond","docs\u002F2.concepts\u002F2.frond",{"title":38,"path":39,"stem":40},"The shortest path","\u002Fdocs\u002Fconcepts\u002Fshortest-path","docs\u002F2.concepts\u002F3.shortest-path",false,{"title":43,"path":44,"stem":45,"children":46,"page":41},"Schema","\u002Fdocs\u002Fschema","docs\u002F3.schema",[47,51,55,59],{"title":48,"path":49,"stem":50},"Entities","\u002Fdocs\u002Fschema\u002Fentities","docs\u002F3.schema\u002F1.entities",{"title":52,"path":53,"stem":54},"Views","\u002Fdocs\u002Fschema\u002Fviews","docs\u002F3.schema\u002F2.views",{"title":56,"path":57,"stem":58},"The identity card","\u002Fdocs\u002Fschema\u002Fcard","docs\u002F3.schema\u002F3.card",{"title":60,"path":61,"stem":62},"Standard Schema","\u002Fdocs\u002Fschema\u002Fstandard-schema","docs\u002F3.schema\u002F4.standard-schema",{"title":64,"path":65,"stem":66,"children":67,"page":41},"Business","\u002Fdocs\u002Fbusiness","docs\u002F4.business",[68,72,76,80,84,88],{"title":69,"path":70,"stem":71},"Handlers","\u002Fdocs\u002Fbusiness\u002Fhandlers","docs\u002F4.business\u002F1.handlers",{"title":73,"path":74,"stem":75},"Presenters","\u002Fdocs\u002Fbusiness\u002Fpresenters","docs\u002F4.business\u002F2.presenters",{"title":77,"path":78,"stem":79},"Collectors","\u002Fdocs\u002Fbusiness\u002Fcollectors","docs\u002F4.business\u002F3.collectors",{"title":81,"path":82,"stem":83},"Errors","\u002Fdocs\u002Fbusiness\u002Ferrors","docs\u002F4.business\u002F4.errors",{"title":85,"path":86,"stem":87},"Seeds","\u002Fdocs\u002Fbusiness\u002Fseeds","docs\u002F4.business\u002F5.seeds",{"title":89,"path":90,"stem":91},"Facts","\u002Fdocs\u002Fbusiness\u002Ffacts","docs\u002F4.business\u002F6.facts",{"title":93,"path":94,"stem":95,"children":96,"page":41},"Client","\u002Fdocs\u002Fclient","docs\u002F5.client",[97,101,105,109],{"title":98,"path":99,"stem":100},"Queries & commands","\u002Fdocs\u002Fclient\u002Fqueries-commands","docs\u002F5.client\u002F1.queries-commands",{"title":102,"path":103,"stem":104},"Forms","\u002Fdocs\u002Fclient\u002Fforms","docs\u002F5.client\u002F2.forms",{"title":106,"path":107,"stem":108},"Session","\u002Fdocs\u002Fclient\u002Fsession","docs\u002F5.client\u002F3.session",{"title":110,"path":111,"stem":112},"invoke","\u002Fdocs\u002Fclient\u002Finvoke","docs\u002F5.client\u002F4.invoke",{"title":114,"path":115,"stem":116,"children":117,"page":41},"Infrastructure","\u002Fdocs\u002Finfra","docs\u002F6.infra",[118,122,126,130],{"title":119,"path":120,"stem":121},"The gradient","\u002Fdocs\u002Finfra\u002Fgradient","docs\u002F6.infra\u002F1.gradient",{"title":123,"path":124,"stem":125},"Surfaces — REST & GraphQL","\u002Fdocs\u002Finfra\u002Fsurfaces","docs\u002F6.infra\u002F2.surfaces",{"title":127,"path":128,"stem":129},"Deployment","\u002Fdocs\u002Finfra\u002Fdeployment","docs\u002F6.infra\u002F3.deployment",{"title":131,"path":132,"stem":133},"Hosts","\u002Fdocs\u002Finfra\u002Fhosts","docs\u002F6.infra\u002F4.hosts",{"id":135,"title":17,"body":136,"description":596,"extension":597,"meta":598,"navigation":313,"path":18,"seo":599,"stem":19,"__hash__":600},"docs_en\u002Fdocs\u002F02.existing-app.md",{"type":137,"value":138,"toc":589},"minimark",[139,144,166,171,182,263,278,375,381,389,413,424,428,431,514,517,521,551,555,567,573,577,585],[140,141,143],"h1",{"id":142},"add-fougere-to-an-existing-nuxt-app","Add Fougere to an existing Nuxt app",[145,146,147,148,152,153,156,157,161,162,165],"p",{},"Fougere adds its model layer to the existing app. Routing, pages, components, styling,\nand server routes remain in place. The module only registers its own paths:\n",[149,150,151],"code",{},"\u002F_fougere\u002Fcall"," (the envelope), ",[149,154,155],{},"\u002Fapi\u002F{frond}\u002F…","\n(",[158,159,160],"a",{"href":124},"REST surface",") and ",[149,163,164],{},"\u002Fauth\u002F**"," if you enable auth.",[167,168,170],"h2",{"id":169},"the-three-pieces","The three pieces",[145,172,173,177,178,181],{},[174,175,176],"strong",{},"1. The module"," — in your existing ",[149,179,180],{},"nuxt.config.ts",":",[183,184,189],"pre",{"className":185,"code":186,"language":187,"meta":188,"style":188},"language-ts shiki shiki-themes material-theme-lighter github-light github-dark","export default defineNuxtConfig({\n  modules: [\u002F* your modules *\u002F, '@fougere\u002Fnuxt'],\n});\n","ts","",[149,190,191,215,251],{"__ignoreMap":188},[192,193,196,200,203,207,211],"span",{"class":194,"line":195},"line",1,[192,197,199],{"class":198},"sVHd0","export",[192,201,202],{"class":198}," default",[192,204,206],{"class":205},"sGLFI"," defineNuxtConfig",[192,208,210],{"class":209},"su5hD","(",[192,212,214],{"class":213},"sP7_E","{\n",[192,216,218,222,224,227,231,234,238,242,245,248],{"class":194,"line":217},2,[192,219,221],{"class":220},"skxfh","  modules",[192,223,181],{"class":213},[192,225,226],{"class":209}," [",[192,228,230],{"class":229},"sutJx","\u002F* your modules *\u002F",[192,232,233],{"class":213},",",[192,235,237],{"class":236},"sjJ54"," '",[192,239,241],{"class":240},"s_sjI","@fougere\u002Fnuxt",[192,243,244],{"class":236},"'",[192,246,247],{"class":209},"]",[192,249,250],{"class":213},",\n",[192,252,254,257,260],{"class":194,"line":253},3,[192,255,256],{"class":213},"}",[192,258,259],{"class":209},")",[192,261,262],{"class":213},";\n",[145,264,265,268,269,272,273,277],{},[174,266,267],{},"2. The config"," — ",[149,270,271],{},"fougere.config.ts"," at the root\n(",[158,274,276],{"href":275},"\u002Fdocs\u002Fgetting-started#fougereconfigts-reference","full reference","):",[183,279,281],{"className":185,"code":280,"language":187,"meta":188,"style":188},"import { defineFougere } from '@fougere\u002Fcore';\n\nexport default defineFougere({\n  db: { dialect: 'sqlite', path: '.data\u002Fapp.db' },\n});\n",[149,282,283,309,315,327,366],{"__ignoreMap":188},[192,284,285,288,291,294,297,300,302,305,307],{"class":194,"line":195},[192,286,287],{"class":198},"import",[192,289,290],{"class":213}," {",[192,292,293],{"class":209}," defineFougere",[192,295,296],{"class":213}," }",[192,298,299],{"class":198}," from",[192,301,237],{"class":236},[192,303,304],{"class":240},"@fougere\u002Fcore",[192,306,244],{"class":236},[192,308,262],{"class":213},[192,310,311],{"class":194,"line":217},[192,312,314],{"emptyLinePlaceholder":313},true,"\n",[192,316,317,319,321,323,325],{"class":194,"line":253},[192,318,199],{"class":198},[192,320,202],{"class":198},[192,322,293],{"class":205},[192,324,210],{"class":209},[192,326,214],{"class":213},[192,328,330,333,335,337,340,342,344,347,349,351,354,356,358,361,363],{"class":194,"line":329},4,[192,331,332],{"class":220},"  db",[192,334,181],{"class":213},[192,336,290],{"class":213},[192,338,339],{"class":220}," dialect",[192,341,181],{"class":213},[192,343,237],{"class":236},[192,345,346],{"class":240},"sqlite",[192,348,244],{"class":236},[192,350,233],{"class":213},[192,352,353],{"class":220}," path",[192,355,181],{"class":213},[192,357,237],{"class":236},[192,359,360],{"class":240},".data\u002Fapp.db",[192,362,244],{"class":236},[192,364,365],{"class":213}," },\n",[192,367,369,371,373],{"class":194,"line":368},5,[192,370,256],{"class":213},[192,372,259],{"class":209},[192,374,262],{"class":213},[145,376,377,380],{},[174,378,379],{},"3. A first Frond"," — one entity and one handler, at the root of the app you already have:",[183,382,387],{"className":383,"code":385,"language":386},[384],"language-text","entities\u002FTodo.ts\nhandlers\u002FTodoHandler.ts\n","text",[149,388,385],{"__ignoreMap":188},[145,390,391,392,396,397,400,401,404,405,408,409,412],{},"The scanner recognizes these two files through the convention used at the project root\n(",[158,393,395],{"href":394},"\u002Fdocs\u002Fgetting-started#one-domain-no-fronds-at-all","the flat shape","). A page writes\n",[149,398,399],{},"import Todo from '@frond\u002F\u003Cyour-package-name>\u002Fentities\u002FTodo'"," — the module registers that\nalias from the scan, so there is no ",[149,402,403],{},"package.json"," and no ",[149,406,407],{},"pnpm-workspace.yaml"," entry to\nadd. A second domain later goes to ",[149,410,411],{},"fronds\u002Fbilling\u002F",", and these two files stay where they\nare.",[145,414,415,416,419,420,423],{},"Run ",[149,417,418],{},"pnpm dev"," and check the log: ",[149,421,422],{},"scanned 1 frond(s)",".",[167,425,427],{"id":426},"migrate-feature-by-feature","Migrate feature by feature",[145,429,430],{},"Take one feature at a time; the old routes keep serving the rest. The following elements\nhave a Fougere equivalent:",[432,433,434,447],"table",{},[435,436,437],"thead",{},[438,439,440,444],"tr",{},[441,442,443],"th",{},"You maintain today",[441,445,446],{},"It becomes",[448,449,450,462,470,485,498],"tbody",{},[438,451,452,456],{},[453,454,455],"td",{},"a Zod\u002FYup schema",[453,457,458,459],{},"the entity's fields — ",[158,460,461],{"href":49},"shape axis",[438,463,464,467],{},[453,465,466],{},"a table definition or additive migration",[453,468,469],{},"derived — additive auto-DDL from the same fields; destructive changes stay explicit",[438,471,472,478],{},[453,473,474,477],{},[149,475,476],{},"server\u002Fapi\u002Ftodos.post.ts"," + validation call",[453,479,480,481,484],{},"a ",[158,482,483],{"href":70},"handler"," operation, validated at the façade",[438,486,487,490],{},[453,488,489],{},"form state + client-side rules",[453,491,492,497],{},[158,493,494],{"href":103},[149,495,496],{},"useFormFor(Todo)"," — same validation as the server",[438,499,500,506],{},[453,501,502,505],{},[149,503,504],{},"useFetch('\u002Fapi\u002Ftodos')"," + refresh bookkeeping",[453,507,508,513],{},[158,509,510],{"href":99},[149,511,512],{},"useQuery(Todo, 'list')"," — revalidated by commands",[145,515,516],{},"Delete the originals as each feature lands — the point is fewer files to keep in sync,\nnot a parallel copy.",[167,518,520],{"id":519},"what-stays-yours","What stays yours",[522,523,524,531,537],"ul",{},[525,526,527,530],"li",{},[174,528,529],{},"Pages and components"," — the primitives are additive; no layout, no widgets.",[525,532,533,536],{},[174,534,535],{},"Other server routes"," — anything outside the claimed paths is untouched.",[525,538,539,542,543,546,547,550],{},[174,540,541],{},"Auth"," — optional. Keep your own system if you have one; ",[149,544,545],{},"useCurrentUser"," and the\nsession-to-handler flow need ",[158,548,549],{"href":107},"Fougere auth"," to be enabled.",[167,552,554],{"id":553},"current-limits","Current limits",[522,556,557,564],{},[525,558,559,560,563],{},"The packages are on npm under the ",[149,561,562],{},"alpha"," tag — the version is the whole promise.",[525,565,566],{},"Storage is SQLite auto-DDL (Kysely underneath). An entity's table is owned by\nFougere — bring a feature in when you can hand its storage over, keep your existing\ndatabase access for the rest.",[145,568,569,570,572],{},"Next: ",[158,571,21],{"href":22}," — composing a workspace, hosting one Frond, calling an operation.",[167,574,576],{"id":575},"another-host","Another host?",[145,578,579,580,423],{},"This page is about Nuxt because its module does the mounting for you. The same Frond runs\nunder Next, TanStack Start, React Router, SvelteKit and Express — three of them need no\nFougere package at all. See ",[581,582,583],"em",{},[158,584,131],{"href":132},[586,587,588],"style",{},"html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":188,"searchDepth":217,"depth":217,"links":590},[591,592,593,594,595],{"id":169,"depth":217,"text":170},{"id":426,"depth":217,"text":427},{"id":519,"depth":217,"text":520},{"id":553,"depth":217,"text":554},{"id":575,"depth":217,"text":576},"Add Fougere incrementally to an existing Nuxt app.","md",{},{"title":17,"description":596},"BVlKmr_HpK_lBvkZ31fpbFTLWyjEFjN8aJPGvy4pzig",1786637819120]