# AfterPack quickstart: मिनटों में एक build obfuscate करें

अपना framework चुनें, एक dev dependency install करें, build चलाएँ और Protection Map खोलें।

Source: https://www.afterpack.dev/hi/docs/quickstart

**एक agent से शुरू करें** (Claude Code, Codex, Cursor या Copilot में paste करें):

```text
Add AfterPack to this project: read https://www.afterpack.dev/llms.txt, follow the quickstart for my framework, then run a production build and show me the Protection Map.
```

## अपना framework चुनें

*(interactive framework picker — pick a framework below or see the web page)*

## एक build डिफ़ॉल्ट रूप से क्या करती है

- **`light` [preset](https://www.afterpack.dev/hi/docs/config#preset)**: [complexity](https://www.afterpack.dev/hi/docs/config#complexity) 5। String literals [encode](https://www.afterpack.dev/hi/docs/config#strings-encode) किए जाते हैं, identifiers rename किए जाते हैं और syntax दोबारा लिखा जाता है, और कोई संरचनात्मक layer नहीं जोड़ी जाती। जैसे-जैसे project को अधिक सुरक्षा चाहिए, preset बढ़ाएँ; देखें [Presets](https://www.afterpack.dev/hi/docs/presets)।
- **हर build पर एक नया random [seed](https://www.afterpack.dev/hi/docs/config#seed)**, इसलिए एक ही source की दो builds संरचना में अलग निकलती हैं। [एक बार build करें और वही bytes promote करें](https://www.afterpack.dev/hi/docs/builds); `seed: "git"` केवल तब pin करें जब आपको reproducible output चाहिए।
- **Dev builds अछूती रहती हैं।** Plugin केवल [production](https://www.afterpack.dev/hi/docs/config#build-mode) build पर काम करता है।
- **यह fail closed है।** जिस फ़ाइल को engine obfuscate नहीं कर सकता, वह build को विफल कर देती है और उस फ़ाइल का नाम बताती है। देखें [Exit codes](https://www.afterpack.dev/hi/docs/diagnostics#exit-codes)।

Plugin को installed रखते हुए एक run के लिए engine को छोड़ने के लिए, [`build.autorun`](https://www.afterpack.dev/hi/docs/config#build-autorun) को `false` पर सेट करें।

## परिणाम जाँचें

[Protection Map](https://www.afterpack.dev/hi/docs/protection-map) आपका मूल source है, जिसमें हर token इस आधार पर रंगा गया है कि उस पर कितना transformation हुआ। जब bundler ने source map emit किया हो, तो CI के बाहर यह `.afterpack/protectionMap.html` में लिखा जाता है; हर framework guide दिखाती है कि इसे कैसे चालू करें। इस रिपोर्ट में आपका पूरा source होता है। इसे कभी commit या serve न करें। `.afterpack/` की अपनी `.gitignore` होती है, इसलिए git उसे ignore करता है।

*(live Protection Map demo embed — see https://www.afterpack.dev/protection-map-demo)*

अपनी पहली build से पहले एक उदाहरण देखने के लिए [लाइव demo रिपोर्ट](https://www.afterpack.dev/protection-map-demo) खोलें।

## विशेष कोड को और मज़बूती से protect करें

Global obfuscation पूरे bundle को कवर करती है। किसी एक region को और आगे ले जाने के लिए, या उसे अछूता छोड़ने के लिए, उसे एक [directive](https://www.afterpack.dev/hi/docs/directives) से चिह्नित करें:

```ts
/* @afterpack preset=hard */
function checkLicense(token: string) {
  return verify(token);
}
/* @afterpack end */

const apiKey = /* @afterpack preset=extreme */ "YOUR_SECRET";
```

Directives [Pro](https://www.afterpack.dev/hi/docs/tiers) builds पर प्रभावी होते हैं; grammar और हर उस key के लिए जो सेट की जा सकती है, [Directives](https://www.afterpack.dev/hi/docs/directives) reference है।

## आगे

- [AfterPack कैसे काम करता है](https://www.afterpack.dev/hi/docs/concepts): एक attacker क्या recover कर सकता है और क्या नहीं।
- [Configuration](https://www.afterpack.dev/hi/docs/config): हर विकल्प और उसे कहाँ सेट करें।
- [Best practices](https://www.afterpack.dev/hi/docs/best-practices): क्या चिह्नित करें, क्या अछूता छोड़ें, और CI।
