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