Portfolio index with a publish-safety gate
One private JSON file of my projects feeds a searchable local index, the public project page on toheed-sahar.com and a client-safe WhatsApp assistant pack, with a policy that keeps client names, paths and credentials out of anything public.
The problem
A body of work that includes NDA projects cannot be shown from one list. Every public page, proposal and chat assistant needs the same facts, and one slip puts a client's name on the open web.
How I built it
One private file is the single source of truth: 98 records at last count, each with name, tagline, tier, stack, purpose, status, year and a client block with a share-safety flag. A Python builder inlines it into a searchable HTML index that works when double-clicked, a Node generator writes the public site data under a publish-safe policy, and a third output is a client-safe knowledge pack for a WhatsApp Business AI assistant.
What got hard
- Chrome blocks fetch() on file:// pages, so a double-clicked HTML file cannot read a sibling JSON file.
The builder inlines the JSON into the page, and the JSON stays the single source of truth.
- Client names, local disk paths and credentials must never reach a public file.
The generator drops anything flagged never-share and abandoned stubs, emits only the anonymised client label, never writes a local path, includes architecture notes only for personal projects, links GitHub only for public repos, and aborts if any credential pattern appears. Both builders carry the same pattern list.
- A project name can contain the client's brand even when the client field is anonymised.
The generator prints a warning for every anonymised project whose name contains the client brand, so a person decides before publishing.
The result
Drives the project page on toheed-sahar.com (86 projects published from the file as it stood at the last generation) and the WhatsApp assistant pack.
The ← and → keys turn the page too.