[{"data":1,"prerenderedAt":653},["ShallowReactive",2],{"docs-nav:en":3,"docs:\u002Fdocs\u002Fconcepts\u002Ffrond":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":34,"body":136,"description":647,"extension":648,"meta":649,"navigation":650,"path":35,"seo":651,"stem":36,"__hash__":652},"docs_en\u002Fdocs\u002F2.concepts\u002F2.frond.md",{"type":137,"value":138,"toc":639},"minimark",[139,143,152,157,160,217,220,224,227,332,339,343,346,392,395,399,410,429,434,457,463,582,602,622,635],[140,141,34],"h1",{"id":142},"the-frond",[144,145,146,147,151],"p",{},"A ",[148,149,150],"strong",{},"Frond"," is a business module that groups the elements responsible for one domain.",[153,154,156],"h2",{"id":155},"the-ownership-boundary","The ownership boundary",[144,158,159],{},"A Frond contains:",[161,162,163,171,182,188,199,205,211],"ul",{},[164,165,166,167,170],"li",{},"its ",[148,168,169],{},"entities"," and schemas,",[164,172,166,173,176,177,181],{},[148,174,175],{},"operations"," — commands and queries (",[178,179,180],"a",{"href":70},"handlers","),",[164,183,166,184,187],{},[148,185,186],{},"policies"," — access rules checked inside operations,",[164,189,166,190,193,194,198],{},[148,191,192],{},"events"," — facts its commands produce (",[178,195,197],{"href":196},"\u002Fdocs\u002Fbusiness\u002Fhandlers#the-event-bus","an in-process bus",", which nothing subscribes to by default),",[164,200,166,201,204],{},[148,202,203],{},"persistence adapters"," — how its entities are realized,",[164,206,166,207,210],{},[148,208,209],{},"public contracts"," — what other Fronds may call,",[164,212,166,213,216],{},[148,214,215],{},"invalidation rules"," — what a command revalidates.",[144,218,219],{},"A Frond does not import another Frond's internal files. Interactions go through explicit\ncontracts, preferably operations or events. An App composes Fronds and keeps business\nlogic in those modules rather than in its pages, fetches, or stores.",[153,221,223],{"id":222},"the-six-layers","The six layers",[144,225,226],{},"The model follows six steps:",[228,229,230,246],"table",{},[231,232,233],"thead",{},[234,235,236,240,243],"tr",{},[237,238,239],"th",{},"#",[237,241,242],{},"Layer",[237,244,245],{},"What happens",[247,248,249,263,276,289,302,315],"tbody",{},[234,250,251,255,260],{},[252,253,254],"td",{},"1",[252,256,257],{},[148,258,259],{},"Declaration",[252,261,262],{},"the author declares entities, views, operations, events — no HTTP, no SQL here",[234,264,265,268,273],{},[252,266,267],{},"2",[252,269,270],{},[148,271,272],{},"Derivation",[252,274,275],{},"validation, types, io views, adapter-readable metadata derive from it",[234,277,278,281,286],{},[252,279,280],{},"3",[252,282,283],{},[148,284,285],{},"Local capability",[252,287,288],{},"the declaration becomes executable in-process — the reference mode",[234,290,291,294,299],{},[252,292,293],{},"4",[252,295,296],{},[148,297,298],{},"Projection",[252,300,301],{},"façades are generated toward transports: HTTP, GraphQL, CLI, workers",[234,303,304,307,312],{},[252,305,306],{},"5",[252,308,309],{},[148,310,311],{},"Composition",[252,313,314],{},"Fronds are scanned and linked in one runtime — module → contract → interaction",[234,316,317,320,325],{},[252,318,319],{},"6",[252,321,322],{},[148,323,324],{},"Distribution",[252,326,327,328,331],{},"a capability moves out of process; serialization, timeouts, retries appear ",[148,329,330],{},"here",", explicitly",[144,333,334,335,338],{},"The ",[178,336,337],{"href":120},"gradient page"," covers the move from local to remote execution.",[153,340,342],{"id":341},"generated-vs-handwritten","Generated vs handwritten",[144,344,345],{},"The split of responsibilities is:",[228,347,348,358],{},[231,349,350],{},[234,351,352,355],{},[237,353,354],{},"Fougere generates",[237,356,357],{},"You write",[247,359,360,368,376,384],{},[234,361,362,365],{},[252,363,364],{},"validation, derived views, tables\u002Fmetadata",[252,366,367],{},"non-trivial business logic",[234,369,370,373],{},[252,371,372],{},"GraphQL types and inputs, trivial CRUD",[252,374,375],{},"rich invariants, multi-step workflows",[234,377,378,381],{},[252,379,380],{},"projection façades (contract → transport)",[252,382,383],{},"error policies, consistency decisions",[234,385,386,389],{},[252,387,388],{},"typed clients, composition manifests",[252,390,391],{},"sensitive inter-Frond orchestration",[144,393,394],{},"Fougere handles repetitive integrations around a contract. The developer writes\napplication-specific behavior. A service layer remains optional: a handler can contain\nthe logic or delegate it.",[153,396,398],{"id":397},"in-the-file-system","In the file system",[400,401,406],"pre",{"className":402,"code":404,"language":405},[403],"language-text","fronds\u002Fblog\u002F\n  entities\u002F             ← the declarations\n  handlers\u002F             ← the operations   (handlers\u002F\u003Csurface>\u002F = a named audience)\n  presenters\u002F           ← computed fields added to an entity's output\n  collectors\u002F           ← parameter resolution by type\n  services\u002F             ← plain classes, injected by type\n  repositories\u002F         ← the same, under a second name\n  seeds\u002F                ← data created at startup\n","text",[407,408,404],"code",{"__ignoreMap":409},"",[144,411,412,413,416,417,420,421,425,426,428],{},"The scanner recognizes a Frond through these directories. The ",[148,414,415],{},"project root"," can follow\nthe same convention, so a single-domain app does not need a ",[407,418,419],{},"fronds\u002F"," directory\n(",[178,422,424],{"href":423},"\u002Fdocs\u002Fgetting-started#one-domain-no-fronds-at-all","the flat shape","). A second domain can\nlater be added under ",[407,427,419],{}," without moving the first one.",[430,431,433],"h3",{"id":432},"naming-and-importing-a-frond","Naming and importing a Frond",[144,435,436,437,440,441,444,445,448,449,452,453,456],{},"The directory name is the Frond's name, and ",[407,438,439],{},"@fougere\u002Fnuxt"," turns it into an alias:\n",[407,442,443],{},"fronds\u002Fblog\u002F"," gives ",[407,446,447],{},"@frond\u002Fblog",", so a page writes\n",[407,450,451],{},"import Post from '@frond\u002Fblog\u002Fentities\u002FPost'"," with no file to add. The name also keys the\nentity registrations and any ",[407,454,455],{},"remotes:"," entry.",[144,458,146,459,462],{},[407,460,461],{},"package.json"," in the Frond answers the two questions the directory cannot.",[400,464,468],{"className":465,"code":466,"language":467,"meta":409,"style":409},"language-json shiki shiki-themes material-theme-lighter github-light github-dark","{\n  \"name\": \"@frond\u002Fblog\",\n  \"fougere\": { \"frond\": \"blog\" },\n  \"exports\": { \".\u002Fentities\u002F*\": \".\u002Fentities\u002F*.ts\" }\n}\n","json",[407,469,470,479,508,543,576],{"__ignoreMap":409},[471,472,475],"span",{"class":473,"line":474},"line",1,[471,476,478],{"class":477},"sP7_E","{\n",[471,480,482,486,490,493,496,500,503,505],{"class":473,"line":481},2,[471,483,485],{"class":484},"s39Yj","  \"",[471,487,489],{"class":488},"sseR_","name",[471,491,492],{"class":484},"\"",[471,494,495],{"class":477},":",[471,497,499],{"class":498},"sjJ54"," \"",[471,501,447],{"class":502},"s_sjI",[471,504,492],{"class":498},[471,506,507],{"class":477},",\n",[471,509,511,513,516,518,520,523,525,529,531,533,535,538,540],{"class":473,"line":510},3,[471,512,485],{"class":484},[471,514,515],{"class":488},"fougere",[471,517,492],{"class":484},[471,519,495],{"class":477},[471,521,522],{"class":477}," {",[471,524,499],{"class":484},[471,526,528],{"class":527},"sZMiF","frond",[471,530,492],{"class":484},[471,532,495],{"class":477},[471,534,499],{"class":498},[471,536,537],{"class":502},"blog",[471,539,492],{"class":498},[471,541,542],{"class":477}," },\n",[471,544,546,548,551,553,555,557,559,562,564,566,568,571,573],{"class":473,"line":545},4,[471,547,485],{"class":484},[471,549,550],{"class":488},"exports",[471,552,492],{"class":484},[471,554,495],{"class":477},[471,556,522],{"class":477},[471,558,499],{"class":484},[471,560,561],{"class":527},".\u002Fentities\u002F*",[471,563,492],{"class":484},[471,565,495],{"class":477},[471,567,499],{"class":498},[471,569,570],{"class":502},".\u002Fentities\u002F*.ts",[471,572,492],{"class":498},[471,574,575],{"class":477}," }\n",[471,577,579],{"class":473,"line":578},5,[471,580,581],{"class":477},"}\n",[144,583,584,587,588,591,592,594,595,598,599,601],{},[407,585,586],{},"fougere.frond"," allows a name that differs from the directory. For example,\n",[407,589,590],{},"fronds\u002Fblog-v2\u002F"," can remain registered as ",[407,593,537],{},", preserving its entity keys,\n",[407,596,597],{},"@frond\u002F*"," imports, and ",[407,600,455],{}," entries. Without this property, Fougere uses the\ndirectory name.",[144,603,604,606,607,609,610,613,614,617,618,621],{},[407,605,489],{}," and ",[407,608,550],{}," make the Frond resolvable ",[148,611,612],{},"outside"," a Nuxt app — a plain Node\nscript, a non-Nuxt consumer — which also needs the Frond declared as a workspace package\n(",[407,615,616],{},"packages: [fronds\u002F*]"," in ",[407,619,620],{},"pnpm-workspace.yaml","). Inside a Nuxt app the alias already\ncovers it.",[144,623,624,606,627,630,631,634],{},[407,625,626],{},"services\u002F",[407,628,629],{},"repositories\u002F"," behave identically: both register their classes as\nproviders, resolved by type. Most data access needs neither — the handler already gets an\n",[407,632,633],{},"EntityOrm"," scoped to its entity. Reach for a provider when the read does not fit that\nshape: an aggregate spanning several entities, a source that is not an ORM at all (an\nexternal API, a search index), or a query heavy enough that the handler should not carry\nit.",[636,637,638],"style",{},"html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sseR_, html code.shiki .sseR_{--shiki-light:#9C3EDA;--shiki-default:#005CC5;--shiki-dark:#79B8FF}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 pre.shiki code .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}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":409,"searchDepth":481,"depth":481,"links":640},[641,642,643,644],{"id":155,"depth":481,"text":156},{"id":222,"depth":481,"text":223},{"id":341,"depth":481,"text":342},{"id":397,"depth":481,"text":398,"children":645},[646],{"id":432,"depth":510,"text":433},"What a Frond contains, how it is discovered, and where its boundary lies.","md",{},true,{"title":34,"description":647},"C-iflRWO2CCuNoyUsmdH6t-z9WrC8J1VyEjFAXh3PdY",1786637819120]