Skip to content

FireEngine is a self-hosted CMS for Firebase Firestore Database. Get auto-detected schema and auto generated admin interface for FREE, with full flexibility to configure and override what you need.

License

Notifications You must be signed in to change notification settings

fireenginecms/fireengine

Repository files navigation

FireEngine

Self-hosted Firebase CMS with automatic schema detection and admin UI generation. Deploy your own professional admin interface in minutes, not months.

Features

  • ⚡ Automatic schema detection from your Firestore collections
  • 🌐 Self-hosted on your own infrastructure
  • 👥 Role-based access control with granular permissions
  • 🎨 Schema customization via code configuration
  • 🔒 Multiple authentication methods
  • 🎛️ Customizable admin interface

Installation

# Using npm
npm install fireenginecms

# Using yarn
yarn add fireenginecms

Quick Start

Prerequisites:

  • Enable Firebase Authentication with Email/Password provider
  • Create a user account with the same email as ownerEmail
const express = require('express');
const fireengine = require('fireenginecms');
const app = express();

app.use('/admin', fireengine({
  adminCredentials: './firebase-admin-key.json',
  webappConfig: './firebase-config.json',
  ownerEmail: 'admin@yourdomain.com'
}));

app.listen(3000);

Configuration

FireEngine can be configured either through code (in your application) or environment variables - choose what suits your development workflow. When using environment variables exclusively, the config object becomes optional. All FireEngine runtime environment variables use the FIREENGINE_ prefix:

FIREENGINE_FIREBASE_PROJECT_ID=your-project-id  
FIREENGINE_FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----..."
FIREENGINE_FIREBASE_CLIENT_EMAIL=firebase-adminsdk-abc123@project.iam.gserviceaccount.com
FIREENGINE_OWNER_EMAIL=admin@yourdomain.com

For complete documentation including deployment guides, authentication setup, and advanced configuration, visit fireengine.dev/docs.

Configuration Options

Option Type Default Description
adminCredentials Object|String - Firebase Admin SDK credentials (object or file path)
webappConfig Object|String - Firebase web app configuration (object or file path)
ownerEmail String - Email of the admin owner
schemaOverrides Object {} Custom schema definitions
customFields Object {} Custom field type definitions
googleMapsApiKey String - API key for Google Maps integration
googleMapsOptions Object {} Google Maps configuration options
ignoreCollections Array [] Collections to ignore during auto-detection
useFirestoreAccessRules Boolean false Use Firebase security rules vs API endpoints
firestoreDatabase String - Firestore database ID (for multi-database projects)
storageMaxUploadSize String|Number - Maximum file upload size (e.g., "100MB", "5GB")

Schema Customization

FireEngine automatically detects your Firestore collections and generates admin interfaces. You can customize these schemas:

app.use('/', fireengine({
  // ... other config
  schemaOverrides: {
    "users": {
      title: "User Management",
      titleTemplate: "${displayName} (${email})",
      fields: [
        { name: "email", type: "string", required: true },
        { name: "displayName", type: "string", required: true },
        { name: "role", type: "string", options: ["admin", "user", "moderator"] }
      ]
    }
  }
}));

Deployment

FireEngine can be deployed anywhere Node.js runs:

Express Server:

const express = require('express');
const fireengine = require('fireenginecms');

const app = express();
app.use('/', fireengine(config));
app.listen(3000);

Using Environment Variables Only:

const express = require('express');
const fireengine = require('fireenginecms');

const app = express();
app.use('/', fireengine()); // Config object is optional when using env vars
app.listen(3000);

Firebase Functions:

const functions = require('firebase-functions');
const fireengine = require('fireenginecms');

exports.admin = functions.https.onRequest(
  fireengine(config)
);

Configure and deploy.

Links

License

MIT License - see LICENSE file for details.

About

FireEngine is a self-hosted CMS for Firebase Firestore Database. Get auto-detected schema and auto generated admin interface for FREE, with full flexibility to configure and override what you need.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published