Browser-based tool for comparing candidate terms with Semrush data and recommending:
- best primary term
- best secondary term
- terms to use in supporting copy
- terms to avoid as primary targets
- Frontend: static HTML, CSS, and vanilla JavaScript
- Backend: lightweight Node.js HTTP server
- Data source: Semrush SEO API
- Node.js 20+
SEMRUSH_API_KEYin the environment
Option 1:
cp .env.example .envThen add your real SEMRUSH_API_KEY to .env and run:
npm startOption 2:
export SEMRUSH_API_KEY=your_key_here
npm startFor an internal desktop handoff on macOS:
- Keep this whole folder together.
- Include the real
.envfile. - Have Node.js 20+ installed on the target machine.
- Launch the app by double-clicking start.command.
What to send:
- the full
IntentTermfolder .envwith the Semrush key
What your boss does:
- Install Node.js if it is not already installed.
- Open the folder.
- Double-click
start.command. - Use the app in the browser at
http://127.0.0.1:3000.
Notes:
- The Terminal window opened by
start.commandneeds to stay open while the app is running. - If macOS blocks the script the first time, right-click
start.commandand choose Open.
Then open http://localhost:3000.
This repo is now set up for:
- frontend on GitHub Pages
- backend API on a separate Node host
GitHub Pages serves the contents of public. The API remains in server.js so the Semrush key stays on the server.
The workflow at .github/workflows/deploy-pages.yml deploys the public folder to GitHub Pages on every push to main.
Before pushing, set the API origin in public/config.js:
window.TERMINTENT_CONFIG = {
API_BASE_URL: "https://your-api-host.example.com"
};Then in GitHub:
- Open the repository settings.
- Go to Pages.
- Set the source to GitHub Actions.
Your frontend URL will be:
https://scottindc.github.io/TermIntent/
You can deploy the API to any Node host. A starter Render config is included in render.yaml.
Required backend environment variables:
SEMRUSH_API_KEYAPP_PASSWORDHOST=0.0.0.0PORT=10000on Render, or the port your host expectsALLOWED_ORIGINS=https://scottindc.github.io
If you want to allow both the GitHub Pages site and local development:
ALLOWED_ORIGINS=https://scottindc.github.io,http://127.0.0.1:3000After the backend URL is live, update public/config.js to point to it and push again.
Set APP_PASSWORD on the backend if you want the public frontend to require a shared password before anyone can run comparisons.
This is a lightweight shared-secret gate, not full user-account authentication. It is useful for basic access control, but it should not be treated as a substitute for proper per-user auth.
- Candidate term validation for blank and duplicate inputs
- Database selection for
US,UK, andCA - Content goal selection
- Comparison table with:
- search volume
- keyword difficulty
- CPC
- intent
- trend direction
- related keyword count
- recommendation label
- Weighted recommendation logic
- CSV export
- Clear API and insufficient-data states
- The app uses the Semrush
phrase_theseendpoint for bulk keyword metrics andphrase_relatedto estimate related keyword count. - Related keyword count is calculated by counting returned related-keyword rows from Semrush.
- CSV export is generated in the browser from the most recent comparison result.
- Cross-origin requests are restricted by
ALLOWED_ORIGINSon the backend.