←BaldanAll worksLet's talk

Case study · Internal tool · 2026

Embed Hub: every team's Excel dashboards, one sidebar.

Teams publish their dashboards as Excel for the web, and the links used to live in chats and bookmarks. Embed Hub gives them one home: the admin makes the menus, data owners paste the embed code once, and viewers open it without hunting. Who can see the sheet itself is still decided by Microsoft 365.

Built end to endNode.js, no dependenciesCloud Run
Try the embed check ↓
embed hub · admin
Embed Hub admin menu on demo content: menus, embedded sheets and counts of menus, data and users

Screens: the real app running on demo content. Charts are public sample charts standing in for Excel sheets.

01 · How it's used

Menus, then embeds, then reading.

  1. 1

    Admin builds the structure

    Creates accounts and sidebar menus (a name and an icon), and puts them in order.

  2. 2

    Owner pastes an embed

    The iframe code or just the link. The form shows the detected host straight away and offers a sandboxed preview.

  3. 3

    Server keeps only a clean link

    It pulls out the URL, checks it hard and saves that, never the pasted HTML.

  4. 4

    Viewer opens it

    Menus with items appear in the sidebar; the sheet opens in a sandboxed frame with reload, full screen and open-in-new-tab.

02 · Try to paste something

What the server accepts, and why.

This is the server's own check, run in your browser. Paste an iframe, a link, or something that shouldn't be there.

Paste the embed code or link

Accepted · saved as

Link detected: contoso-my.sharepoint.com

https://contoso-my.sharepoint.com/personal/demo/_layouts/15/Doc.aspx?sourcedoc={0000}&action=embedview&wdAllowInteractivity=False

Viewers get it in a sandboxed iframe; the pasted HTML itself is thrown away.

03 · Under the hood

Small, strict, and dependency-free.

  • Only the link survives

    The src is pulled out of the iframe; anything else with a < is refused; spaces are refused; it must parse as a URL and start with https://. An optional allow-list limits the hosts.

  • A JSON store that can't half-write

    Users, menus, items and sessions live in memory and are saved by writing a temp file and renaming it over the old one.

  • A header against forged requests

    Every write must carry a custom header, checked before login is even looked at; together with strict cookies, other sites can't post on your behalf.

  • Passwords with scrypt

    16-byte salt, 64-byte key, compared in constant time; unknown usernames still run a dummy hash.

  • Brute force capped

    Ten failures in 15 minutes from one address get a 429; a successful login clears the count.

  • Owners own their items

    An owner edits and deletes only their own; deleting a user hands their items to the admin. The last admin can't be removed.

04 · Who sees what

Three roles.

Admin

Accounts, menus and every item.

Data owner

Adds items under any menu and edits or deletes only their own.

Viewer

Reads. Menus without items are hidden from them.

05 · The small stuff

Hardening for a one-file server.

Content policy

Scripts only from itself, frames only over https, and the hub itself can't be framed.

Sandboxed frames

Embeds run with only the permissions a spreadsheet needs: scripts, forms, popups, downloads, full screen.

Size limits

Request bodies over 100 KB are refused; bad JSON gets a clear 400.

No path tricks

Static files are served only from the public folder, with traversal blocked.

No HTML from users

Every user string is rendered as text, never as HTML.

Sessions

A random token in a strict, httpOnly cookie; only its hash is stored. A password reset ends that user's sessions.

Keyboard first

Ctrl+K searches every page and item.

One instance on purpose

Deployed with a single instance and a mounted bucket, because the store and rate limit live in memory.

06 · How it fits together

A browser, one Node file and a JSON file.

Browser

Single-page app

Vanilla JS with a hash router and a command palette; embeds load straight from Microsoft into a sandbox.

Cloud Run

node:http server

Route table, sessions, role checks, validation; no framework, no npm packages.

JSON store

users, menus, items, sessions

Bucket volume

keeps the store across restarts

Microsoft 365

The sheets

Excel for the web serves the actual dashboards and decides who may see them.

07 · Tech stack

What each piece does.

Node.js 18 standard library

HTTP server, crypto (scrypt), files. Zero dependencies.

Vanilla JS + CSS

The whole front end.

JSON file store

All data, written atomically.

Cloud Run + Cloud Storage

Hosting, with the store on a mounted bucket.

Excel for the web

The embedded dashboards.