MBY Writings Admin
One secure admin for three distinct projects: Lab / Research, Ben Yeshoua Blog, Children Royal Family (childrenroyalfamily.blog).
If it is not visible in the list for that project, treat it as not live.
Login
Admin access only. Use an email/password created in Firebase Authentication.
Requirements:
1) User exists in Firebase Authentication.
2) Email is listed in ALLOWED_EMAILS inside this file.
You are managing: Lab / Research. Everything you create or approve now is for this project only.
New Writing — Lab / Research
Fill in the fields and save. The project is locked to the active tab above to avoid mistakes.
Recent Writings — Lab / Research
Only items for the active project are shown. Edit/Delete apply only to this project.
Loading…
Incoming Submissions
Submissions from public or partners, filtered by the active project.
Expected fields in submissions:
project (“lab” | “ben” | “children”),
title, name, email,
message/abstract, optional fileUrl, optional tags,
and status (“pending” | “approved” | “rejected”).
Approve → creates a post for that project. Reject → keeps it out of public.
No pending submissions for this project.
Public Integration Guide
Each public site/page reads only its own content using the site field.
This admin is the single source of truth for approved items.
Ben Yeshoua Blog (site = “ben”)
On your Ben Yeshoua blog (WordPress), you can embed a block that lists selected posts from Firestore, in sync with your categories (AFRICA, SAUDI ARABIA, etc.). Basic example:
<div id="ben-posts-list">Loading strategic notes…</div>
<script type="module">
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.13.1/firebase-app.js";
import { getFirestore, collection, query, where, orderBy, limit, getDocs }
from "https://www.gstatic.com/firebasejs/10.13.1/firebase-firestore.js";
const firebaseConfig = {
apiKey: "AIzaSyByqflk09h3RLEEI76NfqoRcrQJVTRp9Zk",
authDomain: "music-ben-yeshoua.firebaseapp.com",
projectId: "music-ben-yeshoua"
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
const box = document.getElementById("ben-posts-list");
async function loadBenPosts(){
const q = query(
collection(db,"posts"),
where("site","==","ben"),
orderBy("publishedAt","desc"),
limit(12)
);
const snap = await getDocs(q);
if (snap.empty){ box.innerHTML = "No synced posts yet."; return; }
let html = "";
snap.forEach(docSnap => {
const p = docSnap.data();
const tags = p.tags || "";
html += `<article>
<h4>${p.title || "Untitled"}</h4>
${p.excerpt ? `<p>${p.excerpt}</p>` : ""}
${tags ? `<div>${tags}</div>` : ""}
${p.url ? `<a href="${p.url}" target="_blank">Read more</a>` : ""}
</article>`;
});
box.innerHTML = html;
}
loadBenPosts();
</script>Children Royal Family (site = “children”)
Same pattern, but where("site","==","children") and styled for the dark royal theme.Lab / Research (site = “lab”)
Same pattern, but where("site","==","lab") for research outputs and white papers.