Skip to content

Restructure pages into pages/ dir, fix custom cursor, secure env vars - #165

Merged
Yuvraj-Sarathe merged 5 commits into
mainfrom
fix/pages-restructure-and-security
Aug 5, 2026
Merged

Restructure pages into pages/ dir, fix custom cursor, secure env vars#165
Yuvraj-Sarathe merged 5 commits into
mainfrom
fix/pages-restructure-and-security

Conversation

@Yuvraj-Sarathe

Copy link
Copy Markdown
Member

Summary

Five commits reorganizing the repo and fixing a security leak.

  1. refactor — All 20 HTML pages moved into \pages/; every reference rewritten (assets, links, favicon, canonical/SEO URLs, inline fetches). Build inputs, Vercel rewrites, CI check and sitemap updated. Dev server now mirrors Vercel routing via a rewrite plugin.
  2. fix — Custom cursor images moved to \public/cursor/\ (they were never shipped in dist) and switched to absolute paths; avatar/logo fallback refs fixed.
  3. fix — Ambassador referral and admin links point to new /pages/\ URLs.
  4. chore — Old root-level \cursor/\ directory removed.
  5. security — Secrets never reach the browser: \generate-env.js\ emits public config only; hardcoded HF token removed from chatbot.js (now proxies through serverless /api/chat); blog publishing validated server-side via /api/blog-insert\ (ADMIN_SECRET); feed scripts call GitHub anonymously; \chatbot 2.js\ (leaked token) deleted. .env.example\ documents public vs server-only variables.

⚠️ Action required before/after merge

The following credentials were exposed publicly (hardcoded in committed files or served via \public/env-public.json) and MUST be rotated:

  • HF token \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\ (was in chatbot.js)
  • HF token \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\ (was served to visitors)
  • GitHub PAT \GIT_OMNIKON_ALL\ \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\ (was served to visitors)

After rotating: update .env, Vercel env vars (\HF_TOKEN, \ADMIN_SECRET, \GIT_OMNIKON_ALL\ for CI, Supabase/Firebase keys), and GitHub repo secrets.

Test


  • pm run build\ passes, 20 pages emitted under \dist/pages/\
  • Dev server verified: /, /:page.html, /omnikon-ref-:id, cursor assets all 200

All 20 HTML pages now live in pages/ with references rewritten:
- assets/favicon/canonical links, SEO URLs, inline fetches
- vite build inputs, vercel.json rewrites, CI check
- ambassador/admin/auth redirects, chatbot data fetch
- regenerate sitemap, drop stale root-level dist artifacts
Cursor assets moved to public/cursor so they ship in dist; particles.js and
asset references now use root-absolute /cursor/ paths instead of page-relative
./cursor/ which broke from /pages/* URLs
Admin redirect, campaign referral links and copied referral URLs now point
to /pages/admin.html and /pages/r.html
- generate-env.js emits public config only (no HF_TOKEN / ADMIN_SECRET)
- .env.example documents public vs server-only variables
- chatbot.js: hardcoded HF token removed; posts to new /api/chat proxy
- api/chat.js: serverless HF proxy using process.env.HF_TOKEN
- api/blog-insert.js: validates ADMIN_SECRET server-side, inserts to Supabase
- blogs.html admin flow validated server-side; no localStorage secret
- feed scripts call GitHub anonymously (no client-side PAT)
- delete chatbot 2.js (duplicate with leaked hardcoded token)
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
omnikonorg Ready Ready Preview Aug 5, 2026 12:57pm

@Yuvraj-Sarathe
Yuvraj-Sarathe merged commit cfe2741 into main Aug 5, 2026
5 checks passed
@Yuvraj-Sarathe
Yuvraj-Sarathe deleted the fix/pages-restructure-and-security branch August 5, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant