> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zapbip.com/llms.txt
> Use this file to discover all available pages before exploring further.

# تشغيل zapbip محليًا

> ابدأ نسختك الخاصة من zapbip على حاسوبك أو في Docker دون حساب Meta.

محليًا يشغّل zapbip نفس Worker الإنتاج. وتجيب بيئة تجريبية للتطوير بدلًا من WhatsApp، بصفتها هاتف المالك، فلا تحتاج إلى حساب Meta ولا يصل شيء إلى هاتف حقيقي.

## ما تحتاج إليه

* Node 24 أو أحدث وpnpm
* Git
* أو Docker مع Compose لخيار Docker

## على حاسوبك

احصل على الشيفرة وثبّتها:

```bash theme={null}
git clone https://github.com/dhyegocalota/zapbip.git
cd zapbip
pnpm install
```

أنشئ `apps/api/.dev.vars` بأربعة أسرار عشوائية، ثم جهّز قاعدة البيانات المحلية:

```bash theme={null}
printf 'MEDIA_LINK_SIGNING_KEY=%s\nUPLOAD_LINK_SIGNING_KEY=%s\nNUMBER_REGISTRY_KEY=%s\nMETA_APP_SECRET=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" "$(openssl rand -base64 32)" "$(openssl rand -hex 16)" > apps/api/.dev.vars
pnpm migrate:development
```

شغّل الـ Worker وتحقق منه:

```bash theme={null}
pnpm --filter @zapbip/api dev
curl http://localhost:8787/health
```

أنشئ مالكًا ووكيلًا. يطبع الأمر سر الوكيل مرة واحدة فقط:

```bash theme={null}
pnpm --silent --filter @zapbip/api dev:seed --phone <digits> --agents alpha
```

اربط الذكاء الاصطناعي لديك بالسر الذي طُبع:

```bash theme={null}
claude mcp add --transport http alpha http://localhost:8787/c/<alpha-secret>/mcp
```

يمر [دليل البيئة المحلية](https://github.com/dhyegocalota/zapbip/blob/main/docs/contributing/local-stack.md) بمحادثة كاملة، بالإنجليزية.

## Docker

أمر واحد يبني الصورة ويشغّل الـ Worker على المنفذ 8787:

```bash theme={null}
git clone https://github.com/dhyegocalota/zapbip.git
cd zapbip
docker compose up --build
```

تعيش قاعدة البيانات والملفات والأسرار المولَّدة في وحدة التخزين `zapbip-data`، فتبقى بعد إعادة التشغيل. اضبط `MEDIA_LINK_SIGNING_KEY` أو `UPLOAD_LINK_SIGNING_KEY` أو `NUMBER_REGISTRY_KEY` أو `META_APP_SECRET` في بيئتك لتختارها بنفسك.

أنشئ مالكًا ووكيلًا داخل الحاوية:

```bash theme={null}
docker compose exec zapbip pnpm --silent dev:seed --phone <digits> --agents alpha
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.