
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@firecms/collection_editor
Advanced tools
This plugin enables creating and managing Firestore collections directly from your FireCMS interface. It adds a visual collection editor that allows you to create, edit, and delete collections without writing code.
npm install @firecms/collection_editor
# or
yarn add @firecms/collection_editor
For Firebase integration, also install:
npm install @firecms/collection_editor_firebase
# or
yarn add @firecms/collection_editor_firebase
import React from "react";
import { FireCMS } from "@firecms/core";
import { useCollectionEditorPlugin } from "@firecms/collection_editor";
import { useFirestoreCollectionsConfigController } from "@firecms/collection_editor_firebase";
export default function App() {
// Controller to save collection configs in Firestore
const collectionConfigController = useFirestoreCollectionsConfigController({
firebaseApp
});
// Initialize the collection editor plugin
const collectionEditorPlugin = useCollectionEditorPlugin({
collectionConfigController
});
const navigationController = useBuildNavigationController({
// Your other config options
plugins: [collectionEditorPlugin]
});
return <FireCMS
name={"My CMS"}
navigationController={navigationController}
authentication={myAuthenticator}
firebaseConfig={firebaseConfig}
/>;
}
You can customize collection editor behavior with these options:
const collectionEditorPlugin = useCollectionEditorPlugin({
collectionConfigController, // Required: controller that handles persistence
// Define permissions for collection operations
configPermissions: ({ user }) => ({
createCollections: user.roles?.includes("admin") ?? false,
editCollections: user.roles?.includes("admin") ?? false,
deleteCollections: user.roles?.includes("admin") ?? false
}),
// Prevent these group names from being used
reservedGroups: ["admin", "system"],
// Optional custom view to add to the editor
extraView: {
View: MyCustomView,
icon: <CustomIcon />
},
// Function to infer collection structure from existing data
collectionInference: async ({ path }) => {
// Return inferred schema based on data at path
},
// Function to get sample data for a collection
getData: async (path, parentPaths) => {
// Return sample data for the specified path
},
// Track collection editor events
onAnalyticsEvent: (event, params) => {
console.log("Collection editor event:", event, params);
},
// Include introduction widget when no collections exist
includeIntroView: true
});
You can combine collections defined in code with those created in the UI:
import { mergeCollections } from "@firecms/collection_editor";
const collectionsBuilder = useCallback(() => {
// Collections defined in code
const codeCollections = [productsCollection, ordersCollection];
// Merge with collections from the editor UI
return mergeCollections(codeCollections, collectionConfigController.collections ?? []);
}, [collectionConfigController.collections]);
const navigationController = useBuildNavigationController({
collections: collectionsBuilder,
// Other options
});
To persist collections in Firestore:
const collectionConfigController = useFirestoreCollectionsConfigController({
firebaseApp,
// Optional: specify where to save configs (default: "__FIRECMS/config/collections")
configPath: "custom/config/path",
// Optional: define permissions for collections
permissions: ({ user }) => ({
// Your permissions logic
}),
// Optional: custom property configurations
propertyConfigs: [
// Custom property types
]
});
FireCMS offers several complementary plugins:
FAQs
Unknown package
The npm package @firecms/collection_editor receives a total of 1,360 weekly downloads. As such, @firecms/collection_editor popularity was classified as popular.
We found that @firecms/collection_editor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.