تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
على الرغم من أنّك لا تحتاج إلى مشروع على Firebase لبدء العمل في Firebase Studio،
إلا أنّ ربط مشروع ضروري لاستخدام منتجات Firebase. في مراحل معيّنة من عملية التطوير، قد تنشئ Firebase Studio مشروعًا لك تلقائيًا، أو يمكنك اختيار ربط مشروع يدويًا. يوضّح هذا الدليل الغرض من مشروع Firebase وكيفية ربط مشروع بمساحة عملك في Firebase Studio.
التعرّف على مشاريع Firebase
يمكنك اعتبار مشروع Firebase بمثابة حاوية لجميع خدمات الخلفية الخاصة بتطبيقك، بما في ذلك مصادقة المستخدمين وتخزين البيانات والاستضافة والإحصاءات وغير ذلك. من خلال ربط مساحة عملك (Firebase Studio) بمشروع على Firebase، يمكنك دمج مجموعة من منتجات Firebase في تطبيقك.
يمكن أن يتضمّن مشروع Firebase تطبيقًا واحدًا أو أكثر من تطبيقات Firebase المسجّلة فيه (على سبيل المثال، الإصداران المجاني والمدفوع من التطبيق)، ولكن يُرجى مراعاة ما يلي:
تتشارك جميع تطبيقات Firebase المسجّلة في مشروع Firebase نفسه في جميع الموارد والخدمات الموفّرة لهذا المشروع، كما يمكنها الوصول إليها.
ننصحك بربط مساحات عمل Firebase Studio مختلفة بمشاريع Firebase منفصلة. ويمنع ذلك مساحات عمل متعددة من مشاركة البيانات والموارد نفسها في الخلفية (وربما الكتابة فوقها).
بعد ربط مساحة عملك بمشروع على Firebase، انتقِل إلى وحدة تحكّم Firebase لتنفيذ مهام إدارية ومهام إعداد. ويشمل ذلك عرض قواعد الأمان وإدارة حسابات المستخدمين وعرض تقارير مفصّلة عن الأعطال وتعديل البيانات المخزّنة مباشرةً ومراجعة نتائج اختبارات أ/ب.
ربط تطبيق Firebase Studio بمشروع على Firebase
لاستخدام خدمات Firebase في تطبيقك، عليك ربط تطبيقك بمشروع على Firebase. على سبيل المثال، إذا كنت تريد استخدام Firebase Authentication، عليك الربط بمشروع على Firebase حتى تتمكّن من إنشاء حسابات المستخدمين وإدارتها. في نقاط معيّنة أثناء عملية التطوير، تنشئ Firebase Studio مشروعًا على Firebase نيابةً عنك، أو يمكنك اختيار إجراء ذلك يدويًا.
الربط تلقائيًا بمشروع على Firebase
عند استخدام App Prototyping agent، يوفّر Firebase Studio مشروعًا على Firebase نيابةً عنك عند إجراء ما يلي:
إنشاء مفتاح Gemini API تلقائيًا
طلب ربط تطبيقك بمشروع على Firebase
طلب المساعدة في ربط تطبيقك بخدمات Firebase، مثل Cloud Firestore
أو Firebase Authentication
انقر على الزر نشر وأعِدّ Firebase App Hosting.
عند استخدام المحادثة التفاعلية أو Gemini CLI، يمكن Gemini استخدام أوامر سطر الأوامر أو خادم Firebase MCP للاتصال بمشروع Firebase عند إجراء ما يلي:
طلب ربط تطبيقك بمشروع على Firebase
طلب المساعدة في ربط تطبيقك بخدمات Firebase، مثل Cloud Firestore
أو Firebase Authentication
الربط بمشروع على Firebase يدويًا
لربط تطبيق Firebase Studio يدويًا بمشروع على Firebase، اتّبِع الخطوات التالية:
firebase use <your project ID>
استبدِل <your-project-ID> برقم تعريف المشروع الذي دوّنته سابقًا.
تغيير مشروع Firebase المرتبط بتطبيقك
لتغيير مشروع Firebase المرتبط بمساحة عملك (Firebase Studio)، اتّبِع التعليمات الواردة في الربط يدويًا بمشروع على Firebase باستخدام معرّف المشروع الجديد.
تحديد مشروع Firebase المرتبط بتطبيقك
للتأكّد ممّا إذا كان مشروع Firebase مرتبطًا حاليًا، اطّلِع على أعلى مساحة عملك Firebase Studio. يظهر معرّف المشروع المرتبط، إذا كان متوفّرًا،
بجانب اسم مساحة العمل. يمكنك النقر على رقم تعريف المشروع لفتح هذا المشروع مباشرةً في وحدة تحكّم Firebase.
تاريخ التعديل الأخير: 2025-09-09 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-09-09 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["While you don't need a Firebase project to start working in Firebase Studio,\nconnecting one is essential for using Firebase products. At certain points in\nyour development process, Firebase Studio might automatically create a\nproject for you, or you can choose to connect one manually. This guide explains\nthe purpose a Firebase project serves and how to connect one to your\nworkspace in Firebase Studio.\n\nUnderstand Firebase projects\n\nThink of a Firebase project as a container for all of your app's backend\nservices, including user authentication, data storage, hosting, analytics, and\nmore. By connecting your Firebase Studio workspace to a Firebase project,\nyou can integrate a\n[suite of Firebase products](https://firebase.google.com/products) into your\napp.\n\nA Firebase project can have one or more Firebase Apps registered to it (for\nexample, both the free and paid versions of an app), but keep in mind the\nfollowing:\n\n- All Firebase Apps registered to the same Firebase project share and have access to all the same resources and services provisioned for that project.\n- If Firebase Studio [automatically creates a Firebase project for you](#connect-auto), it creates a new project and links it to your Firebase Studio workspace.\n- If you [duplicate a Firebase Studio workspace](/docs/studio/get-started-workspace#duplicate-workspace) that's linked to a Firebase project, the duplicated workspace is linked to the same project.\n\nConsider connecting different Firebase Studio workspaces to separate\nFirebase projects. This prevents multiple workspaces from sharing (and\npotentially overwriting) the same backend data and resources.\n\nAfter connecting your workspace to a Firebase project, visit the\n[Firebase console](https://console.firebase.google.com/) for\nadministrative and configuration tasks. This includes viewing security rules,\nmanaging user accounts, viewing detailed crash reports, editing stored data\ndirectly, and reviewing A/B test results.\n\nConnect a Firebase Studio app to a Firebase project\n\nIn order to use Firebase services in your app, you'll need to connect your app\nto a Firebase project. For example, if you want to use Firebase Authentication, you'll\nneed to connect to a Firebase project so that you can\ncreate and manage user accounts. At certain points during the development\nprocess, Firebase Studio creates a Firebase project for you, or you can\nchoose to do so manually.\n\nAutomatically connect to a Firebase project\n\nWhen using the App Prototyping agent, Firebase Studio provisions a\nFirebase project on your behalf when you:\n\n- Auto-generate a Gemini API key\n- Ask to connect your app to a Firebase project\n- Ask for help connecting your app to Firebase services, such as Cloud Firestore or Firebase Authentication\n- Click the **Publish** button and set up Firebase App Hosting\n\nWhen using interactive chat or Gemini CLI,\nGemini can use terminal commands or the\n[Firebase MCP server](/docs/cli/mcp-server) to connect to a Firebase project\nwhen you:\n\n- Ask to connect your app to a Firebase project\n- Ask for help connecting your app to Firebase services, such as Cloud Firestore or Firebase Authentication\n\nManually connect to a Firebase project\n\nTo manually connect your Firebase Studio app to a Firebase project:\n\n1. In the [Firebase console](https://console.firebase.google.com/)\n create a new project or open an existing project:\n\n - **Create a new project** : Click **Create a new Firebase project** and follow the instructions to create a new project.\n - **Open an existing project**: Click the project you want to use.\n2. **Note your project ID.** In the Firebase console, click\n settings \\\u003e [**Project\n settings**](//console.firebase.google.com/project/_/settings/general/). The\n project ID is displayed in the top pane.\n\n3. **Open your app in Firebase Studio.** If you're using\n the App Prototyping agent in Prototyper view, click **Switch to Code** to open Code view.\n\n4. **Connect your Firebase project.** In the terminal (`Shift+Ctrl+C`), run the\n following commands:\n\n 1. `touch firebase.json` This ensures a Firebase configuration file exists in your directory.\n 2. `firebase login --reauth` Follow the prompts to authorize your account.\n 3. `firebase use \u003cyour project ID\u003e` Replace `\u003cyour-project-ID\u003e` with the project ID you noted earlier.\n\nChange the Firebase project connected to your app\n\nTo change the Firebase project associated with your Firebase Studio\nworkspace, follow the instructions in\n[Manually connect to a Firebase project](#connect-manual) using the new project\nID.\n| **Important:** Any Firebase services you set up for the original project won't transfer over. You must set them up again in the new project.\n\nIdentify the Firebase project connected to your app\n\nTo confirm if a Firebase project is already connected, check the top of your\nFirebase Studio workspace. The connected project ID, if one exists, is shown\nnext to the name of your workspace. You can click the project ID to open that\nproject directly in the Firebase console.\n\nNext steps\n\n- [Understand Firebase projects](/docs/projects/learn-more)\n- [Integrate with Google and Firebase services](/docs/studio/google-integrations)\n- [Monitor and protect web apps](/docs/studio/monitor)"]]