Repository navigation
feat: real search engine, favourites, safe AI assistant, CI/tests, docs — and two secret leaks fixed - #1
Merged
Conversation
…docs Security & repo hygiene - Untrack `.env` (a live Gemini key was committed) and five stray PDFs; add `.env.example`, `SECURITY.md`, `LICENSE` (MIT) and hardened `.gitignore`. - Remove hard-coded staff usernames/passwords from `LoginPage.tsx`. Demo auth now checks nothing and grants the staff view by display name only (`VITE_DEMO_ADMINS`), so no credential ever lives in the source again. Search & discovery (src/lib/search.ts, src/lib/tags.ts, ProjectExplorer) - Replace `title.includes(q)` with tokenised, accent-insensitive, typo-tolerant ranking over title/tags/category/licence/platform/source/description, with stopword handling and coverage-based matching for long queries. - Faceted filters (category, licence, platform, source, min Trust Score, verified-only), five sort orders, load-more pagination, `<mark>` highlighting of why a result matched, `/` shortcut, recent searches, empty state. - The URL is the source of truth: `/?q=vpn&sort=trust&license=GPL-3.0` is a shareable result set, and the hero search drives the same state. - Search tags are derived from the dataset (intent keywords such as vpn, notes, llm, password-manager), so new entries are findable without hand-maintained keywords. Favourites - New `FavoritesProvider` + `/favorites` page, localStorage persistence with cross-tab sync, toast feedback, and a heart toggle on every card. AI assistant (src/services/ai.ts) - Drop the deprecated `@google/generative-ai` SDK and the retired `gemini-pro` model: plain `fetch` against Gemini REST with real multi-turn history, timeouts, abort on unmount, safety thresholds and readable errors. - Proxy mode (`VITE_AI_PROXY_URL`) keeps the key server-side; a ready-to-deploy Cloudflare Worker with CORS + rate limiting lives in `examples/ai-proxy/`. - Offline fallback (`localAssistant`) answers from the real catalogue when no key is configured, so the chat is never dead in demos or CI. - Chat history persists per conversation, renders HTML-safe markdown, and the notification prompt is opt-in instead of firing on page load. Robustness, a11y and SEO - ErrorBoundary on all routes, 404 page that suggests real projects, ScrollToTop, dynamic `document.title`, route-level code splitting, vendor chunks, lazy-load skeletons. - Skip link, semantic landmarks, visible focus rings, ARIA states, `aria-live` result counts, `prefers-reduced-motion` support; the particle canvas now pauses on hidden tabs and honours reduced motion. - Meta/OG/Twitter/JSON-LD, custom favicon, robots.txt, sitemap.xml, and a GitHub Pages deep-link fix (`public/404.html` + `src/lib/ghPages.ts`). Data honesty - Licence explainer covers MIT/Apache/GPL/AGPL/LGPL/MPL/BSD/CC0/Unlicense plus model licences, and flags proprietary entries as "Not open source" instead of showing a green tick. Removed lorem ipsum and the fake activity sparkline; the detail page now shows derived signals, related projects, a Trust Score ring, quick facts and a "report this listing" shortcut. Tooling, tests, docs - `public/data/projects.json` generated at build time (real static API). - 100 Vitest tests: search/scoring, tags, catalogue, licence lookup, time helpers, offline assistant, dataset integrity (duplicate ids, non-official link hosts, download portals, out-of-range scores, proprietary-but-verified) and jsdom smoke tests that render the real app. - GitHub Actions CI (lint, typecheck, test, build) + Pages deploy workflow, issue/PR templates, rewritten README, CONTRIBUTING, docs/DEPLOYMENT, docs/ROADMAP, Dockerfile + nginx.conf. - Project metadata fixed (name `opendiscover`, version, license, repo links) and dead files removed (App.css, react.svg, vite.svg, SubmitProjectModal). Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A full pass over the repository: two critical secret leaks fixed, search rebuilt into a real ranking engine, favourites added, the AI assistant de-deprecated (and made to work with no API key), plus routing/a11y/SEO robustness, a design system in CSS, 100 tests, CI, and real contributor docs.
106 files changed, +12,138 / −2,190· every commit builds, lints, type-checks and passes tests.🔴 Security — action required from the maintainer
.env(commit56c5666, public repo).env.example;SECURITY.mddocuments rotation + history purgesrc/pages/LoginPage.tsx(krishna0858 / @krishna, etc.)VITE_DEMO_ADMINS)/*.pdf); files left on diskVITE_AI_PROXY_URL) + a deployable Cloudflare Worker inexamples/ai-proxy/(CORS allow-list, rate limiting, no key in the bundle)npm run lintwent from 2 errors + 1 warning → 0 problems.What changed
🔍 Search & discovery (
src/lib/search.ts,src/lib/tags.ts,ProjectExplorer)title.includes(q)with tokenised, accent-insensitive, typo-tolerant ranking across title · tags · category · licence · platform · source · description, with stopword handling and coverage-based matching so padded queries still work.<mark>highlighting of why a result matched,/to focus,Escto clear, recent-search chips, honest empty state./?q=privacy+browser&sort=trust&license=GPL-3.0&verified=1is a shareable result set, and the hero search drives the same state.vpn,notes,llm,password-manager,terminal…), so new entries are findable without hand-maintained keywords.❤️ Favourites
FavoritesProvider+/favoritespage, localStorage persistence with cross-tab sync, heart toggle on every card, toast feedback, "storage blocked" fallback messaging.🤖 AI assistant (
src/services/ai.ts,localAssistant.ts)@google/generative-aiSDK and the retiredgemini-promodel (the chat could not have worked). Now plainfetchagainst Gemini REST withgemini-2.0-flash, real multi-turn history, timeouts, abort-on-unmount, safety thresholds and readable errors.proxy→direct→local. The local engine answers from the real catalogue using the same ranking as the UI, so the assistant is never dead in a demo, in CI, or for a visitor with no key.dangerouslySetInnerHTML), and the notification prompt is now opt-in instead of firing on page load.🧭 Robustness, a11y, SEO
ErrorBoundaryon all routes, a 404 page that suggests real projects (and echoes the failed path), route-level code splitting + vendor chunks + skeletons,ScrollToTop, dynamicdocument.title.aria-pressed/aria-expanded,aria-liveresult counts, fullprefers-reduced-motionsupport; the particle canvas now pauses on hidden tabs and caps its O(n²) work.robots.txt,sitemap.xml, and a GitHub Pages deep-link fix (public/404.html+src/lib/ghPages.ts) so/project/42survives a refresh.🧾 Data honesty
🧪 Tests, CI, docs, packaging
.github/workflows/ci.yml(lint · typecheck · test · build on every push/PR) anddeploy.yml(GitHub Pages, setsVITE_BASE_PATHfor you).README.md,CONTRIBUTING.md(with the Trust Score rubric),SECURITY.md,LICENSE(MIT),docs/DEPLOYMENT.md,docs/ROADMAP.md,Dockerfile+nginx.conf.public/data/projects.json— a real, keyless static API.name: opendiscover, version, licence, repo/homepage/bugs, engines) and removed dead files (App.css,react.svg,vite.svg, unusedSubmitProjectModal, old deploy docs).Verification
Manually exercised: home search + filters + sort + shareable URL, category pages, project detail (licence explainer, trust ring, related, discussion), favourites round-trip, demo sign-in as
krishna0858(any password, any 6-digit OTP), AI chat in offline mode, community/forum, 404 route, mobile drawer.Notes for the reviewer
VITE_DEMO_ADMINSinstead of a name list baked into a component.dist/,public/data/and.envare git-ignored; the JSON API is regenerated byprebuild.docs/ROADMAP.md— top item is live GitHub/Hugging Face metadata sync, since hand-typed stars go stale.