mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-18 07:19:35 +00:00
- Document verify-launch, py/py-3, E2E, and port 3000 troubleshooting - Add scripts/kill-port-3000.ps1 for Playwright webServer conflicts - Increase Playwright webServer timeout to 180s - Extend verify_frontend_openapi_paths for template literals; empty allowlist - Commit Next routes.d.ts reference in next-env.d.ts after build Made-with: Cursor
3.1 KiB
3.1 KiB
Dealix — قائمة جاهزية الإطلاق (إنتاج / staging)
1. الكود والاختبارات
- اختبارات الباكند: من
backend/شغّلpython -m pytest tests -q(مثل CI على Linux) أو على ويندوز إذا الأمرpythonغير موجود:py -3 -m pytest tests -q. - بوابة موحّدة (موصى به): من جذر
salesflow-saas:.\verify-launch.ps1— يشغّل pytest + مزامنة التسويق + lint + build. cd frontend && npm run lint && npm run build(أو تُغطّى بواسطةverify-launch.ps1).- من جذر
salesflow-saas:node scripts/sync-marketing-to-public.cjs(يُشغَّل أيضاً تلقائياً قبلnpm run build). - E2E (Playwright): بعد
npm run build، حرّر المنفذ 3000 ثم منfrontend/:CI=true npm run test:e2e. إن ظهر «port already in use» أو timeout علىwebServer: من جذرsalesflow-saasشغّل.\scripts\kill-port-3000.ps1ثم أعد المحاولة. - (اختياري) من جذر
salesflow-saas:py -3 scripts/verify_frontend_openapi_paths.py(أوpython3 scripts/...) — يطابق مسارات/api/v1في الفرونت مع OpenAPI (حرفيًا وفي قوالب مثل`${base}/api/v1/...`).
2. الخادم (API)
- تشغيل من أحدث كود في المستودع:
cd backend && python -m uvicorn app.main:app --host 0.0.0.0 --port 8000
(ويندوز:py -3 -m uvicorn app.main:app --host 0.0.0.0 --port 8000) - إذا ظهر 404 على
/api/v1/marketing/hubأو/api/v1/strategy/summaryفالعملية غالباً قديمة — أعد تشغيلuvicornبعدgit pull. - اختبار HTTP (من مجلد
backend/):
py -3 scripts/full_stack_launch_test.py --http-only --soft-ready
أو من جذرsalesflow-saas:
.\scripts\grand_launch_verify.ps1 -HttpCheck -SoftReady
معDEALIX_BASE_URLإذا لم يكن الـ API علىhttp://127.0.0.1:8000.
3. الواجهة (Next.js)
- ضبط
NEXT_PUBLIC_API_URLلنقطة نهاية الـ API العامة (انظرfrontend/.env.example). - التأكد من أن الـ backend يضمّن نطاق الواجهة في CORS (
FRONTEND_URL/main.py).
4. الأسرار والبيئة
- نسخ
.envمن.env.example(جذر المشروع أوbackend/.env) وملء المفاتيح الحرجة. - ملف الربط الشامل: راجع
docs/INTEGRATION_MASTER_AR.mdثم انسخbackend/.env.phase2.exampleإلىbackend/.envوعبّئ كل الفحوص الإلزامية (أمان، قاعدة، ذكاء، بريد، Salesforce، واتساب حي، Stripe + webhook، Twilio، توقيع).
5. ما بعد الإطلاق
- مراقبة
/api/v1/healthو/api/v1/ready. - مراجعة
go-live-gateعند التكاملات الحقيقية (قد يعيد 403 حتى اكتمال التهيئة — متوقع).
سكربت موحّد (PowerShell): verify-launch.ps1 -HttpCheck -SoftReady — مع -BaseUrl إن لزم.