# Digging Deeper
Welcome to Digging Deeper — the advanced topics for customising and extending Krayin once you've built your own package.
This section assumes you're comfortable with Krayin package development. If you haven't built a package yet, start with Package Development — Getting Started first.
# What's in this section
- AI-Powered Lead Generation — turn uploaded documents into leads via OpenRouter.
- Best Security Practices — harden a production Krayin server.
- Data Transfer — bulk-import leads, persons, and products from CSV or XLSX.
- Email Inbound Parse — turn inbound emails into CRM entries via SendGrid Inbound Parse or Webklex IMAP.
- Events Listeners — hook into the lifecycle events Krayin fires on every write.
- Events and Campaigns — schedule recurring email campaigns from CRM events.
- Helpers — the global
core()helper functions Krayin ships. - Override a Layout — swap or extend a core controller, model, blade view, or inject snippets via
view_render_event.
# Quick links
| You want to... | Go to |
|---|---|
| Hook custom logic into a CRM write | Events Listeners |
| Send drip emails from CRM events | Events and Campaigns |
| Customise a core admin screen | Override a Layout |
| Ship a feature that imports CSVs | Data Transfer |
| Receive inbound emails into the CRM | Email Inbound Parse |
| Harden production before launch | Best Security Practices |
| Use AI to extract leads from documents | AI-Powered Lead Generation |
Use core()->formatDate(...) and friends | Helpers |
# When to dig deeper
Most package work doesn't need anything from this section — Package Development covers the day-to-day surface. Reach for these pages when:
- You need to react to something happening elsewhere in the CRM → Events Listeners.
- You want to change an existing core screen instead of building a new one → Override a Layout.
- Your package has a bulk operation users will run on tens of thousands of rows → Data Transfer.
- You're putting Krayin into production → Best Security Practices.