تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
توفّر Firebase Studio بيئة تطوير تعاونية مستندة إلى السحابة الإلكترونية تعمل على تبسيط عملية إنشاء التطبيقات باستخدام مجموعة شاملة من أُطر العمل والمكتبات.
بعد إعداد مساحة عمل Firebase Studio، يمكنك الوصول إلى بيئة تطوير مرنة ومتكاملة الميزات ومشاركتها، إذ يمكن الوصول إلى مساحات عمل Firebase Studio من أي جهاز، كما توفّر أدوات مدمجة لتسهيل عملية التطوير لك ولفريقك.
إنشاء مساحة عمل
مساحة العمل في Firebase Studio هي بيئة تطوير
تتضمّن كل ما تحتاج إليه لتطوير تطبيقك. ويحتوي على الرمز البرمجي وأداة تعديل الرموز (مع مكوّنات إضافية ذات صلة بمشروعك) وسلاسل الأدوات التي تتيح تطوير التطبيقات. يشبه ذلك إنشاء مشروع جديد في بيئة التطوير المحلية على جهاز الكمبيوتر، ولكن مع توفّر جهاز كمبيوتر كامل ونظام تشغيل معدّين مسبقًا ومخصّصين حصريًا لإنشاء تطبيقك، وتشغيله على المتصفح في السحابة الإلكترونية، ويمكنك الوصول إليه أينما كنت.
تم تحسين مساحات عمل Firebase Studio لتضمين قاعدة رموز برمجية واحدة،
ما يتيح لك إبقاء البيئات والتبعيات على مستوى النظام للتطبيقات المختلفة
معزولة عن بعضها البعض. يمكنك إنشاء مساحات عمل متعددة لاستخدامها مع تطبيقات وأُطر مختلفة.
يؤدي تكرار مساحة عمل Firebase Studio إلى إنشاء نسخة من مشروعك تحتوي على كل ما يتضمّنه الدليل home/user. ويكون ذلك مفيدًا عندما تريد تجربة مشروع بدون التأثير في المشروع الأصلي، أو عندما تريد استخدام مشروع حالي كنقطة بداية لمشروع جديد.
أدخِل اسم مساحة العمل الجديدة وانقر على تكرار. سيتم إنشاء مساحة العمل الجديدة وإضافتها إلى قائمة مساحات العمل.
ß
ملاحظة: قد يستغرق تكرار مساحات العمل الأكبر حجمًا عدة دقائق. إذا لم يتم تحميل مساحة العمل الجديدة، انتظِر 5 دقائق، ثم أعِد تحميل الصفحة.
(اختياري) إذا كانت مساحة العمل الأصلية تتضمّن مشروعًا مرتبطًا على Firebase،
ننصحك بإنشاء مشروع منفصل على Firebase لمساحة العمل الجديدة. يمنع ذلك مساحة العمل الجديدة من إجراء تغييرات على مشروع Firebase المرتبط بمساحة العمل الأصلية. لإنشاء مشروع على Firebase، اتّبِع الخطوات التالية:
افتح مساحة العمل الجديدة واطلب من Gemini إنشاء مشروع Firebase لك.
عدِّل أي ملفات تشير إلى مشروع Firebase، مثل
.env أو .firebaserc.
ضبط مساحة العمل
تستخدم Firebase StudioNix
لتحديد إعدادات البيئة لكل مساحة عمل. Nix هي أداة لإدارة الحِزم الوظيفية البحتة، وتعيّن معرّفات فريدة لكل تبعية، ما يعني في النهاية أنّ بيئتك يمكن أن تحتوي على إصدارات متعددة من التبعية نفسها، بسلاسة. وهي أيضًا قابلة للتكرار وتوضيحية. في سياق Firebase Studio، يعني ذلك أنّه يمكنك مشاركة ملف إعدادات Nix بين مساحات العمل لتحميل إعدادات البيئة نفسها. مزيد من المعلومات حول Nix +
Firebase Studio
إنشاء ملف .idx/dev.nix أو تعديله
يتم تحديد إعدادات البيئة في ملف .idx/dev.nix في مستودع الرموز البرمجية. يحدّد هذا الملف جميع المكوّنات التي ستتم إضافتها إلى مساحة العمل، بما في ذلك:
الخدمات الشائعة، مثل
Docker ومراسلة Pub/Sub وقواعد البيانات مثل Postgres وRedis وغيرها
اطّلِع على مثال ملف .idx/dev.nix التالي لإعدادات أساسية لبيئة مساحة العمل تتيح معاينات التطبيقات في Firebase Studio:
{ pkgs,...}:{# Which nixpkgs channel to use.channel="stable-23.11";# or "unstable"# Use https://search.nixos.org/packages to find packagespackages=[
pkgs.nodejs_20
];# Sets environment variables in the workspaceenv={SOME_ENV_VAR="hello";};# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
idx.extensions=["angular.ng-template"];# Enable previews and customize configuration
idx.previews={enable=true;previews={web={command=["npm""run""start""--""--port""$PORT""--host""0.0.0.0""--disable-host-check"];manager="web";# Optionally, specify a directory that contains your web app# cwd = "app/client";};};};}
تطبيق الإعدادات الجديدة
في كل مرة تضيف فيها ملف إعداد dev.nix أو تعدّله، يعرض Firebase Studio
رسالة في أسفل يسار الصفحة تطلب منك إعادة إنشاء البيئة.
تعتمد المدة التي يستغرقها إعادة إنشاء البيئة على عدد الحِزم التي تحتاجها إعداداتك.
تصحيح أخطاء تعذّر إنشاء بيئة تصحيح الأخطاء
بما أنّ ملفات الإعداد هي رموز برمجية يمكن للآلة قراءتها، يمكن أن تتضمّن أخطاء. في حال حدوث ذلك، قد يتعذّر إنشاء البيئة وعدم بدء تشغيلها.
تعرض Firebase Studio خيارًا لبدء بيئة الاسترداد.
لا تتضمّن مساحة العمل هذه أيًا من إعداداتك المحدّدة، وتنفّذ فقط Code OSS الأساسية. يمنحك هذا الإجراء فرصة لإصلاح الأخطاء في ملف إعدادات dev.nix وإعادة إنشاء البيئة.
تاريخ التعديل الأخير: 2025-08-08 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-08-08 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["Firebase Studio provides a collaborative, cloud-based development\nenvironment that simplifies the process of building applications with an\nextensive combination of\n[frameworks and libraries](https://studio.firebase.google.com/templates).\n\nAfter you set up a Firebase Studio workspace, you can access and share a\nfully-functional, flexible development environment:\nFirebase Studio workspaces are accessible from any device and provide\nintegrated tools to streamline you and your team's development process.\n\nCreate a workspace\n\nA workspace in Firebase Studio is a development environment that\ncontains everything you need to develop your application. It contains your\ncode, a code editor (with plugins relevant to your project), and toolchains\nthat support app development. It's just like creating a new project in your\nlocal desktop development environment, except you have an entire computer\nand operating system pre-configured and dedicated *exclusively* to building\nyour application, running on your browser in the cloud, accessible wherever\nyou are.\n\nFirebase Studio workspaces are optimized to contain a single codebase,\nso you can keep the environments and system-level dependencies of different\napplications isolated from each other. You can create multiple workspaces to\nuse with different applications and frameworks.\n| **Key Point:** There's a limit to the number of workspaces you can create. If you have a [Google Developer Profile](https://developers.google.com/profile/help/overview), you can create more workspaces. Learn more at [Firebase Studio pricing, quotas and limits](/docs/studio/pricing).\n\nTo create a new workspace:\n\n- [Opening a template or sample app](/docs/studio/get-started-template).\n- [Importing a project](/docs/studio/get-started-import).\n- [Prototype with AI](/docs/studio/get-started-ai), then switch to Code view (**`\u003c/\u003e`**).\n\nDuplicate a workspace\n\nDuplicating a Firebase Studio workspace creates a copy of your project that\ncontains everything within the `home/user` directory. This is useful when you\nwant to experiment with a project without affecting the original, or when you\nwant to use an existing project as a starting point for a new one.\n\nTo duplicate a workspace:\n\n1. From the [Firebase Studio homepage](https://studio.firebase.google.com/), click the more_horiz menu next to the workspace you want to copy \\\u003e **Duplicate**.\n2. Enter the name of your new workspace and click **Duplicate**. The new\n workspace is created and added to your list of workspaces.\n ß\n Note: Duplicating larger workspaces can take several minutes. If your new\n workspace doesn't load, wait 5 minutes, then refresh the page.\n\n3. *(Optional)* If the original workspace has a linked Firebase project,\n consider creating a separate Firebase project for your new workspace. This\n prevents your new workspace from making changes to the Firebase project\n linked to your original workspace. To create a Firebase project:\n\n 1. Open the new workspace and ask Gemini to create a Firebase project for you.\n 2. Update any files that reference the Firebase project, such as `.env` or `.firebaserc`.\n\nConfigure your workspace\n\nFirebase Studio uses\n[Nix](https://nixos.org/manual/nix/stable/introduction)\nto define the environment configuration for each workspace. Nix is a purely\nfunctional package manager and assigns unique identifiers to each\ndependency, which ultimately means your environment can contain multiple\nversions of the same dependency, seamlessly. It is also reproducible and\ndeclarative. In the context of Firebase Studio, this means you can\nshare your Nix configuration file across workspaces to load the same\nenvironment configuration. Learn more about [Nix +\nFirebase Studio](/docs/studio/customize-workspace#nix+fs).\n\nCreate or edit the `.idx/dev.nix` file\n\nEnvironment configuration is defined in the `.idx/dev.nix` file in your code\nrepository. This file specifies all of the components to be added to your\nworkspace including:\n\n- [System tools](/docs/studio/customize-workspace#system-tools)\n available from the\n [Nix package registry](https://search.nixos.org/packages),\n including compilers, packages (like `go` or `angular`), and command line\n utilities, like extra\n [gcloud CLI components](/docs/studio/customize-workspace#gcloud).\n\n- [IDE extensions](/docs/studio/customize-workspace#extensions) from the\n [OpenVSX registry](https://open-vsx.org/), like\n language-specific debuggers, code formatters, official extensions for cloud\n services, and more.\n\n- [Common services](/docs/studio/customize-workspace#common-services), like\n docker, Pub/Sub messaging, databases like Postgres and Redis, and\n [more](/docs/studio/devnix-reference).\n\nSee the following example `.idx/dev.nix` file for a basic workspace environment\nconfiguration that enables app previews in Firebase Studio: \n\n { pkgs, ... }: {\n\n # Which nixpkgs channel to use.\n channel = \"stable-23.11\"; # or \"unstable\"\n\n # Use https://search.nixos.org/packages to find packages\n packages = [\n pkgs.nodejs_20\n ];\n\n # Sets environment variables in the workspace\n env = {\n SOME_ENV_VAR = \"hello\";\n };\n\n # Search for the extensions you want on https://open-vsx.org/ and use \"publisher.id\"\n idx.extensions = [\n \"angular.ng-template\"\n ];\n\n # Enable previews and customize configuration\n idx.previews = {\n enable = true;\n previews = {\n web = {\n command = [\n \"npm\"\n \"run\"\n \"start\"\n \"--\"\n \"--port\"\n \"$PORT\"\n \"--host\"\n \"0.0.0.0\"\n \"--disable-host-check\"\n ];\n manager = \"web\";\n # Optionally, specify a directory that contains your web app\n # cwd = \"app/client\";\n };\n };\n };\n }\n\nApply new configuration\n\nAny time you add or update the `dev.nix` configuration file, Firebase Studio\nshows a prompt in the bottom-right corner to **Rebuild the environment**.\nThe time it takes to rebuild the environment depends on the number of packages\nyour configuration needs.\n\nDebug environment build failures\n\nBecause configuration files are machine-readable code, they can have\nerrors. If this happens, the environment may fail to build and not start.\nFirebase Studio displays an option to start a *Recovery* environment.\nThis workspace doesn't include any of the configuration you've defined and\njust runs basic\nCode OSS. This gives you the chance to fix errors in your\n`dev.nix` configuration file and rebuild the environment.\n\nNext steps\n\n- [Customize your\n Firebase Studio workspace](/docs/studio/customize-workspace).\n\n- [Create custom templates to use and share](/docs/studio/custom-templates).\n\n- [Share your workspace](/docs/studio/share-your-workspace).\n\n- [Use an \"Open in Firebase Studio\" button to share your workspace\n configuration or custom template](/docs/studio/open-in-firebase-studio)."]]