Best practices
Habits that keep Alloy projects healthy as they grow from a first prompt to a product people use.
Prompting
- Start with a complete first prompt; fix with small, single-purpose follow-ups.
- Review every version in Preview and Live before the next prompt.
- Check all three languages, especially Hebrew right-to-left, before you publish.
Code and structure
- Keep the generated structure: one folder per component, types in
.types.ts, constants in.consts.ts. - Use path aliases (
@components,@pages) instead of../../when you add files by hand. - Add UI text to the translation files, not into components.
- Prefer Bear components over custom markup so theme and accessibility stay consistent.
Git
- Link Git early. Every version becomes a reviewable pull request with a preview URL.
- Merge or close Alloy pull requests regularly; do not let many pile up.
- After editing outside Alloy, push to
mainand use Import changes from main before the next prompt. - Protect
mainon your Git host and require the preview to build.
Security
- Never paste passwords, API keys or customer data into prompts.
- Keep secrets in
.envlocally and in your host settings in production. - Keep repositories private unless you mean to open-source the project.