Technical Manual sections
Reference āŗ Technical Manual āŗ Where things are
This is a map of the Kitten repository. Use it to find the code for a subsystem, then read the section of this manual that covers it. For what Kitten writes where on disk, see Data on disk.
| Path | What it is |
|---|---|
| install, build, package, deploy | Scripts that install Kitten, build the distribution in dist/, archive it in packages/, and publish a signed package to the distribution server. |
| build-templates/ | Files the build copies into the distribution: the launcher (kitten), the Kitten Process Manager, the distributionās package.json, the Prism theme, and the runtime checksums. |
| src/entry/ | The three entry points the build bundles: main.ts (the Kitten bundle), loader.js (the loader bundle), and update-guard.ts (the update guard). |
| src/cli/ | The command-line interface, with one file per command in commands/ (and the files that kitten init copies in commands/init/). |
| src/Server.ts | The Kitten Server. |
| src/middleware/ | Polka middleware, added in the order in index.ts. |
| src/Routes.ts, src/Files.ts, src/routes/, src/lib/routeFiles.ts, src/lib/routeTable.ts | Routes from files, the route classes, and the order and collisions of route patterns. |
| src/routes/lib/routeHandler.ts, src/lib/router.ts, src/lib/body.ts | The handler Kitten registers for each route, the router object that main.script.js receives, and request body parsing. |
| src/lib/html.ts, markup.ts, markdown.ts, markdownModule.ts, loader.ts | Rendering and module loading. |
| src/lib/KittenComponent.ts, KittenPage.ts | Stateful components and live pages. |
| src/lib/globals.ts | Builds the global kitten object. (src/types/globals.d.ts declares it.) |
| src/lib/paths.ts | The paths of Kittenās own files on disk. (Globals.initialise() in src/lib/globals.ts adds the paths of the app being served.) |
| src/AppDatabase.ts, src/InternalDatabase.ts, src/GlobalInternalDatabase.ts, src/migrations/ | Databases and data migrations. |
| src/Sessions.ts, src/lib/storeOnUse.ts, src/lib/signIn.ts, src/lib/signInChallenge.ts, crypto.ts, keyStore.ts, KittenMoji.ts | Sessions, sign-in, and cryptography. |
| src/Uploads.ts, src/lib/uploadLimits.ts, src/lib/serveFile.ts | Uploads. |
| src/ServerError.ts, src/lib/log.ts | Error pages and sectioned logs. |
| src/REPL.ts | The interactive shell. |
| src/lib/deploy.ts, src/AppRepository.ts | Deployment as a systemd service, and the deployed appās git working copy. |
| src/AutomaticUpdates.ts, src/lib/KittenPackage.ts, src/lib/applyUpdate.ts, and the src/lib/update*.ts files | Updates. |
| src/lib/components/ | Built-in components (copyButton, toast, and CopyButton). |
| lib/ | Client-side libraries that the build copies or bundles into /š±/library/: our fork of htmx 2 and its WebSocket extension, our copy of the idiomorph htmx extension, kitten-1.js, kitten-alpine-1.js, and kitten-hot-reload-1.js. |
| src/lib/check/ | The kitten check commandās project reader, probe engine, report, fixes, and one module per check in checks/. |
| web/ | Kittenās internal web app (the /š±/ and /š/ routes). |
| src/types/, sync-types.js | Kittenās types, and the script that syncs them to the @small-web/kitten-types package. |
| update-version.js, sign-package.js, generate-signing-key.js, contributors.js | Build and release helpers. |
| tests/ | Unit, regression, and end-to-end tests, a start-up benchmark, and the automatic updates rehearsal. |
| examples/ | Example apps. The end-to-end suite loads the ones listed in tests/end-to-end/examples.spec.ts. |