[{"data":1,"prerenderedAt":2953},["ShallowReactive",2],{"navigation_docs":3,"-contributing-reading-the-code":613,"-contributing-reading-the-code-surround":2950},[4,39,101,378,540,562,584,606],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":38},"Start","i-lucide-rocket","\u002Fstart","1.start",[10,14,18,22,26,30,34],{"title":11,"path":12,"stem":13},"Our approach","\u002Fstart\u002Four-approach","1.start\u002F0.our-approach",{"title":15,"path":16,"stem":17},"Introduction","\u002Fstart\u002Fintroduction","1.start\u002F1.introduction",{"title":19,"path":20,"stem":21},"Concepts","\u002Fstart\u002Fconcepts","1.start\u002F2.concepts",{"title":23,"path":24,"stem":25},"Glossary","\u002Fstart\u002Fglossary","1.start\u002F3.glossary",{"title":27,"path":28,"stem":29},"Try it locally","\u002Fstart\u002Ftry-it-locally","1.start\u002F4.try-it-locally",{"title":31,"path":32,"stem":33},"Features","\u002Fstart\u002Ffeatures","1.start\u002F5.features",{"title":35,"path":36,"stem":37},"Questions","\u002Fstart\u002Ffaq","1.start\u002F6.faq",false,{"title":40,"icon":41,"path":42,"stem":43,"children":44,"page":38},"Run SHADE","i-lucide-server","\u002Frun","2.run",[45,49,53,57,61,65,69,73,77,81,85,89,93,97],{"title":46,"path":47,"stem":48},"Setting up an instance (Coolify)","\u002Frun\u002Fcoolify","2.run\u002F1.coolify",{"title":50,"path":51,"stem":52},"Console commands","\u002Frun\u002Fconsole","2.run\u002F10.console",{"title":54,"path":55,"stem":56},"Rotating APP_SECRET","\u002Frun\u002Frotating-app-secret","2.run\u002F11.rotating-app-secret",{"title":58,"path":59,"stem":60},"Checking an instance","\u002Frun\u002Fdoctor","2.run\u002F12.doctor",{"title":62,"path":63,"stem":64},"Self-hosting by hand","\u002Frun\u002Fown-server-by-hand","2.run\u002F13.own-server-by-hand",{"title":66,"path":67,"stem":68},"NixOS (experimental)","\u002Frun\u002Fnixos","2.run\u002F14.nixos",{"title":70,"path":71,"stem":72},"Self-hosting without Coolify","\u002Frun\u002Fown-server","2.run\u002F2.own-server",{"title":74,"path":75,"stem":76},"Hosting the site on a static host","\u002Frun\u002Fstatic-hosts","2.run\u002F3.static-hosts",{"title":78,"path":79,"stem":80},"Licence","\u002Frun\u002Flicence","2.run\u002F4.licence",{"title":82,"path":83,"stem":84},"Updating and backups","\u002Frun\u002Fupdating-and-backups","2.run\u002F5.updating-and-backups",{"title":86,"path":87,"stem":88},"Troubleshooting","\u002Frun\u002Ftroubleshooting","2.run\u002F6.troubleshooting",{"title":90,"path":91,"stem":92},"Logs, request ids, traces and metrics","\u002Frun\u002Flogs","2.run\u002F7.logs",{"title":94,"path":95,"stem":96},"Maintenance mode","\u002Frun\u002Fmaintenance-mode","2.run\u002F8.maintenance-mode",{"title":98,"path":99,"stem":100},"Usage limits","\u002Frun\u002Fusage-limits","2.run\u002F9.usage-limits",{"title":102,"icon":103,"path":104,"stem":105,"children":106},"Guide","i-lucide-book-open","\u002Fguide","3.guide",[107,109,147,192,210,280,310,364],{"title":102,"path":104,"stem":108},"3.guide\u002Findex",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":38},"Content","i-lucide-file-text","\u002Fguide\u002Fcontent","3.guide\u002F1.content",[115,119,123,127,131,135,139,143],{"title":116,"path":117,"stem":118},"Collections and entries","\u002Fguide\u002Fcontent\u002Fcollections","3.guide\u002F1.content\u002F1.collections",{"title":120,"path":121,"stem":122},"Field types","\u002Fguide\u002Fcontent\u002Ffields","3.guide\u002F1.content\u002F2.fields",{"title":124,"path":125,"stem":126},"Drafts, publishing and version history","\u002Fguide\u002Fcontent\u002Fversions","3.guide\u002F1.content\u002F3.versions",{"title":128,"path":129,"stem":130},"Languages","\u002Fguide\u002Fcontent\u002Flanguages","3.guide\u002F1.content\u002F4.languages",{"title":132,"path":133,"stem":134},"Data sources","\u002Fguide\u002Fcontent\u002Fdata-sources","3.guide\u002F1.content\u002F5.data-sources",{"title":136,"path":137,"stem":138},"Media","\u002Fguide\u002Fcontent\u002Fmedia","3.guide\u002F1.content\u002F6.media",{"title":140,"path":141,"stem":142},"Search","\u002Fguide\u002Fcontent\u002Fsearch","3.guide\u002F1.content\u002F7.search",{"title":144,"path":145,"stem":146},"Trash","\u002Fguide\u002Fcontent\u002Ftrash","3.guide\u002F1.content\u002F8.trash",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":38},"Website","i-lucide-globe","\u002Fguide\u002Fwebsite","3.guide\u002F2.website",[153,156,160,164,168,172,176,180,184,188],{"title":148,"path":154,"stem":155},"\u002Fguide\u002Fwebsite\u002Fwebsite","3.guide\u002F2.website\u002F1.website",{"title":157,"path":158,"stem":159},"Scroll scenes","\u002Fguide\u002Fwebsite\u002Fscroll-scenes","3.guide\u002F2.website\u002F10.scroll-scenes",{"title":161,"path":162,"stem":163},"Pages and posts","\u002Fguide\u002Fwebsite\u002Fpages","3.guide\u002F2.website\u002F2.pages",{"title":165,"path":166,"stem":167},"The visual editor","\u002Fguide\u002Fwebsite\u002Fvisual-editor","3.guide\u002F2.website\u002F3.visual-editor",{"title":169,"path":170,"stem":171},"Roles and locks","\u002Fguide\u002Fwebsite\u002Froles-and-locks","3.guide\u002F2.website\u002F4.roles-and-locks",{"title":173,"path":174,"stem":175},"Header and footer","\u002Fguide\u002Fwebsite\u002Fheader-and-footer","3.guide\u002F2.website\u002F5.header-and-footer",{"title":177,"path":178,"stem":179},"Theme","\u002Fguide\u002Fwebsite\u002Ftheme","3.guide\u002F2.website\u002F6.theme",{"title":181,"path":182,"stem":183},"Redirects","\u002Fguide\u002Fwebsite\u002Fredirects","3.guide\u002F2.website\u002F7.redirects",{"title":185,"path":186,"stem":187},"Site settings","\u002Fguide\u002Fwebsite\u002Fsite-settings","3.guide\u002F2.website\u002F8.site-settings",{"title":189,"path":190,"stem":191},"The site","\u002Fguide\u002Fwebsite\u002Fthe-site","3.guide\u002F2.website\u002F9.the-site",{"title":193,"icon":194,"path":195,"stem":196,"children":197,"page":38},"Publishing","i-lucide-send","\u002Fguide\u002Fpublishing","3.guide\u002F3.publishing",[198,202,206],{"title":199,"path":200,"stem":201},"Publishing and preview","\u002Fguide\u002Fpublishing\u002Fpublishing","3.guide\u002F3.publishing\u002F1.publishing",{"title":203,"path":204,"stem":205},"Builds","\u002Fguide\u002Fpublishing\u002Fbuilds","3.guide\u002F3.publishing\u002F2.builds",{"title":207,"path":208,"stem":209},"CDN caches","\u002Fguide\u002Fpublishing\u002Fcaches","3.guide\u002F3.publishing\u002F3.caches",{"title":211,"icon":212,"path":213,"stem":214,"children":215,"page":38},"People, security and privacy","i-lucide-shield","\u002Fguide\u002Fpeople-and-security","3.guide\u002F4.people-and-security",[216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276],{"title":217,"path":218,"stem":219},"People in SHADE","\u002Fguide\u002Fpeople-and-security\u002Fpeople-in-shade","3.guide\u002F4.people-and-security\u002F0.people-in-shade",{"title":221,"path":222,"stem":223},"Team and roles","\u002Fguide\u002Fpeople-and-security\u002Fteam","3.guide\u002F4.people-and-security\u002F1.team",{"title":225,"path":226,"stem":227},"Errors and security alerts","\u002Fguide\u002Fpeople-and-security\u002Ferrors","3.guide\u002F4.people-and-security\u002F10.errors",{"title":229,"path":230,"stem":231},"Exporting an instance","\u002Fguide\u002Fpeople-and-security\u002Fexporting","3.guide\u002F4.people-and-security\u002F11.exporting",{"title":233,"path":234,"stem":235},"Organisations","\u002Fguide\u002Fpeople-and-security\u002Forganisations","3.guide\u002F4.people-and-security\u002F12.organisations",{"title":237,"path":238,"stem":239},"Signing in through an identity provider (team)","\u002Fguide\u002Fpeople-and-security\u002Fidentity-providers","3.guide\u002F4.people-and-security\u002F13.identity-providers",{"title":241,"path":242,"stem":243},"System status","\u002Fguide\u002Fpeople-and-security\u002Fsystem-status","3.guide\u002F4.people-and-security\u002F14.system-status",{"title":245,"path":246,"stem":247},"Appearance","\u002Fguide\u002Fpeople-and-security\u002Fappearance","3.guide\u002F4.people-and-security\u002F15.appearance",{"title":249,"path":250,"stem":251},"Accounts and personal pages","\u002Fguide\u002Fpeople-and-security\u002Faccounts","3.guide\u002F4.people-and-security\u002F2.accounts",{"title":253,"path":254,"stem":255},"Signing in (team)","\u002Fguide\u002Fpeople-and-security\u002Fsign-in","3.guide\u002F4.people-and-security\u002F3.sign-in",{"title":257,"path":258,"stem":259},"API tokens","\u002Fguide\u002Fpeople-and-security\u002Fapi-tokens","3.guide\u002F4.people-and-security\u002F4.api-tokens",{"title":261,"path":262,"stem":263},"Audit log","\u002Fguide\u002Fpeople-and-security\u002Faudit","3.guide\u002F4.people-and-security\u002F5.audit",{"title":265,"path":266,"stem":267},"Request protection","\u002Fguide\u002Fpeople-and-security\u002Fprotection","3.guide\u002F4.people-and-security\u002F6.protection",{"title":269,"path":270,"stem":271},"Personal data per person","\u002Fguide\u002Fpeople-and-security\u002Fprivacy","3.guide\u002F4.people-and-security\u002F7.privacy",{"title":273,"path":274,"stem":275},"Data retention","\u002Fguide\u002Fpeople-and-security\u002Fretention","3.guide\u002F4.people-and-security\u002F8.retention",{"title":277,"path":278,"stem":279},"Consent banner","\u002Fguide\u002Fpeople-and-security\u002Fconsent","3.guide\u002F4.people-and-security\u002F9.consent",{"title":281,"icon":282,"path":283,"stem":284,"children":285,"page":38},"Services","i-lucide-plug","\u002Fguide\u002Fservices","3.guide\u002F5.services",[286,290,294,298,302,306],{"title":287,"path":288,"stem":289},"Email","\u002Fguide\u002Fservices\u002Femail","3.guide\u002F5.services\u002F1.email",{"title":291,"path":292,"stem":293},"Opening hours","\u002Fguide\u002Fservices\u002Fopening-hours","3.guide\u002F5.services\u002F4.opening-hours",{"title":295,"path":296,"stem":297},"Webhooks","\u002Fguide\u002Fservices\u002Fwebhooks","3.guide\u002F5.services\u002F5.webhooks",{"title":299,"path":300,"stem":301},"Locations","\u002Fguide\u002Fservices\u002Flocations","3.guide\u002F5.services\u002F6.locations",{"title":303,"path":304,"stem":305},"VAT rates","\u002Fguide\u002Fservices\u002Fvat-rates","3.guide\u002F5.services\u002F7.vat-rates",{"title":307,"path":308,"stem":309},"Channels","\u002Fguide\u002Fservices\u002Fchannels","3.guide\u002F5.services\u002F8.channels",{"title":311,"icon":312,"path":313,"stem":314,"children":315,"page":38},"InstalledModules","i-lucide-puzzle","\u002Fguide\u002Fmodules","3.guide\u002F6.modules",[316,320,324,328,332,336,340,344,348,352,356,360],{"title":317,"path":318,"stem":319},"Modules","\u002Fguide\u002Fmodules\u002Fmanaging","3.guide\u002F6.modules\u002F1.managing",{"title":321,"path":322,"stem":323},"Dutch services (module)","\u002Fguide\u002Fmodules\u002Fnl","3.guide\u002F6.modules\u002F10.nl",{"title":325,"path":326,"stem":327},"Editorial (module)","\u002Fguide\u002Fmodules\u002Feditorial","3.guide\u002F6.modules\u002F11.editorial",{"title":329,"path":330,"stem":331},"Appointments (module)","\u002Fguide\u002Fmodules\u002Fappointments","3.guide\u002F6.modules\u002F2.appointments",{"title":333,"path":334,"stem":335},"Shop (the commerce module)","\u002Fguide\u002Fmodules\u002Fshop","3.guide\u002F6.modules\u002F3.shop",{"title":337,"path":338,"stem":339},"Untrusted modules","\u002Fguide\u002Fmodules\u002Funtrusted","3.guide\u002F6.modules\u002F4.untrusted",{"title":341,"path":342,"stem":343},"Analytics (module)","\u002Fguide\u002Fmodules\u002Fanalytics","3.guide\u002F6.modules\u002F5.analytics",{"title":345,"path":346,"stem":347},"Error forwarding (module)","\u002Fguide\u002Fmodules\u002Ferror-forwarding","3.guide\u002F6.modules\u002F6.error-forwarding",{"title":349,"path":350,"stem":351},"Client programs","\u002Fguide\u002Fmodules\u002Fprograms","3.guide\u002F6.modules\u002F7.programs",{"title":353,"path":354,"stem":355},"Import and export (module)","\u002Fguide\u002Fmodules\u002Fimport","3.guide\u002F6.modules\u002F8.import",{"title":357,"path":358,"stem":359},"Payments (module)","\u002Fguide\u002Fmodules\u002Fpayments","3.guide\u002F6.modules\u002F8.payments",{"title":361,"path":362,"stem":363},"Forms (module)","\u002Fguide\u002Fmodules\u002Fforms","3.guide\u002F6.modules\u002F9.forms",{"title":365,"icon":366,"path":367,"stem":368,"children":369,"page":38},"AI assistants","i-lucide-bot","\u002Fguide\u002Fai","3.guide\u002F7.ai",[370,374],{"title":371,"path":372,"stem":373},"AI assistants (MCP)","\u002Fguide\u002Fai\u002Fassistants","3.guide\u002F7.ai\u002F1.assistants",{"title":375,"path":376,"stem":377},"Connecting an AI assistant","\u002Fguide\u002Fai\u002Fconnecting","3.guide\u002F7.ai\u002F2.connecting",{"title":379,"icon":380,"path":381,"stem":382,"children":383,"page":38},"Developers","i-lucide-code","\u002Fdevelopers","4.developers",[384,388,392,396,400,404,408,412,416,420,424,428,432,435,489,493,497,501,536],{"title":385,"path":386,"stem":387},"Architecture","\u002Fdevelopers\u002Farchitecture","4.developers\u002F1.architecture",{"title":389,"path":390,"stem":391},"Capabilities","\u002Fdevelopers\u002Fcapabilities","4.developers\u002F10.capabilities",{"title":393,"path":394,"stem":395},"Trust","\u002Fdevelopers\u002Ftrust","4.developers\u002F11.trust",{"title":397,"path":398,"stem":399},"Redis and the ports","\u002Fdevelopers\u002Fredis","4.developers\u002F12.redis",{"title":401,"path":402,"stem":403},"The worker container role","\u002Fdevelopers\u002Fworker","4.developers\u002F13.worker",{"title":405,"path":406,"stem":407},"kv: a module's own key-value storage","\u002Fdevelopers\u002Fkv","4.developers\u002F14.kv",{"title":409,"path":410,"stem":411},"Processes: long-running work on the worker","\u002Fdevelopers\u002Fprocesses","4.developers\u002F15.processes",{"title":413,"path":414,"stem":415},"Network: a module's outgoing calls","\u002Fdevelopers\u002Fnetwork","4.developers\u002F16.network",{"title":417,"path":418,"stem":419},"Realtime","\u002Fdevelopers\u002Frealtime","4.developers\u002F17.realtime",{"title":421,"path":422,"stem":423},"Private files","\u002Fdevelopers\u002Ffiles","4.developers\u002F18.files",{"title":425,"path":426,"stem":427},"Notify","\u002Fdevelopers\u002Fnotify","4.developers\u002F19.notify",{"title":429,"path":430,"stem":431},"Collections","\u002Fdevelopers\u002Fcollections","4.developers\u002F2.collections",{"title":337,"path":433,"stem":434},"\u002Fdevelopers\u002Funtrusted","4.developers\u002F20.untrusted",{"title":436,"icon":312,"path":437,"stem":438,"children":439},"Writing a plugin","\u002Fdevelopers\u002Fmodules","4.developers\u002F3.modules\u002Findex",[440,442,446,450,454,458,462,466,470,473,477,481,485],{"title":441,"path":437,"stem":438},"Writing a module",{"title":443,"path":444,"stem":445},"Module SDK and tooling","\u002Fdevelopers\u002Fmodules\u002Fsdk-and-tooling","4.developers\u002F3.modules\u002F1.sdk-and-tooling",{"title":447,"path":448,"stem":449},"Connecting accounts with OAuth2","\u002Fdevelopers\u002Fmodules\u002Foauth","4.developers\u002F3.modules\u002F10.oauth",{"title":451,"path":452,"stem":453},"Calls between modules","\u002Fdevelopers\u002Fmodules\u002Fcalls-between-modules","4.developers\u002F3.modules\u002F11.calls-between-modules",{"title":455,"path":456,"stem":457},"Experimental parts","\u002Fdevelopers\u002Fmodules\u002Fexperimental-parts","4.developers\u002F3.modules\u002F12.experimental-parts",{"title":459,"path":460,"stem":461},"The manifest","\u002Fdevelopers\u002Fmodules\u002Fmanifest","4.developers\u002F3.modules\u002F2.manifest",{"title":463,"path":464,"stem":465},"Routes","\u002Fdevelopers\u002Fmodules\u002Froutes","4.developers\u002F3.modules\u002F3.routes",{"title":467,"path":468,"stem":469},"Admin screens and the site part","\u002Fdevelopers\u002Fmodules\u002Fadmin-and-site","4.developers\u002F3.modules\u002F4.admin-and-site",{"title":110,"path":471,"stem":472},"\u002Fdevelopers\u002Fmodules\u002Fcontent","4.developers\u002F3.modules\u002F5.content",{"title":474,"path":475,"stem":476},"Background work and services","\u002Fdevelopers\u002Fmodules\u002Fbackground-and-services","4.developers\u002F3.modules\u002F6.background-and-services",{"title":478,"path":479,"stem":480},"SDK reference","\u002Fdevelopers\u002Fmodules\u002Fsdk-reference","4.developers\u002F3.modules\u002F7.sdk-reference",{"title":482,"path":483,"stem":484},"The website module's SDK","\u002Fdevelopers\u002Fmodules\u002Fwebsite-sdk","4.developers\u002F3.modules\u002F8.website-sdk",{"title":486,"path":487,"stem":488},"Incoming webhooks","\u002Fdevelopers\u002Fmodules\u002Fincoming-webhooks","4.developers\u002F3.modules\u002F9.incoming-webhooks",{"title":490,"path":491,"stem":492},"Core and the website module","\u002Fdevelopers\u002Fcore-and-website-module","4.developers\u002F4.core-and-website-module",{"title":494,"path":495,"stem":496},"The API","\u002Fdevelopers\u002Fapi","4.developers\u002F6.api",{"title":498,"path":499,"stem":500},"API reference","\u002Fdevelopers\u002Fapi-reference","4.developers\u002F6.api-reference",{"title":502,"icon":503,"path":504,"stem":505,"children":506},"Sites in other frameworks","i-lucide-layout-template","\u002Fdevelopers\u002Fframeworks","4.developers\u002F7.frameworks\u002Findex",[507,508,512,516,520,524,528,532],{"title":502,"path":504,"stem":505},{"title":509,"path":510,"stem":511},"Accounts: sign-in and modules' routes","\u002Fdevelopers\u002Fframeworks\u002Faccounts","4.developers\u002F7.frameworks\u002F1.accounts",{"title":513,"path":514,"stem":515},"`@shadestack\u002Ftree`","\u002Fdevelopers\u002Fframeworks\u002Ftree","4.developers\u002F7.frameworks\u002F2.tree",{"title":517,"path":518,"stem":519},"Expressions and styles","\u002Fdevelopers\u002Fframeworks\u002Fexpressions-and-styles","4.developers\u002F7.frameworks\u002F3.expressions-and-styles",{"title":521,"path":522,"stem":523},"`@shadestack\u002Frender`","\u002Fdevelopers\u002Fframeworks\u002Frender","4.developers\u002F7.frameworks\u002F4.render",{"title":525,"path":526,"stem":527},"`@shadestack\u002Finteractions`","\u002Fdevelopers\u002Fframeworks\u002Finteractions","4.developers\u002F7.frameworks\u002F5.interactions",{"title":529,"path":530,"stem":531},"`@shadestack\u002Fa11y`","\u002Fdevelopers\u002Fframeworks\u002Fa11y","4.developers\u002F7.frameworks\u002F6.a11y",{"title":533,"path":534,"stem":535},"Your own page for SHADE's links","\u002Fdevelopers\u002Fframeworks\u002Flinks","4.developers\u002F7.frameworks\u002F7.links",{"title":537,"path":538,"stem":539},"Build a client module","\u002Fdevelopers\u002Fclient-module","4.developers\u002F9.client-module",{"title":541,"icon":542,"path":543,"stem":544,"children":545,"page":38},"Security","i-lucide-shield-check","\u002Fsecurity","5.security",[546,550,554,558],{"title":547,"path":548,"stem":549},"Reporting a vulnerability","\u002Fsecurity\u002Freporting","5.security\u002F0.reporting",{"title":551,"path":552,"stem":553},"Security testing","\u002Fsecurity\u002Ftesting","5.security\u002F1.testing",{"title":555,"path":556,"stem":557},"Hardening a production instance","\u002Fsecurity\u002Fhardening","5.security\u002F2.hardening",{"title":559,"path":560,"stem":561},"Manual testing with Kali Linux","\u002Fsecurity\u002Fmanual-testing","5.security\u002F3.manual-testing",{"title":563,"icon":564,"path":565,"stem":566,"children":567,"page":38},"Contributing","i-lucide-git-pull-request","\u002Fcontributing","6.contributing",[568,572,576,580],{"title":569,"path":570,"stem":571},"Reading the code","\u002Fcontributing\u002Freading-the-code","6.contributing\u002F1.reading-the-code",{"title":573,"path":574,"stem":575},"Docs site","\u002Fcontributing\u002Fdocs-site","6.contributing\u002F2.docs-site",{"title":577,"path":578,"stem":579},"Releases","\u002Fcontributing\u002Freleases","6.contributing\u002F3.releases",{"title":581,"path":582,"stem":583},"Load tests","\u002Fcontributing\u002Fload-tests","6.contributing\u002F4.load-tests",{"title":585,"icon":586,"path":587,"stem":588,"children":589,"page":38},"Project","i-lucide-map","\u002Fproject","7.project",[590,594,598,602],{"title":591,"path":592,"stem":593},"Roadmap","\u002Fproject\u002Froadmap","7.project\u002F1.roadmap",{"title":595,"path":596,"stem":597},"Known issues","\u002Fproject\u002Fknown-issues","7.project\u002F2.known-issues",{"title":599,"path":600,"stem":601},"Changelog","\u002Fproject\u002Fchangelog","7.project\u002F3.changelog",{"title":603,"path":604,"stem":605},"Decisions","\u002Fproject\u002Fdecisions","7.project\u002F4.decisions",{"title":607,"path":608,"stem":609,"children":610,"icon":612},"Community","\u002Fcommunity","8.community\u002Findex",[611],{"title":607,"path":608,"stem":609},"i-lucide-users",{"id":614,"title":569,"body":615,"description":2932,"extension":2944,"links":2945,"meta":2946,"navigation":2947,"path":570,"seo":2948,"stem":571,"__hash__":2949},"docs\u002F6.contributing\u002F1.reading-the-code.md",{"type":616,"value":617,"toc":2931},"minimark",[618,627,632,821,825,828,923,931,935,1100,1104,1118,1207,1223,1226,1408,1411,1491,1495,1502,1627,1630,1634,1640,1716,1742,1746,1771,1818,1822,1825,2233,2236,2529,2562,2617,2645,2708,2772,2778,2839,2843],[619,620,621,622,626],"p",{},"A guided way into the repository: what each part is for, what to read first, and how to follow a change from a click\nin the admin to the visitor's page. It assumes the ",[623,624,625],"a",{"href":386},"architecture"," page for the big picture and\nlinks to the detailed pages instead of repeating them.",[628,629,631],"h2",{"id":630},"the-parts-in-one-minute","The parts in one minute",[633,634,635,651],"table",{},[636,637,638],"thead",{},[639,640,641,645,648],"tr",{},[642,643,644],"th",{},"Part",[642,646,647],{},"What it is",[642,649,650],{},"Start reading at",[652,653,654,675,697,720,738,756,780,799],"tbody",{},[639,655,656,663,669],{},[657,658,659],"td",{},[660,661,662],"code",{},"shade\u002F",[657,664,665,668],{},[660,666,667],{},"@shadestack\u002Fcore",": almost all the logic, by feature: tables, services, admin screens, modules.",[657,670,671,674],{},[660,672,673],{},"shade\u002Fkernel\u002Fcontext.ts",", then one feature",[639,676,677,682,685],{},[657,678,679],{},[660,680,681],{},"apps\u002Fapi",[657,683,684],{},"The Hono server: routes, thin controllers, start-up. No business rules of its own.",[657,686,687,690,691,690,694],{},[660,688,689],{},"src\u002Fserver.ts"," → ",[660,692,693],{},"src\u002Fbootstrap\u002Fapp.ts",[660,695,696],{},"src\u002Froutes\u002F",[639,698,699,704,711],{},[657,700,701],{},[660,702,703],{},"apps\u002Fadmin",[657,705,706,707,710],{},"The Nuxt admin shell. The screens themselves live in ",[660,708,709],{},"shade\u002Ffeatures\u002F*\u002Fadmin",".",[657,712,713,716,717],{},[660,714,715],{},"nuxt.config.ts",", ",[660,718,719],{},"modules\u002Fshade-modules.ts",[639,721,722,727,730],{},[657,723,724],{},[660,725,726],{},"site\u002F",[657,728,729],{},"The Astro website, built to static files from the API.",[657,731,732,716,735],{},[660,733,734],{},"src\u002Flib\u002Fshade.ts",[660,736,737],{},"src\u002Fpages\u002F[...slug].astro",[639,739,740,745,751],{},[657,741,742],{},[660,743,744],{},"packages\u002Fsvg",[657,746,747,750],{},[660,748,749],{},"@shadestack\u002Fsvg",", the SVG an upload may be.",[657,752,753],{},[660,754,755],{},"packages\u002Fsvg\u002Fsrc\u002F",[639,757,758,768,775],{},[657,759,760,763,764,767],{},[660,761,762],{},"frontend\u002F"," (",[660,765,766],{},"shade-frontend",")",[657,769,770,771,774],{},"Sites in other frameworks: a framework-free client plus Astro, Next, SvelteKit and Nuxt, the website editor's packages and the starters. Its own repository since 24 November 2026; ",[660,772,773],{},"packages\u002F"," below is in it.",[657,776,777],{},[660,778,779],{},"packages\u002Fclient\u002Fsrc\u002Findex.ts",[639,781,782,787,790],{},[657,783,784],{},[660,785,786],{},"e2e\u002F",[657,788,789],{},"Playwright tests against a real API, admin and site.",[657,791,792,795,796],{},[660,793,794],{},"e2e\u002Fserver.ts",", any file in ",[660,797,798],{},"e2e\u002Ftests\u002F",[639,800,801,806,816],{},[657,802,803],{},[660,804,805],{},"docs\u002F",[657,807,808,809,811,812,815],{},"The decision records: the reasons behind the design, summed up on the docs' ",[623,810,603],{"href":604}," page. This site is the ",[660,813,814],{},"shade-docs"," repository.",[657,817,818],{},[660,819,820],{},"docs\u002Fdecisions\u002Findex.md",[628,822,824],{"id":823},"which-repository","Which repository",[619,826,827],{},"A change goes to the repository that owns the code. Open issues and pull requests there.",[633,829,830,840],{},[636,831,832],{},[639,833,834,837],{},[642,835,836],{},"What",[642,838,839],{},"Repository",[652,841,842,855,883,894,904,913],{},[639,843,844,850],{},[657,845,846,847,849],{},"The API, the admin, core, the module SDK, ",[660,848,749],{},", the decisions",[657,851,852],{},[660,853,854],{},"shade",[639,856,857,879],{},[657,858,859,860,716,863,716,866,716,869,716,872,716,875,878],{},"The renderers, the framework adapters, the website editor's packages (",[660,861,862],{},"tree",[660,864,865],{},"expressions",[660,867,868],{},"styles",[660,870,871],{},"render",[660,873,874],{},"interactions",[660,876,877],{},"a11y",") and the starters",[657,880,881],{},[660,882,766],{},[639,884,885,888],{},[657,886,887],{},"The modules",[657,889,890,891],{},"their own repositories, ",[660,892,893],{},"shade-plugin-*",[639,895,896,899],{},[657,897,898],{},"SHADE's own site",[657,900,901],{},[660,902,903],{},"shade-site",[639,905,906,909],{},[657,907,908],{},"These docs",[657,910,911],{},[660,912,814],{},[639,914,915,918],{},[657,916,917],{},"Shade Desk",[657,919,920],{},[660,921,922],{},"shade-desk",[619,924,925,927,928,930],{},[660,926,766],{}," is installed and checked inside the SHADE workspace, as a submodule in ",[660,929,762],{},": the workspace\nholds its lockfile.",[628,932,934],{"id":933},"a-reading-order","A reading order",[936,937,938,950,963,1046,1064,1077],"ol",{},[939,940,941,945,946,949],"li",{},[942,943,944],"strong",{},"The rules."," ",[660,947,948],{},"AGENTS.md"," in the repository root lists the working rules and the architecture rules every\nservice follows. They are short and explain most of what you will see.",[939,951,952,945,955,957,958,962],{},[942,953,954],{},"The decisions.",[660,956,820],{},", then at least its ",[959,960,961],"em",{},"Start here"," list: what SHADE is, an instance,\nPostgres and Redis, the code and the API, and trusted and untrusted modules; then the services modules build on,\ncollections and languages, accounts and Better Auth, and frontends.",[939,964,965,763,968,971,972],{},[942,966,967],{},"The kernel",[660,969,970],{},"shade\u002Fkernel\u002F","), the base every feature stands on:\n",[973,974,975,985,999,1012,1030],"ul",{},[939,976,977,980,981,984],{},[660,978,979],{},"context.ts",": the ",[660,982,983],{},"ServiceContext"," every service takes first (database, actor, files, rebuild).",[939,986,987,990,991,994,995,998],{},[660,988,989],{},"permissions.ts"," and ",[660,992,993],{},"actions.ts",": who may do what; ",[660,996,997],{},"assertCan"," is the first line of every service.",[939,1000,1001,1004,1005,1008,1009,710],{},[660,1002,1003],{},"errors.ts",": ",[660,1006,1007],{},"ShadeError"," and its codes, mapped to HTTP in ",[660,1010,1011],{},"apps\u002Fapi\u002Fsrc\u002Fhttp\u002Ferrors.ts",[939,1013,1014,1017,1018,1021,1022,1025,1026,1029],{},[660,1015,1016],{},"db\u002F",": the database client, ",[660,1019,1020],{},"tables.ts"," (every table, re-exported from the features' ",[660,1023,1024],{},"*.sql.ts","), migrations and\n",[660,1027,1028],{},"testing.ts"," (a fresh database per test).",[939,1031,1032,1035,1036,716,1039,716,1042,1045],{},[660,1033,1034],{},"modules\u002F",": defining, loading and switching modules (",[660,1037,1038],{},"define.ts",[660,1040,1041],{},"loader.ts",[660,1043,1044],{},"switch.ts",").",[939,1047,1048,1051,1052,1055,1056,1059,1060,1063],{},[942,1049,1050],{},"One feature, all the way through."," Take ",[660,1053,1054],{},"shade\u002Ffeatures\u002Fentries\u002F"," (below), then compare a smaller one such as\n",[660,1057,1058],{},"media"," or ",[660,1061,1062],{},"email",". Every feature has the same shape, so after two the rest read quickly.",[939,1065,1066,945,1069,1072,1073,1076],{},[942,1067,1068],{},"The API around it.",[660,1070,1071],{},"apps\u002Fapi\u002Fsrc\u002Froutes\u002F"," shows every URL and its middleware; each line points to a\ncontroller in ",[660,1074,1075],{},"http\u002Fcontrollers\u002F",", which parses input and calls a service.",[939,1078,1079,945,1082,1085,1086,1088,1089,1092,1093,1096,1097,1045],{},[942,1080,1081],{},"The site.",[660,1083,1084],{},"site\u002Fsrc\u002Flib\u002Fshade.ts"," (how the build reads the API), ",[660,1087,737],{}," (one page)\nand ",[660,1090,1091],{},"src\u002Flib\u002Fpage.ts"," (a page's tree resolved by ",[660,1094,1095],{},"@shadestack\u002Frender"," and drawn by ",[660,1098,1099],{},"ShadeTree",[628,1101,1103],{"id":1102},"the-shape-of-a-feature","The shape of a feature",[619,1105,1106,1107,1110,1111,1114,1115,1117],{},"Every folder in ",[660,1108,1109],{},"shade\u002Ffeatures\u002F"," has up to three parts, and a ",[660,1112,1113],{},"README.md"," naming its code and tests. Using ",[660,1116,1058],{}," as the example:",[633,1119,1120,1132],{},[636,1121,1122],{},[639,1123,1124,1126,1129],{},[642,1125,644],{},[642,1127,1128],{},"Holds",[642,1130,1131],{},"May import",[652,1133,1134,1154,1177],{},[639,1135,1136,1141,1148],{},[657,1137,1138],{},[660,1139,1140],{},"shared\u002F",[657,1142,1143,1144,1147],{},"Types and Zod input schemas (",[660,1145,1146],{},"PublishedMedia",", the allowed file types). Runs in the browser and on the server.",[657,1149,1150,1151,1153],{},"other ",[660,1152,1140],{}," code only",[639,1155,1156,1161,1174],{},[657,1157,1158],{},[660,1159,1160],{},"server\u002F",[657,1162,1163,1164,1167,1168,1170,1171,710],{},"Services (",[660,1165,1166],{},"media.ts",": uploads, alt texts, …), tables (",[660,1169,1024],{},"); their Postgres tests are under ",[660,1172,1173],{},"shade\u002Ftest\u002F",[657,1175,1176],{},"anything server-side",[639,1178,1179,1184,1200],{},[657,1180,1181],{},[660,1182,1183],{},"admin\u002F",[657,1185,1186,1187,1190,1191,716,1194,716,1197,710],{},"Screens: ",[660,1188,1189],{},"pages\u002F"," (routes), ",[660,1192,1193],{},"components\u002F",[660,1195,1196],{},"composables\u002F",[660,1198,1199],{},"locales\u002F{en,nl}.json",[657,1201,1202,1204,1205],{},[660,1203,1140],{},", never ",[660,1206,1160],{},[619,1208,1209,1212,1213,716,1216,1059,1219,1222],{},[660,1210,1211],{},"pnpm lint"," enforces the import column: no server code in ",[660,1214,1215],{},"shared",[660,1217,1218],{},"admin",[660,1220,1221],{},"site"," parts.",[619,1224,1225],{},"The features, in a sentence each:",[633,1227,1228,1238],{},[636,1229,1230],{},[639,1231,1232,1235],{},[642,1233,1234],{},"Feature",[642,1236,1237],{},"What it does",[652,1239,1240,1250,1259,1269,1279,1289,1299,1309,1318,1328,1338,1348,1358,1368,1378,1388,1398],{},[639,1241,1242,1247],{},[657,1243,1244],{},[660,1245,1246],{},"entries",[657,1248,1249],{},"Content: collections compiled to SQL tables, drafts, versions, publishing, the content API.",[639,1251,1252,1256],{},[657,1253,1254],{},[660,1255,1058],{},[657,1257,1258],{},"Uploads, image variants (sharp), alt texts, storage on disk or S3.",[639,1260,1261,1266],{},[657,1262,1263],{},[660,1264,1265],{},"settings",[657,1267,1268],{},"Site settings: name, address, languages, time zone. The theme and the build hook are the website module's.",[639,1270,1271,1276],{},[657,1272,1273],{},[660,1274,1275],{},"content-delivery",[657,1277,1278],{},"Rebuilds (the debounced rebuild) and other frontends.",[639,1280,1281,1286],{},[657,1282,1283],{},[660,1284,1285],{},"team",[657,1287,1288],{},"The team, Better Auth sign-in, two-factor, passkeys, roles and custom roles, API tokens.",[639,1290,1291,1296],{},[657,1292,1293],{},[660,1294,1295],{},"audit",[657,1297,1298],{},"The audit log every service writes to.",[639,1300,1301,1306],{},[657,1302,1303],{},[660,1304,1305],{},"users",[657,1307,1308],{},"Accounts on the website (a separate Better Auth instance) and modules' account roles.",[639,1310,1311,1315],{},[657,1312,1313],{},[660,1314,1062],{},[657,1316,1317],{},"Sending email through SMTP or Brevo, with retries.",[639,1319,1320,1325],{},[657,1321,1322],{},[660,1323,1324],{},"providers",[657,1326,1327],{},"The provider registry: which providers (email, accounts) are set up and which modules need them, and their settings.",[639,1329,1330,1335],{},[657,1331,1332],{},[660,1333,1334],{},"data",[657,1336,1337],{},"Data sources.",[639,1339,1340,1345],{},[657,1341,1342],{},[660,1343,1344],{},"consent",[657,1346,1347],{},"The consent banner.",[639,1349,1350,1355],{},[657,1351,1352],{},[660,1353,1354],{},"privacy",[657,1356,1357],{},"Finding, exporting and erasing one person's data.",[639,1359,1360,1365],{},[657,1361,1362],{},[660,1363,1364],{},"retention",[657,1366,1367],{},"Deleting personal data after a period per kind.",[639,1369,1370,1375],{},[657,1371,1372],{},[660,1373,1374],{},"paths",[657,1376,1377],{},"Where entries with an address live on the site, and where they were (redirect paths).",[639,1379,1380,1385],{},[657,1381,1382],{},[660,1383,1384],{},"preview",[657,1386,1387],{},"Preview links: signing and reading preview tokens for modules.",[639,1389,1390,1395],{},[657,1391,1392],{},[660,1393,1394],{},"ai",[657,1396,1397],{},"AI assistants over MCP, and reverting their changes.",[639,1399,1400,1405],{},[657,1401,1402],{},[660,1403,1404],{},"packages",[657,1406,1407],{},"The Modules screen: switching catalog modules, untrusted modules.",[619,1409,1410],{},"Next to the features:",[973,1412,1413,1430,1464],{},[939,1414,1415,1418,1419,1422,1423,1426,1427,1429],{},[660,1416,1417],{},"shade\u002Ffields\u002F\u003Ckind>\u002F",": one folder per field type (",[660,1420,1421],{},"shared.ts"," the definition, ",[660,1424,1425],{},"server.ts"," its column and checks,\n",[660,1428,1183],{}," its editor). The entries feature looks types up here instead of switching over kinds.",[939,1431,1432,1433,716,1436,1439,1440,716,1443,1446,1447,1449,1450,1452,1453,1456,1457,1460,1461,710],{},"No modules: they live in their own repositories (",[660,1434,1435],{},"shade-plugin-website",[660,1437,1438],{},"shade-plugin-appointments",",\n",[660,1441,1442],{},"shade-plugin-commerce",[660,1444,1445],{},"shade-plugin-editorial",", in the workspace's ",[660,1448,1034],{},"; website editing is one of them, see\n",[623,1451,490],{"href":491},"), with the feature parts plus ",[660,1454,1455],{},"module.ts"," and their own migrations. Core's fixture modules\nfor its tests are in ",[660,1458,1459],{},"shade\u002Ftest\u002Ftesting\u002Ffixtures\u002Fmodules",". See ",[623,1462,1463],{"href":437},"Writing modules",[939,1465,1466,1469,1470,1473,1474,716,1477,716,1480,1482,1483,1486,1487,1490],{},[660,1467,1468],{},"shade\u002Fsdk\u002F",": the typed read client sites use. ",[660,1471,1472],{},"shade\u002Fexports\u002F",": the entry points the apps import\n(",[660,1475,1476],{},"core",[660,1478,1479],{},"schema",[660,1481,1221],{},"). ",[660,1484,1485],{},"shade\u002Fmodule-sdk\u002F",": the package ",[660,1488,1489],{},"@shadestack\u002Fmodule-sdk",", the only thing modules import from SHADE.",[628,1492,1494],{"id":1493},"following-one-change-publishing-an-entry","Following one change: publishing an entry",[619,1496,1497,1498,1501],{},"The quickest way to see how the parts connect. Open these files side by side (a website's page is an entry of the\nwebsite module's ",[660,1499,1500],{},"website-pages"," collection):",[936,1503,1504,1525,1541,1561,1589,1598,1607],{},[939,1505,1506,945,1509,1512,1513,1516,1517,1520,1521,1524],{},[942,1507,1508],{},"The button.",[660,1510,1511],{},"shade\u002Ffeatures\u002Fentries\u002Fadmin\u002Fpages\u002Fcollections\u002F[slug]\u002F[id].vue"," calls\n",[660,1514,1515],{},"POST \u002Fapi\u002Fcollections\u002F:slug\u002F:id\u002Fpublish",". The admin dev server forwards ",[660,1518,1519],{},"\u002Fapi"," to the API\n(",[660,1522,1523],{},"apps\u002Fadmin\u002Fnuxt.config.ts","); in production they share one origin.",[939,1526,1527,945,1530,1533,1534,1537,1538,1045],{},[942,1528,1529],{},"The route.",[660,1531,1532],{},"apps\u002Fapi\u002Fsrc\u002Froutes\u002Fapi.ts"," mounts it behind the session middleware (",[660,1535,1536],{},"http\u002Fmiddleware\u002Fauth.ts",")\nand the same-origin check (",[660,1539,1540],{},"http\u002Fmiddleware\u002Forigin.ts",[939,1542,1543,945,1546,1004,1549,1552,1553,1556,1557,1560],{},[942,1544,1545],{},"The controller.",[660,1547,1548],{},"apps\u002Fapi\u002Fsrc\u002Fhttp\u002Fcontrollers\u002Fcollections.ts",[660,1550,1551],{},"publish"," parses the body with\n",[660,1554,1555],{},"PublishEntryInput"," and calls ",[660,1558,1559],{},"publishEntry",". That is all a controller does.",[939,1562,1563,945,1566,1568,1569,1572,1573,1576,1577,1580,1581,1584,1585,1588],{},[942,1564,1565],{},"The service.",[660,1567,1559],{}," in ",[660,1570,1571],{},"shade\u002Ffeatures\u002Fentries\u002Fserver\u002Fcollections.ts",":\n",[660,1574,1575],{},"assertCan(ctx.actor, 'collections.\u003Cslug>.publish')",", the collection's publish checks (a module's too: the website\nmodule compiles the styles and checks accessibility), then it publishes the version in a transaction, records the\naudit entry and asks for a rebuild (",[660,1578,1579],{},"ctx.rebuild.request","). With it, in the same transaction, it writes the event\n",[660,1582,1583],{},"entries.entry.published",", which search, moved addresses and the modules' ",[660,1586,1587],{},"on"," hear on the worker.",[939,1590,1591,945,1594,1597],{},[942,1592,1593],{},"The rebuild.",[660,1595,1596],{},"shade\u002Ffeatures\u002Fcontent-delivery\u002Fserver\u002Frebuild-trigger.ts"," waits for a quiet period (30 seconds by default), so\nten publishes make one rebuild, then calls every other frontend's webhook and each module's rebuild target (the\nwebsite module calls the site's build hook).",[939,1599,1600,1602,1603,1606],{},[942,1601,1593],{}," The webhook reaches the site runner (",[660,1604,1605],{},"site\u002Frunner\u002Frunner.mjs","), which runs the Astro build\ninto a fresh folder and switches to it in one step, then reports the result back to the API.",[939,1608,1609,1612,1613,1615,1616,1619,1620,990,1622,763,1624,1045],{},[942,1610,1611],{},"The page."," During the build, ",[660,1614,1084],{}," reads the published page through the sdk with a read\ntoken, and ",[660,1617,1618],{},"[...slug].astro"," renders its tree with ",[660,1621,1095],{},[660,1623,1099],{},[660,1625,1626],{},"@shadestack\u002Fastro\u002Ftree",[619,1628,1629],{},"The same path holds for almost everything: admin screen → route → controller → service → database, with the audit\nlog, events and rebuilds as side effects of the service.",[628,1631,1633],{"id":1632},"the-api-app","The API app",[619,1635,1636,1639],{},[660,1637,1638],{},"apps\u002Fapi\u002Fsrc\u002F",":",[973,1641,1642,1655,1665,1695,1701,1710],{},[939,1643,1644,1646,1647,1650,1651,1654],{},[660,1645,1425],{},": reads the configuration, starts up (",[660,1648,1649],{},"bootstrap\u002Fstart.ts",": database check, migrations, modules, content\nmodel, jobs) and listens. ",[660,1652,1653],{},"config.ts"," is the only place that reads environment variables.",[939,1656,1657,1660,1661,1664],{},[660,1658,1659],{},"bootstrap\u002Fruntime.ts",": the long-lived services (database, storage, auth, rebuild trigger, modules), created once.\n",[660,1662,1663],{},"bootstrap\u002Fapp.ts",": the Hono app; it mounts the route files by role.",[939,1666,1667,1670,1671,1674,1675,1678,1679,1682,1683,1686,1687,1690,1691,1694],{},[660,1668,1669],{},"routes\u002F",": one file per group. ",[660,1672,1673],{},"api.ts"," (the admin's API, sessions), ",[660,1676,1677],{},"content.ts"," (the content API: the site build, read\ntokens), ",[660,1680,1681],{},"data.ts"," (data tokens), ",[660,1684,1685],{},"user.ts"," (accounts; the public role), ",[660,1688,1689],{},"mcp.ts"," (AI),\n",[660,1692,1693],{},"web.ts"," (health, uploaded files, icons, the OpenAPI document and the admin's built files).",[939,1696,1697,1700],{},[660,1698,1699],{},"http\u002F",": controllers, middleware (auth, origin, rate limits, body limits), error mapping, CSP, the OpenAPI document.",[939,1702,1703,1004,1706,1709],{},[660,1704,1705],{},"console\u002F",[660,1707,1708],{},"create-admin",", collection generation and module signing commands.",[939,1711,1712,1715],{},[660,1713,1714],{},"sandbox\u002F",": untrusted modules, each in its own workerd process.",[619,1717,1718,1719,1721,1722,1725,1726,1729,1730,1733,1734,1737,1738,1741],{},"The container roles: ",[660,1720,1218],{}," serves the team, the build and MCP; ",[660,1723,1724],{},"public"," serves only the account API; ",[660,1727,1728],{},"worker"," serves\nonly ",[660,1731,1732],{},"\u002Fhealth"," and runs the background work (",[660,1735,1736],{},"bootstrap\u002Fworker.ts",": the schedules and the heartbeat). ",[660,1739,1740],{},"all"," (the\ndefault) does everything, for development only.",[628,1743,1745],{"id":1744},"the-admin-app","The admin app",[619,1747,1748,1750,1751,1754,1755,1757,1758,1760,1761,1764,1765,1768,1769,710],{},[660,1749,703],{}," is mostly a shell: the layout, sign-in, the dashboard and shared components in ",[660,1752,1753],{},"app\u002F",".\n",[660,1756,719],{}," mounts every feature's ",[660,1759,1183],{}," folder (pages become routes, components and composables\nare auto-imported, locales get the feature's prefix); ",[660,1762,1763],{},"modules\u002Fshade-installed-modules.ts"," does the same for modules. So to find\na screen, look in ",[660,1766,1767],{},"shade\u002Ffeatures\u002F\u003Cname>\u002Fadmin\u002Fpages\u002F"," rather than in ",[660,1770,703],{},[619,1772,1773,1774,1777,1778,1781,1782,1785,1786,1789,1790,1793,1794,716,1797,716,1800,1803,1804,1807,1808,1810,1811,1754,1814,1817],{},"Texts go through translation keys in Dutch and English. API error messages are too:\n",[660,1775,1776],{},"notFound({ key, params }, sentence)",", an issue's ",[660,1779,1780],{},"message: '…', key: '…'"," or a refinement's\n",[660,1783,1784],{},"message: '…', params: { key: '…' }",", the key under ",[660,1787,1788],{},"\u003Cfeature>.errors"," in the feature's ",[660,1791,1792],{},"admin\u002Flocales"," (the shell's\n",[660,1795,1796],{},"common.errors",[660,1798,1799],{},"api.errors",[660,1801,1802],{},"tree.errors","… for what is shared, the API's and the packages'). A helper called with\nnothing (",[660,1805,1806],{},"notFound()",") says its own sentence by its ",[660,1809,1796],{}," key, and \"Invalid input\" is\n",[660,1812,1813],{},"validation(INVALID_INPUT, 'Invalid input', issues)",[660,1815,1816],{},"apps\u002Fadmin\u002Ftest\u002Fchecks\u002Fmessages.test.ts"," fails on a message without a key, or a key without its English and Dutch.",[628,1819,1821],{"id":1820},"tests-and-how-to-use-them-to-read","Tests, and how to use them to read",[619,1823,1824],{},"Tests are the best documentation of the rules: each service's test reads as a list of what it allows and refuses.",[973,1826,1827,1908,1958,1992,2040,2132,2223],{},[939,1828,1829,1832,1833,1836,1837,1840,1841,1568,1844,1846,1847,1850,1851,1854,1855,1858,1859,1862,1863,1866,1867,1870,1871,1874,1875,1878,1879,1881,1882,1885,1886,1889,1890,1892,1893,1896,1897,1900,1901,1904,1905,1907],{},[942,1830,1831],{},"Unit tests"," need nothing (",[660,1834,1835],{},"unit",", about 400 tests in seconds). ",[942,1838,1839],{},"Postgres tests"," sit next to the services\n(",[660,1842,1843],{},"*.test.ts",[660,1845,1160],{},"; ",[660,1848,1849],{},"db",", about 350). A file is a Postgres test when it makes a test database\n(",[660,1852,1853],{},"createTestDatabase","); ",[660,1856,1857],{},"vitest.config.ts"," sorts the files by that. The Postgres tests run on their own server, the\n",[660,1860,1861],{},"postgres-test"," container of ",[660,1864,1865],{},"docker-compose.yml"," (port 5433, data in memory), which they start themselves\n(",[660,1868,1869],{},"scripts\u002Ftest-database.mjs","; Docker must be running); ",[660,1872,1873],{},"SHADE_TEST_DATABASE_URL"," points them at another server\ninstead. Without a server they fail with a message saying so, never skip, so a run without a database can't pass\nas green. Your development database is never used. Each test gets a fresh database, a copy of one migrated template\n(",[660,1876,1877],{},"kernel\u002Fdb\u002Ftesting.ts","), so they stay independent and fast. A test's ",[660,1880,1849],{}," connects as the running role ",[660,1883,1884],{},"shade_app",", so\nrow-level security applies; ",[660,1887,1888],{},"TestDatabase.owner"," is the owner's handle for a test's own DDL. The browser tests use the same server, and modules\ntoo. The browser tests' servers (",[660,1891,794],{},") and the site's (",[660,1894,1895],{},"e2e\u002Fsite-server.ts",") start from a copy of the\nsame template as well, instead of migrating: only the first run after a change of the migrations migrates, into a\nnew template named after their hash (a changed or added migration, or a changed journal, makes a new one; the\nslot's older ones are dropped). Their seed (the test admin, the module packages signed for the run) is made per\nserver, since it holds the run's password and signing key (",[660,1898,1899],{},"testDatabase()"," from ",[660,1902,1903],{},"@shadestack\u002Fmodule-sdk\u002Ftest-database"," in their ",[660,1906,1857],{},", which passes on the\ncheckout's test slot).",[939,1909,1910,763,1913,1916,1917,1004,1920,1923,1924,1927,1928,1931,1932,1935,1936,1939,1940,1943,1944,990,1947,1950,1951,1900,1954,1957],{},[942,1911,1912],{},"The API's tests",[660,1914,1915],{},"apps\u002Fapi\u002Ftest",") share their set-up in ",[660,1918,1919],{},"apps\u002Fapi\u002Ftest\u002Ftesting\u002F",[660,1921,1922],{},"app.ts"," builds the real app on a test database (",[660,1925,1926],{},"testApp",", with Redis, modules, user and team sign-in as options), ",[660,1929,1930],{},"auth.ts"," signs a team member (",[660,1933,1934],{},"signInTeam",") or a user (",[660,1937,1938],{},"signUpAccount",") in and holds the one test password, and ",[660,1941,1942],{},"http.ts"," has ",[660,1945,1946],{},"postJson",[660,1948,1949],{},"cookieOf",", which builds on ",[660,1952,1953],{},"cookiesOf",[660,1955,1956],{},"shade\u002Ftest\u002Ftesting\u002Fteam-auth.ts",". A test with a set-up of its own, such as one that needs a mock of the sign-in, keeps it local.",[939,1959,1960,1963,1964,1966,1967,1970,1971,1974,1975,1862,1978,1980,1981,1854,1984,1986,1987,716,1990,1045],{},[942,1961,1962],{},"Redis tests"," run in the same ",[660,1965,1849],{}," project (a file that reads ",[660,1968,1969],{},"SHADE_TEST_REDIS_URL","): the Redis driver's\n(",[660,1972,1973],{},"apps\u002Fapi\u002Ftest\u002Fredis\u002Fdriver.test.ts","), on the ",[660,1976,1977],{},"redis-test",[660,1979,1865],{}," (port 6380, nothing on\ndisk), which they start themselves (",[660,1982,1983],{},"scripts\u002Ftest-redis.mjs",[660,1985,1969],{}," points them at another Redis.\nEach case keeps its keys under a prefix of its own and removes them. Every test API of the browser tests runs on it\ntoo (Redis is required), and so does the site's. Core's unit tests use the memory ports instead\n(",[660,1988,1989],{},"memoryCoordination",[623,1991,397],{"href":398},[939,1993,1994,763,1997,2000,2001,2004,2005,2008,2009,1900,2012,1204,2015,2018,2019,2021,2022,2025,2026,716,2029,2032,2033,2036,2037,1045],{},[942,1995,1996],{},"Playwright tests",[660,1998,1999],{},"e2e\u002Ftests\u002F*.spec.ts",") click through the real admin. They are the place to see what a screen\nis supposed to do. They run on several workers at once (",[660,2002,2003],{},"E2E_WORKERS",", default 3), each with a server and a\ndatabase of its own (",[660,2006,2007],{},"e2e\u002Fservers.ts","), so a spec imports ",[660,2010,2011],{},"test",[660,2013,2014],{},"e2e\u002Ftest.ts",[660,2016,2017],{},"@playwright\u002Ftest","\n(",[660,2020,1211],{}," checks it), and sets up what it needs itself instead of counting on another spec having run first\n(",[660,2023,2024],{},"e2e\u002Fhelpers.ts"," has such steps: ",[660,2027,2028],{},"withHiddenEnglish",[660,2030,2031],{},"createTeamMember"," for a team member made over the API and ",[660,2034,2035],{},"signIn"," for the login screen, which the modules' browser tests import from ",[660,2038,2039],{},"@shadestack\u002Fe2e\u002Fhelpers",[939,2041,2042,2045,2046,2048,2049,763,2052,2055,2056],{},[942,2043,2044],{},"Checkouts side by side."," Several checkouts (git worktrees, the workspace's ",[660,2047,662],{},") can run their tests at the\nsame time on one machine, each in its own ",[959,2050,2051],{},"test slot",[660,2053,2054],{},"scripts\u002Ftest-slot.mjs","):\n",[973,2057,2058,2077,2104,2118],{},[939,2059,2060,945,2063,2066,2067,2070,2071,2073,2074,2076],{},[942,2061,2062],{},"Which slot:",[660,2064,2065],{},"SHADE_TEST_SLOT"," (0–9) when set; otherwise 0 for the repository's own checkout and 1–9 for a\nworktree or submodule. A worktree holds its slot in a file per slot in the machine's temporary folder\n(",[660,2068,2069],{},"shade-test-slots\u002F\u003Cn>",", holding the checkout's path): the slot a hash of its path picks, else the next free one,\nso two checkouts never share one. A removed worktree's slot is free again. With all nine held the tests stop and\nsay so: set ",[660,2072,2065],{},", or remove the file of a checkout you no longer test from. ",[660,2075,2065],{}," is\nnever checked against the held slots.",[939,2078,2079,2082,2083,2086,2087,2089,2090,2093,2094,2097,2098,2100,2101,2103],{},[942,2080,2081],{},"What it changes:"," slot ",[959,2084,2085],{},"n"," moves every test port up by ",[959,2088,2085],{}," × 100 (the browser tests' servers, the site's API,\nsite, and the payments module's own tests stand in for Mollie with ",[660,2091,2092],{},"@shadestack\u002Fmodule-payments\u002Ftesting",", the image test's containers) and adds ",[660,2095,2096],{},"_s\u003Cn>"," to the databases, migration templates\nand containers the tests make, and uses Redis's database ",[959,2099,2085],{}," of ",[660,2102,1977],{},". Each checkout replaces only its own\nold templates.",[939,2105,2106,2109,2110,2112,2113,2115,2116,710],{},[942,2107,2108],{},"What stays the same:"," slot 0 keeps the ports and names as they were. All slots share the one ",[660,2111,1861],{},"\nand the one ",[660,2114,1977],{}," container, always started under the compose project ",[660,2117,854],{},[939,2119,2120,2123,2124,2127,2128,2131],{},[942,2121,2122],{},"Site tests"," read the site's address from ",[660,2125,2126],{},"SITE_PORT",", which ",[660,2129,2130],{},"e2e\u002Fsite.config.ts"," sets for the slot.",[939,2133,2134,2137,2138,2141,2142,1846,2145,2148,2149,716,2152,716,2155,2158,2159,2161,2162,2165,2166,2168,2169],{},[942,2135,2136],{},"One browser run at a time."," Slots keep the runs' ports, databases and containers apart, but two browser runs at\nonce still share the machine's cores, and their time limits then fail tests that are fine. So Playwright runs\nthrough ",[660,2139,2140],{},"e2e\u002Frun.ts",", which first takes the machine's lock (",[660,2143,2144],{},"scripts\u002Fe2e-lock.mjs",[660,2146,2147],{},"shade-e2e.lock"," in the\ntemporary folder): ",[660,2150,2151],{},"pnpm test:e2e",[660,2153,2154],{},"pnpm test:e2e:run",[660,2156,2157],{},"pnpm test:e2e:affected",", the modules' ",[660,2160,2151],{},"\nand ",[660,2163,2164],{},"pnpm test:site",", and the site's ",[660,2167,2151],{}," all do.\n",[973,2170,2171,2202,2213,2220],{},[939,2172,2173,945,2176,716,2178,716,2181,990,2184,2187,2188,2191,2192,2195,2196,2198,2199,2201],{},[942,2174,2175],{},"The checks take it too:",[660,2177,1211],{},[660,2179,2180],{},"pnpm typecheck",[660,2182,2183],{},"pnpm test",[660,2185,2186],{},"pnpm test:affected"," run through\n",[660,2189,2190],{},"scripts\u002Flocked.mjs",", so a check never runs while another checkout's checks or browser tests do. What a check\nstarts learns the lock is held (",[660,2193,2194],{},"SHADE_TEST_LOCK_HELD",", its holder's process id), so ",[660,2197,2186],{}," running\n",[660,2200,2183],{}," never waits for itself.",[939,2203,2204,2205,2208,2209,2212],{},"A run that finds the lock held ",[942,2206,2207],{},"waits",", saying whose run it is: the process id, the folder it started in (its\nworktree), since when, and how to stop it if it is a stray one (on Windows ",[660,2210,2211],{},"taskkill \u002FPID \u003Cid> \u002FT \u002FF",", which\nstops Playwright's servers and browsers with it).",[939,2214,2215,2216,2219],{},"A lock whose ",[942,2217,2218],{},"process has ended"," (a run stopped hard) is removed by the next run. The lock file is JSON with the\nsame owner, for a look by hand.",[939,2221,2222],{},"It waits at most three hours, then fails naming the holder.",[939,2224,2225,2228,2229,2232],{},[660,2226,2227],{},"pnpm dev:check"," checks that ",[660,2230,2231],{},"pnpm dev"," starts the API and the admin.",[619,2234,2235],{},"Running what you need:",[633,2237,2238,2251],{},[636,2239,2240],{},[639,2241,2242,2245,2248],{},[642,2243,2244],{},"Command",[642,2246,2247],{},"Runs",[642,2249,2250],{},"Time",[652,2252,2253,2265,2278,2291,2308,2331,2354,2376,2391,2403,2415,2432,2444,2469,2485,2497,2509],{},[639,2254,2255,2259,2262],{},[657,2256,2257],{},[660,2258,2183],{},[657,2260,2261],{},"every unit and Postgres test",[657,2263,2264],{},"about 1 min",[639,2266,2267,2272,2275],{},[657,2268,2269],{},[660,2270,2271],{},"pnpm test:unit",[657,2273,2274],{},"the tests without a database",[657,2276,2277],{},"about 10 s",[639,2279,2280,2285,2288],{},[657,2281,2282],{},[660,2283,2284],{},"pnpm test:db",[657,2286,2287],{},"the Postgres tests",[657,2289,2290],{},"about 30 s",[639,2292,2293,2298,2305],{},[657,2294,2295],{},[660,2296,2297],{},"pnpm test:changed",[657,2299,2300,2301,2304],{},"the tests of files changed since ",[660,2302,2303],{},"main",", and of what imports them",[657,2306,2307],{},"depends",[639,2309,2310,2315,2328],{},[657,2311,2312],{},[660,2313,2314],{},"pnpm --filter \u003Cpackage> test",[657,2316,2317,2318,763,2321,2324,2325,767],{},"one package's own tests, e.g. ",[660,2319,2320],{},"pnpm --filter @shadestack\u002Frender test",[660,2322,2323],{},"pnpm test:scripts"," the root's, ",[660,2326,2327],{},"test\u002F",[657,2329,2330],{},"seconds",[639,2332,2333,2337,2351],{},[657,2334,2335],{},[660,2336,2186],{},[657,2338,2339,2340,2343,2344,1846,2347,2350],{},"the tests of the packages changed since ",[660,2341,2342],{},"origin\u002Fmain"," and of those that depend on them; everything when the root changed (",[660,2345,2346],{},"--base \u003Cref>",[660,2348,2349],{},"pnpm test:affected typecheck"," the same for the typecheck)",[657,2352,2353],{},"seconds to the full run",[639,2355,2356,2364,2374],{},[657,2357,2358,2361,2362,767],{},[660,2359,2360],{},"pnpm test:frameworks \u003Cnext|nuxt|sveltekit>"," (in ",[660,2363,766],{},[657,2365,2366,2367,2370,2371,767],{},"an adapter's typecheck and tests on its framework's current version (",[660,2368,2369],{},"--e2e"," with the render bundles' browser tests; other versions in CI only, ",[623,2372,577],{"href":2373},"\u002Fcontributing\u002Freleases#the-framework-matrix",[657,2375,2330],{},[639,2377,2378,2383,2389],{},[657,2379,2380],{},[660,2381,2382],{},"pnpm test \u003Cpart of a path>",[657,2384,2385,2386],{},"matching files, e.g. ",[660,2387,2388],{},"pnpm test schedules",[657,2390,2330],{},[639,2392,2393,2398,2401],{},[657,2394,2395],{},[660,2396,2397],{},"pnpm test -t \"\u003Cpart of a name>\"",[657,2399,2400],{},"matching tests",[657,2402,2330],{},[639,2404,2405,2410,2413],{},[657,2406,2407],{},[660,2408,2409],{},"pnpm test:watch",[657,2411,2412],{},"reruns what a saved file affects",[657,2414],{},[639,2416,2417,2422,2429],{},[657,2418,2419],{},[660,2420,2421],{},"pnpm coverage",[657,2423,2424,2425,2428],{},"every unit and Postgres test, with what they run of the code: a summary per folder in ",[660,2426,2427],{},"coverage\u002Findex.html"," (reported, never a threshold)",[657,2430,2431],{},"a few minutes",[639,2433,2434,2438,2441],{},[657,2435,2436],{},[660,2437,2151],{},[657,2439,2440],{},"builds the admin and the API when they changed, then every browser test, on 3 workers",[657,2442,2443],{},"about 3 min",[639,2445,2446,2450,2466],{},[657,2447,2448],{},[660,2449,2157],{},[657,2451,2452,2453,2455,2456,2459,2460,1846,2462,2465],{},"the browser tests a branch needs since ",[660,2454,2342],{},": none, the specs of the features it touched, or every one when it touched what all specs stand on or a path it can't place (",[660,2457,2458],{},"--dry"," prints the choice and why; ",[660,2461,2346],{},[660,2463,2464],{},"--targeted",": for a batch of a series, the specs it touched and a smoke set instead of every one)",[657,2467,2468],{},"none to the full run",[639,2470,2471,2476,2482],{},[657,2472,2473],{},[660,2474,2475],{},"pnpm test:e2e:run \u003Cspec>",[657,2477,2478,2479],{},"browser tests without building first, e.g. ",[660,2480,2481],{},"tests\u002Faudit.spec.ts",[657,2483,2484],{},"about 10 s a spec",[639,2486,2487,2492,2495],{},[657,2488,2489],{},[660,2490,2491],{},"pnpm test:e2e:run --last-failed",[657,2493,2494],{},"the browser tests that failed last time",[657,2496],{},[639,2498,2499,2504,2507],{},[657,2500,2501],{},[660,2502,2503],{},"pnpm test:e2e:run -g \"\u003Cname>\"",[657,2505,2506],{},"browser tests whose name matches",[657,2508],{},[639,2510,2511,2516,2527],{},[657,2512,2513],{},[660,2514,2515],{},"E2E_AREA=render pnpm test:e2e:run",[657,2517,2518,2519,716,2521,1059,2524,2526],{},"the browser tests of one area: ",[660,2520,871],{},[660,2522,2523],{},"plugins",[660,2525,1218],{}," (every other spec)",[657,2528],{},[619,2530,2531,2532,716,2534,716,2536,716,2539,2541,2542,2544,2545,2548,2549,2161,2551,2553,2554,2557,2558,2561],{},"Before a pull request: ",[660,2533,2180],{},[660,2535,1211],{},[660,2537,2538],{},"pnpm architecture:baseline",[660,2540,2186],{}," and\n",[660,2543,2157],{},", and the site's browser tests when it says the site reads what changed. During a series of\nbatches, each batch runs ",[660,2546,2547],{},"pnpm test:e2e:affected --targeted"," (the specs of what it touched, plus signing in,\npublishing, modules and a module's consent, instead of every spec when it touched what they all stand on), and the\nlast batch of each stack runs the full suite before it is merged; with no series named, the full suite stays the\ndefault. The full ",[660,2550,2183],{},[660,2552,2151],{}," run at milestones: after a series of changes, after an upgrade of a runtime, database or framework,\nand before every release. While working, the narrower commands; every browser run (",[660,2555,2556],{},"test:e2e:run"," too, and a module's\nor the site's) builds the admin and the API first when they changed (",[660,2559,2560],{},"node scripts\u002Fe2e-build.mjs","; about a second when\nnothing did), except in CI, which takes the build job's output.",[619,2563,2564,945,2567,2570,2571,1439,2574,2577,2578,2580,2581,2584,2585,2588,2589,2592,2593,716,2596,716,2599,716,2602,2541,2605,2608,2609,2612,2613,2616],{},[942,2565,2566],{},"One build per run.",[660,2568,2569],{},"scripts\u002Fe2e-build.mjs"," builds the admin, then the API, each only when something it is built\nfrom changed since its last build. After a build it records next to the output (",[660,2572,2573],{},"apps\u002Fadmin\u002F.output\u002Fe2e-build.json",[660,2575,2576],{},"apps\u002Fapi\u002Fdist\u002Fe2e-build.json",") a hash of everything the build may read (the checkout's files, committed or not, but\ndocs, ",[660,2579,786],{},", tests, Markdown, CI, ",[660,2582,2583],{},"deploy\u002F"," and the root's ",[660,2586,2587],{},"scripts\u002F","; the admin's ",[660,2590,2591],{},".env","; the installed packages'\nlockfile; the environment variables a build reads: ",[660,2594,2595],{},"NUXT_*",[660,2597,2598],{},"NITRO_*",[660,2600,2601],{},"VITE_*",[660,2603,2604],{},"NODE_ENV",[660,2606,2607],{},"SHADE_DEV_MODULES","; Node's version and platform) and a hash of the output. It builds again when either differs, and\nwhenever it can't tell: no record, no git, or an output built since by other means (",[660,2610,2611],{},"pnpm build","). A wrong skip would\ntest old code, so it errs towards building. Unchanged, the check takes about a second instead of about 30 s of\nbuilding. Each build is also kept in the machine's temporary folder (",[660,2614,2615],{},"shade-e2e-builds",", by that hash, the three\nused last per app), so a new worktree with the same inputs copies it in about 3 s instead of building; a kept copy\nwhose files changed is dropped and built again.",[619,2618,2619,2622,2623,716,2626,2629,2630,2633,2634,2637,2638,2641,2642,2644],{},[942,2620,2621],{},"How many test files run at once."," Vitest runs about half the machine's cores' worth of test files at once\n(",[660,2624,2625],{},"maxWorkers",[660,2627,2628],{},"scripts\u002Ftest-workers.mjs","), in SHADE's own tests and the modules' (",[660,2631,2632],{},"moduleTestConfig","), so the test\ncontainers and a second session on the same machine keep room. ",[660,2635,2636],{},"SHADE_TEST_WORKERS"," sets the number instead\n(",[660,2639,2640],{},"SHADE_TEST_WORKERS=12 pnpm test","). The browser tests have their own setting, ",[660,2643,2003],{}," (3 servers by default).",[619,2646,2647,2650,2651,2653,2654,2656,2657,2660,2661,2664,2665,2668,2669,2671,2672,716,2675,2678,2679,2681,2682,2684,2685,2687,2688,2691,2692,2694,2695,2697,2698,2701,2702,2704,2705,2707],{},[942,2648,2649],{},"Each package's own tests."," Every package with a ",[660,2652,2327],{}," folder has a ",[660,2655,2011],{}," script\n(",[660,2658,2659],{},"scripts\u002Ftest-package.mjs","), which runs the root's Vitest configuration on that folder only\n(",[660,2662,2663],{},"SHADE_TEST_PACKAGE","), so pnpm's own filter picks what to run, with no other tool: ",[660,2666,2667],{},"pnpm --filter \"...[origin\u002Fmain]\" test"," runs the packages changed since ",[660,2670,2342],{}," and every package that depends on them. A change at the root (the\nVitest configuration, the test setup, ",[660,2673,2674],{},"tsconfig.base.json",[660,2676,2677],{},"pnpm-lock.yaml",", the scripts) reaches every package, and\nthe root's own ",[660,2680,2011],{}," is the full run, so ",[660,2683,2186],{}," runs ",[660,2686,2183],{}," alone then. The same holds for\n",[660,2689,2690],{},"typecheck",", which every package has. The browser tests' package (",[660,2693,786],{},") has no ",[660,2696,2011],{}," script (its Playwright run is\n",[660,2699,2700],{},"e2e","), so a filter never starts them. Measured on 7 November 2026 on a developer's machine, with the test containers\nrunning: ",[660,2703,2183],{}," takes about 54 s; a change to an adapter alone 3 s, to the API alone 25 s, and to\n",[660,2706,1095],{}," about 56 s, since core and the apps build on it and so most of the suite runs.",[619,2709,2710,2713,2714,2717,2718,2720,2721,2723,2724,2726,2727,2730,2731,1572,2734,716,2736,716,2738,2740,2741,2127,2744,2746,2747,1846,2750,2753,2754,2757,2758,2760,2761,2763,2764,2767,2768,2771],{},[942,2711,2712],{},"What CI runs",": in ",[660,2715,2716],{},".github\u002Fworkflows\u002Fci.yml",", a pull request gets lint, the\nsecurity checks and the typecheck and tests of ",[660,2719,2186],{}," against its base branch, and a push to ",[660,2722,2303],{},"\nlint, the full typecheck and ",[660,2725,2183],{},". ",[660,2728,2729],{},"full.yml"," runs weekly, by hand and before a release: the browser tests in three areas side by side (",[660,2732,2733],{},"E2E_AREA",[660,2735,871],{},[660,2737,2523],{},[660,2739,1218],{},"), the admin's in two shards (",[660,2742,2743],{},"E2E_SHARD=1\u002F2",[660,2745,2140],{}," passes to Playwright\nas ",[660,2748,2749],{},"--shard",[660,2751,2752],{},"scripts\u002Fe2e-shard.mjs","). The kit's ",[623,2755,2756],{"href":2373},"framework matrix"," runs weekly, by hand and before its releases.\nOne job builds the admin and the API with ",[660,2759,2569],{}," and hands them, with their records, to the browser\ntest jobs, whose ",[660,2762,2151],{}," then skips the build. A local run is never sharded unless you ask:\n",[660,2765,2766],{},"E2E_SHARD=2\u002F3 pnpm test:e2e:run",", or ",[660,2769,2770],{},"--shard=2\u002F3"," after the spec arguments.",[619,2773,2774,2775,2777],{},"What keeps ",[660,2776,2183],{}," fast:",[973,2779,2780,2794,2829],{},[939,2781,2782,2785,2786,2789,2790,2793],{},[942,2783,2784],{},"Passwords"," are hashed at N=2^12 in the tests instead of 2^17 (",[660,2787,2788],{},"scripts\u002Ftest-setup.ts",", a setup file of the unit and\ndb projects), so each sign-in takes milliseconds instead of half a second and 128 MiB. Stored hashes carry their\nown N; ",[660,2791,2792],{},"crypto.test.ts"," checks the production cost. The setter is exported from no entry point.",[939,2795,2796,763,2799,2802,2803,990,2805,2808,2809,2812,2813,2816,2817,2820,2821,2824,2825,2828],{},[942,2797,2798],{},"The route sweep",[660,2800,2801],{},"access.test.ts",") runs in four parts, ",[660,2804,2801],{},[660,2806,2807],{},"access-2.test.ts"," to\n",[660,2810,2811],{},"access-4.test.ts",", each on a database of its own, so they run side by side (",[660,2814,2815],{},"apps\u002Fapi\u002Ftest\u002Fsweep\u002Faccess-sweep.ts",").\nThe parts are counted from those files (",[660,2818,2819],{},"access-parts.ts","): another ",[660,2822,2823],{},"access-5.test.ts"," with\n",[660,2826,2827],{},"accessSweep(import.meta.url)"," splits the routes over five; a gap in the numbers fails.\nThe parts may run in any order: an answer must never depend on another route having run first.",[939,2830,2831,2834,2835,2838],{},[942,2832,2833],{},"What tests write"," goes under ",[660,2836,2837],{},".data\u002F",", which test discovery skips.",[628,2840,2842],{"id":2841},"finding-things","Finding things",[973,2844,2845,2853,2877,2892,2903,2920],{},[939,2846,2847,690,2850,2852],{},[942,2848,2849],{},"A URL",[660,2851,1071],{},"; search for its path.",[939,2854,2855,2858,2859,2861,2862,2865,2866,2869,2870,2873,2874,710],{},[942,2856,2857],{},"A rule"," (\"who may publish?\") → the service's first line (",[660,2860,997],{},"), and the module's own declaration of its\nactions and who holds them by default, ",[660,2863,2864],{},"shared\u002Fpermissions.ts"," in one of its parts (",[660,2867,2868],{},"shade\u002Fexports\u002Fpermissions.ts","\nlists them); collections' actions are in their definitions, and ",[660,2871,2872],{},"decide"," is in ",[660,2875,2876],{},"shade\u002Fkernel\u002Fpermissions.ts",[939,2878,2879,690,2882,2885,2886,716,2889,1045],{},[942,2880,2881],{},"A table",[660,2883,2884],{},"shade\u002Ffeatures\u002F\u003Cname>\u002Fserver\u002F*.sql.ts","; collections' tables are generated\n(",[660,2887,2888],{},"collections.generated.sql.ts",[660,2890,2891],{},"pnpm db:collections",[939,2893,2894,690,2897,2899,2900,710],{},[942,2895,2896],{},"A screen",[660,2898,1767],{},"; its texts are in that feature's ",[660,2901,2902],{},"admin\u002Flocales\u002F",[939,2904,2905,2908,2909,1846,2912,690,2915,1568,2918,710],{},[942,2906,2907],{},"A starter component"," → the website module's ",[660,2910,2911],{},"server\u002Fstarters.ts",[942,2913,2914],{},"how a page renders",[660,2916,2917],{},"packages\u002Frender\u002F",[660,2919,766],{},[939,2921,2922,690,2925,2927,2928,710],{},[942,2923,2924],{},"Why it is like this",[623,2926,603],{"href":604},", then its record in ",[660,2929,2930],{},"docs\u002Fdecisions\u002F",{"title":2932,"searchDepth":2933,"depth":2933,"links":2934},"",2,[2935,2936,2937,2938,2939,2940,2941,2942,2943],{"id":630,"depth":2933,"text":631},{"id":823,"depth":2933,"text":824},{"id":933,"depth":2933,"text":934},{"id":1102,"depth":2933,"text":1103},{"id":1493,"depth":2933,"text":1494},{"id":1632,"depth":2933,"text":1633},{"id":1744,"depth":2933,"text":1745},{"id":1820,"depth":2933,"text":1821},{"id":2841,"depth":2933,"text":2842},"md",null,{},true,{"title":569,"description":2932},"TbQG_AAjJnhlT2giscnmn81U2--Lu22WcgN1AmZ9PKY",[2951,2952],{"title":559,"path":560,"stem":561,"description":2932,"children":-1},{"title":573,"path":574,"stem":575,"description":2932,"children":-1},1796500153613]