Skip to content

hrtechifyed/intelligentcompanalyser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CompAnalyser (Dynamic, World Bank-based)

This repository contains:

  • UI: index.html (deployed on GitHub Pages)
  • API: api/worker.js (Cloudflare Worker, deployed via GitHub Actions)

Dynamic Data Source

The API uses the World Bank Indicators API v2 to fetch:

  • Country list (/country)
  • Topics list (/topic)
  • FX rate (PA.NUS.FCRF)
  • PPP conversion factor for private consumption (PA.NUS.PRVT.PP)
  • GDP per capita (current US$) (NY.GDP.PCAP.CD)

These are combined into indicative benchmark estimates.

Deploy (Step-by-step)

1) Deploy API (Cloudflare Worker)

  1. Create a Cloudflare account and go to Workers & Pages.
  2. Create an API token with Workers Scripts: Edit permission.
  3. Copy your Account ID from Cloudflare.
  4. In GitHub repo → Settings → Secrets and variables → Actions, add:
    • CF_API_TOKEN = your Cloudflare API token
    • CF_ACCOUNT_ID = your Cloudflare account id
  5. Push to main. GitHub Action will deploy the Worker.
  6. Copy the Worker URL (e.g., https://companalyser-api.<subdomain>.workers.dev).

2) Connect UI to API

Open index.html and set:

const API_BASE = "https://companalyser-api.<subdomain>.workers.dev";

Commit and push.

3) Deploy UI (GitHub Pages)

  1. GitHub repo → Settings → Pages
  2. Source: Deploy from a branch
  3. Branch: main | Folder: / (root)
  4. Save and wait 30–60 seconds.

Your UI will be live at:

https://<username>.github.io/<repo>/

Notes

  • GitHub Pages is static; the Worker provides the dynamic API.
  • Benchmarks are indicative and should be validated with surveys.

About

New dynamic Companalyser

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages