Generated files
Every file listed here is emitted by tinycld/scripts/generate.ts (and its gen-*.ts helpers) and is gitignored. The workspace-root pnpm install runs the generator via postinstall; pnpm run dev (and pnpm run export:web) from tinycld/ run it first too - you rarely run it directly. It rebuilds these from tinycld.packages.ts (the present-member enumeration) and each present feature’s manifest.
The generator is a thin step. Instead of a file per concern, it emits one typed tinycld.config.ts, and the runtime (helpers in @tinycld/core/lib/packages/) derives the package stores, registry, sidebars/providers/settings, and seeds from it.
tinycld/tinycld.config.ts - installed-package source of truth
A typed array built with definePackageEntry<…>(), one entry per present feature. Each entry carries the manifest plus references to the package’s registerCollections, sidebar, provider, settings, and sidebarContributions. It also exports MergedPackageSchema, a literal intersection of every present package’s {PascalSlug}Schema type, which @tinycld/core/lib/pocketbase intersects with core’s Schema so useStore('packageCollection') is strongly typed end-to-end. Runtime helpers (derive-stores.ts, static-registry.ts, derive-components.ts, derive-seeds.ts) read this array — there is no separate package-collections.ts / package-registry.ts / package-sidebars.ts / package-providers.ts / package-settings.ts / package-sidebar-contributions.ts / package-seeds.ts. The derive-components.ts helper exports packageSidebars, packageProviders, packageSettings, and packageSidebarContributions (target slug → slot name → sorted contributions, consumed by <SidebarSlot> — see Sidebar slots).
tinycld/tinycld.seeds.ts - Node-only seed list
A list of { manifest: { slug, dependencies }, seed } entries for every present feature that declares seed. Kept separate from tinycld.config.ts because seed modules use Node APIs Hermes can’t bundle; consumed by the dev seeder.
tinycld/lib/generated/tinycld-config.ts - re-export shim
A small re-export of tinycld/tinycld.config.ts so @tinycld/core can import @tinycld/app-generated/tinycld-config (and MergedPackageSchema) without a hard compile-time dependency on the app.
tinycld/lib/generated/package-help.ts
Parsed help-topic frontmatter and bodies for every present feature’s (and core’s) help/ directory. Consumed by the in-app help hub, the per-package help screen, and the help drawer.
tinycld/lib/generated/uniwind-sources.css
One @source "<real-path>"; line per present member (core + features), imported by global.css. Tells Tailwind/Uniwind to scan class names used inside members (whose directories are otherwise gitignored).
tinycld/app/a/[orgSlug]/<slug>/** - org-scoped route re-exports
One file per source file in each present feature’s routes.directory. Each is a thin re-export:
export { default } from '@tinycld/mail/screens/index'
Nested folders and layout files are preserved. Expo Router treats them as normal routes. The app shell’s tinycld/app/a/[orgSlug]/_layout.tsx and settings/** are app-owned (force-added to git); the generator only cleans/rebuilds each present feature’s own <slug>/ subtree.
tinycld/app/p/<slug>/<publicPath> - public route re-exports
One file per source file in each present feature’s publicRoutes.directory, mounted under tinycld/app/p/<slug>/. drive/public-screens/share/[token].tsx becomes tinycld/app/p/drive/share/[token].tsx, served at /p/drive/share/<token>. A hand-written tinycld/app/p/_layout.tsx (bare <Slot />, no auth gate) wraps the whole /p/ tree.
tinycld/server/pb_migrations/ - migration symlinks
One symlink per file in each present feature’s pb-migrations/ directory, plus core’s own migrations from tinycld/core/server/pb_migrations/. PocketBase picks them up from this directory on boot; the generator wipes and rebuilds the symlink set each run.
tinycld/server/pb_hooks/ - JS hook symlinks
One symlink per file in each present feature’s pb-hooks/ directory (for features that declare hooks: { directory }). PocketBase loads .pb.js files from here automatically.
tinycld/server/package_extensions.go
A generated Go file whose registerPackageExtensions(app *pocketbase.PocketBase) calls each present feature server’s Register(app). Invoked by the app shell’s main.go (RegisterExtras: registerPackageExtensions). Always emitted; the function body is empty when no feature ships a server.
tinycld/server/go.work
A Go workspace file listing the app, core, and each present feature’s server module by its on-disk path (resolved through the node_modules/@tinycld/* symlinks). Written only when at least one present feature declares server; removed otherwise. The app’s go.mod keeps its hand-written replace tinycld.org/core => ../core/server; feature modules need no replace because go.work resolves their locations.
tinycld/server/bundled-packages.json
A JSON array listing every present feature’s {name, slug, version, icon, description, hasServer, navOrder}. Core’s Go server seeds its pkg_registry collection from this file at boot.
Regenerating
cd ~/code/tinycld/tinycld
pnpm run packages:generate
Running the generator is idempotent. It wipes and rebuilds the migration/hook symlink dirs, removes each present feature’s own route subtree before regenerating it, and overwrites the config and lib/generated/* files. Bringing a member in or removing one is just pnpm install at the workspace root.