# Conventions Where Elements differs from what you would guess from the outside, and the conventions its own source follows. Read this once before you write a first page and the rest of the manual reads faster. **Project structure** - Routes are declared in `index.ts`, not file-based. Folder names under `app/pages/` are labels, not URLs. - A scaffolded page has `index.ts` (route only) and `template.html` (template, event handlers, inline rpc). As a page grows, move its `@rpc` functions and shared interfaces into a hand-authored `services.ts` sibling. An `@rpc` never belongs in a page's `index.ts`. - Cross-page services and templates live under `app/shared/`. - Import app source with the `#app/...` map (`#app/pages/...`, `#app/shared/...`), never `../../`. `#config` imports config. - Import a page's template extensionless: `import html from "./template"`. - Use kebab-case for directories and filenames. **Html templates** - TypeScript goes outside template declarations or inside `{}` expressions. There are no `