This repository is a production-grade template for building Chrome extensions using Manifest V3, written in TypeScript.
It includes:
- background and content scripts
- a real extension panel UI
- a standalone demo build (no extension APIs required)
- a documented publishing and review workflow
This is not a finished product. It is a starting point designed to be cloned and renamed exactly once.
-
assets/Extension icons (PNG only, generated from SVG) -
src/Extension source code (background, panel, content, shared) -
demo/Standalone demo (Vite-based, mock runtime) -
docs/Documentation site (GitHub Pages), checklists, demo embed -
scripts/Build, release, versioning scripts -
tools/Initialization tools and templates (used once, then removed)
Build artifacts (dist/, build/, node_modules/) are not committed.
Create a new empty repository on GitHub named <project_code>
(do not add README, license, or .gitignore).
git clone https://github.com/nathabee/extension-generic.git
mv extension-generic <project_code>
cd <project_code>
rm -rf .gitThis step is mandatory to avoid pushing back into the template repository.
Always verify that origin points to your new repository before pushing.
git remote add origin git@github.com:<youruser>>/<project_code>.git
git branch -M main
git remote -v # MUST show your new repo before any push
nano tools/scripts/change-name.confFill in all GENERIC_* values (name, description, URLs, trigram, etc.).
chmod +x ./tools/scripts/*.sh
./tools/scripts/change-name.sh
./tools/scripts/change-docs.sh
./tools/scripts/change-logo.sh- replace all
GENERIC_*placeholders across the repository - update
package.jsonandmanifest.json - generate and copy branded SVG assets into
docs/ - replace
/README.mdand/docs/*using the project templates - verify that no
GENERIC_*placeholders remain (outsidetools/scripts)
After this step, the project is no longer “generic”.
Important The
tools/directory is intended for initialization only and should be removed before the first public release.
git add -A
git commit -m "chore(init): initialize project from template"
git push -u origin mainnpm install
npm run build
./scripts/build-zip.sh- Open
chrome://extensions - Enable Developer mode
- Click Load unpacked
- Select the repository root (the folder containing
manifest.json)
The demo runs the real panel UI in a normal web page using mock runtime and storage seams.
cd demo
npm install
npm run build
npm run preview -- --hostThe GitHub Pages site is served from the docs/ directory.
It contains:
- user documentation
- publishing and review notes
- interactive checklists
- the embedded demo panel
MIT — see LICENSE