Commit Graph
55 Commits
Author SHA1 Message Date
junvandGitHub c8b1f269a3 Merge branch 'master' into feat/update-guide 2026-03-07 11:25:00 +11:00
junv f20b7f5fce Add screenshots 2026-03-07 11:23:28 +11:00
junv 14b30bdb6e Update App name 2026-03-07 11:04:18 +11:00
junv ace053a547 Show app version at the bottom 2026-03-07 10:59:49 +11:00
junv bb9afffe4b Show source image page URL not source image file url 2026-03-07 10:50:04 +11:00
junvandGitHub ffda79fc3c Merge pull request #2 from wahyd4/feat/open-source-setup
Open source: add AGPL-3.0 license, NOTICE
2026-03-07 10:31:31 +11:00
junv d2696d9ea0 Remove copyright header 2026-03-07 10:27:31 +11:00
junvandCopilot d73e70a781 Open source: add AGPL-3.0 license, NOTICE, and copyright headers
- Add LICENSE (GNU Affero General Public License v3.0)
- Add NOTICE file with SearXNG attribution for borrowed scraping patterns
  in google.py (arc_id, GSA user-agent, HTML selectors) and bing.py
  (PERE pagination, base64 redirect decoding, CAPTCHA detection)
- Add CONTRIBUTING.md with contribution guidelines and license info
- Add SPDX-License-Identifier headers to all Python source files
- Add AGPL-3.0 license badge and License section to README.md

SearXNG is licensed under AGPL-3.0-or-later; this project follows suit
as it incorporates techniques derived from SearXNG's search engines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-07 10:25:36 +11:00
junvandCopilot 7a2126ddb1 Open source: add AGPL-3.0 license, NOTICE, and copyright headers
- Add LICENSE (GNU Affero General Public License v3.0)
- Add NOTICE file with SearXNG attribution for borrowed scraping patterns
  in google.py (arc_id, GSA user-agent, HTML selectors) and bing.py
  (PERE pagination, base64 redirect decoding, CAPTCHA detection)
- Add CONTRIBUTING.md with contribution guidelines and license info
- Add SPDX-License-Identifier headers to all Python source files
- Add AGPL-3.0 license badge and License section to README.md

SearXNG is licensed under AGPL-3.0-or-later; this project follows suit
as it incorporates techniques derived from SearXNG's search engines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-07 10:18:05 +11:00
junv cb57e2ed05 ui fix 2026-02-24 12:49:38 +11:00
junv 4e0a703e93 Add engine sort 2026-02-24 12:45:48 +11:00
junv 76b5d0c518 Update style 2026-02-24 11:43:33 +11:00
junvandCopilot c26caf2d58 feat: add search history page
Backend:
- Add backend/app/history.py reading from stats.search_events table
- Add GET /api/history (paginated), DELETE /api/history (clear all),
  DELETE /api/history/{id} (single entry) routes

Frontend:
- Add HistoryEntry/HistoryResponse types + getHistory/deleteHistoryEntry/
  clearHistory functions to api.ts
- Add History.tsx page component: entries grouped by day (Today/Yesterday/
  weekday/date), each row clickable to re-run search, category icon,
  per-entry delete button, clear-all, load-more pagination
- Add Clock icon nav item in AppHeader; wire /history route in App.tsx
- Thread onShowHistory through BackgroundGallery and Bookmarks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-24 11:18:23 +11:00
junvandCopilot 81a3b69f6d fix: add /search alias so external clients don't get 404
- Vite dev server: proxy /search to backend with path rewrite to /api/search
- FastAPI: add GET+POST /search route that 307-redirects to /api/search
  (307 preserves the original HTTP method, so POST stays POST)
- Fixes 404 for clients calling /search instead of /api/search

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-24 11:05:07 +11:00
junvandCopilot efc237ae52 feat: add POST support and compatibility params to /api/search
- Switch @router.get to @router.api_route with methods=[GET, POST]
- Add pageNumber alias for page (takes precedence when provided)
- Add numResults, format, imageProxy, safesearch params (accepted for
  compatibility with external clients)
- Update README.md, agents.md, FEATURES.md with param reference tables
- Add CHANGELOG 1.8.1 entry

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-24 10:53:35 +11:00
junv 417d87e813 Update 2026-02-24 10:51:26 +11:00
junv 50593289ac update apis 2026-02-23 21:43:34 +11:00
junv 0f97bc3566 Update! 2026-02-23 21:23:42 +11:00
junv 896d8e4ce2 Udate config for stats 2026-02-23 21:18:12 +11:00
junv 6be8332395 Add stats 2026-02-23 21:09:27 +11:00
junv 73fdec8bba Fix scroll! 2026-02-23 20:56:07 +11:00
junv a1a5cc2a54 Fix ui 2026-02-23 20:49:04 +11:00
junv 58c8254484 Update UI 2026-02-23 20:45:14 +11:00
junvandCopilot da3698fcb4 revert: restore background image display on home page
Reverted the isHomeWithBg useEffect and min-h-dvh changes that broke
the background image. Back to the working state from commit 6ca4763.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 19:50:24 +11:00
junvandCopilot 54d2610018 fix: correct iOS overscroll — revert fixed bg, only set html bg-color
- Reverted fixed/bg-black approach (fixed + z-index:-10 made bg invisible)
- Background image stays absolute inset-0 as before (works correctly)
- Only the <html> element background-color is set to #000 via useEffect
  when the home page has an active background image; this fills the iOS
  rubber-band overscroll zones without affecting the visible content
- Reverted global overscroll-behavior-y:none (too aggressive)
- min-h-dvh kept for correct iOS dynamic viewport sizing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 19:43:41 +11:00
junvandCopilot 871791bba9 fix: eliminate iOS overscroll white areas on home page
- background image changed from absolute to fixed so it covers the
  full viewport including iOS rubber-band overscroll zones
- useEffect sets html/body background-color to #000 while the home
  page with a background image is active, then clears it on teardown
- container uses min-h-dvh (dynamic viewport height) for correct iOS
  full-screen sizing
- overscroll-behavior-y: none added globally to suppress pull-to-
  refresh bounce that could reveal white behind the page

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 19:41:03 +11:00
junvandCopilot 6ca47634e0 fix: settings modal now works on all pages
- Hoist SettingsModal above all conditional page branches
- Previously missing from Gallery and Bookmarks early-returns
- Single settingsModal element shared across all four page views

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 19:33:21 +11:00
junvandCopilot 092d9ad94b feat: unified header with hamburger menu across all pages
- New AppHeader component: logo on left, optional center slot, menu icon on right
- Clicking menu icon opens dropdown: Settings, Bookmarks, Backgrounds, API Docs
- Dropdown closes on outside click and Escape key
- Transparent mode for home page when background image is active
- All pages (home, results, gallery, bookmarks) now use AppHeader consistently
- Results page: search bar in header center slot, category tabs in separate bar below
- Home page: flex-col layout, content vertically centered in remaining space
- Footer simplified to just the app name

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 19:17:08 +11:00
junvandCopilot d9a4fa9b8b feat: redesign homepage layout and add category switch
- Settings + nav icons (Bookmarks, Backgrounds, API Docs) moved to top-right corner
- Category toggle (Web / Images) added below search bar, Web selected by default
- New image refresh button moved to bottom-right corner (icon only on mobile)
- Image source link anchored to bottom-left corner
- Footer links removed in favour of icon buttons in top-right

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 19:11:04 +11:00
junvandCopilot 2f9889004c feat: add bookmarks for web and image results
- Bookmark icon on every web and image search result card
- Bookmark toggle in image lightbox viewer
- Dedicated /bookmarks page with All/Web/Images filter tabs
- Web bookmarks as cards, image bookmarks in masonry grid
- Full CRUD API: GET/POST /api/bookmarks, DELETE by id/url
- SQLite persistence in shared database
- Links in homepage footer and results page footer

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 19:04:46 +11:00
junvandCopilot 8ac1fb078a feat: attach source URL to background images
- Save original Unsplash/Picsum URL as .url sidecar file alongside each image
- Track source_url in API responses (BackgroundResponse, BackgroundListItem)
- Homepage footer shows 'Image source' link when background is active
- Gallery shows 'Source' link on hover overlay for each image

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 18:57:40 +11:00
junvandCopilot 4bd375cb83 feat: Unsplash background image on homepage with gallery
- Fetch random nature/landscape image from Unsplash (picsum fallback)
- Auto-refresh with configurable interval (1 min to 1 day, default 30 min)
- Save every downloaded image to DATA_DIR/backgrounds/ for history
- New 'Background' tab in Settings: enable/disable toggle + refresh presets
- 'New image' button on homepage to manually fetch fresh background
- /backgrounds gallery page with masonry layout and lazy loading
- Background settings (bg_enabled, bg_refresh_minutes) persisted in SQLite
- Homepage adapts text colors when background is active
- Added backend/data/ to .gitignore, removed tracked DB file

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 18:54:44 +11:00
junvandCopilot df87ce925b fix: detect image dimensions client-side from naturalWidth/Height
Backend engines rarely provide reliable width/height, so now:
- Thumbnail dimensions detected on load via naturalWidth/naturalHeight
- Full-size image dimensions detected when lightbox opens
- Priority: full-size > backend-reported > thumbnail detected
- Dimensions shown on card hover overlay and in lightbox details

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 18:45:14 +11:00
junvandCopilot 1b85dbc80a feat: show image dimensions + lock horizontal scroll on mobile
- Add width/height fields to ImageResult model
- Extract dimensions from DuckDuckGo and Bing engine responses
- Show size (e.g. 1920×1080) on card hover overlay and in lightbox details
- Prevent horizontal scrolling/panning on mobile (overflow-x: hidden + overscroll-behavior)
- Allow pinch-to-zoom via viewport meta (user-scalable=yes, maximum-scale=5)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 18:39:51 +11:00
junvandCopilot 70b62065bd ci: add GitHub Actions workflow for Docker build & push
- Builds Docker image on every push and PR to master
- Pushes to ghcr.io/wahyd4/hey-search on master commits
- Tags: latest + commit SHA
- Uses GitHub Actions cache for faster builds

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 18:19:31 +11:00
junvandCopilot 5fbd30de6a feat: mountable data directory for persistent config
- DB path now uses DATA_DIR env var (defaults to backend/data/ for local dev)
- Dockerfile sets DATA_DIR=/app/data with VOLUME declaration
- Docker run examples show -v mount for persistence across restarts
- /app/data stores SQLite DB (engines, excluded domains, cache settings)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 18:18:25 +11:00
junvandCopilot b9917f0a4e fix: add missing cached field to error fallback SearchResponse
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 18:14:57 +11:00
junvandCopilot df8bd7fa7d feat: configure Redis URL via UI settings
- Add redis_url to SQLite settings table (persisted across restarts)
- On startup, prefer DB-stored URL over REDIS_URL env var
- Add reconnect_redis() to support live URL changes without restart
- Settings API now accepts/returns redis_url field
- Cache tab shows editable URL input with save button and connection status
- Immediate feedback: shows Connected/Disconnected after save

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 18:10:11 +11:00
junvandCopilot 08937c3b8b feat: show cached badge in search stats when results from cache
- Add 'cached' boolean field to SearchResponse model
- Set cached=True when returning Redis-cached results
- Display green 'cached' pill with database icon in stats header

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:29:29 +11:00
junvandCopilot e9a5d68553 feat: Redis search cache with configurable TTL
- Add optional Redis caching for search results (REDIS_URL env var)
- Cache TTL configurable via UI: 0h (disabled) to 168h (1 week), default 6h
- New backend modules: cache.py (async Redis get/set/flush), settings.py (SQLite settings table)
- New API endpoints: GET/PUT /api/settings, DELETE /api/cache
- New 'Cache' tab in Settings modal with status indicator, preset buttons, slider, and flush
- Cache keys are deterministic hashes of query+category+page+image_size+engines
- Redis is fully optional: graceful no-op when REDIS_URL unset or Redis unreachable
- Updated Dockerfile, README, CHANGELOG, FEATURES

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:26:14 +11:00
junvandCopilot bf76393456 fix: forward browser Host via Vite proxy for correct API docs URLs
Vite proxy now sends X-Forwarded-Host and X-Forwarded-Proto headers
to the backend, so /openapi.json and /docs show the actual browser
address (e.g. http://192.168.1.28:5173) instead of localhost:8000.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:15:43 +11:00
junvandCopilot 0adad147f5 fix: dynamic API docs URLs match browser address
OpenAPI schema now derives the server URL from the incoming request
(Host header + X-Forwarded-Proto/X-Forwarded-Host for reverse proxies).
Curl examples in API docs use $BASE_URL placeholder which is replaced
at serve-time with the actual origin, so docs work correctly behind
nginx or any reverse proxy with a custom domain.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:12:35 +11:00
junvandCopilot b36d3e53b5 feat: accessibility overhaul, agent-friendly API, standardized errors
P0 fixes:
- Image result cards are now real <a> links (open-in-new-tab, Cmd-click, copy-link)
- aria-label on all icon-only buttons (settings, clear, close, nav, toggles, delete)
- Search input semantics: label, name=q, type=search, combobox ARIA pattern
- Visible focus-visible ring on all interactive elements, removed bare outline-none

P1 fixes:
- Skip to main content link for keyboard navigation
- Proper heading hierarchy (h1/h2) and landmark elements (nav, main, aside)
- aria-live regions for loading/results/error announcements
- Custom favicon SVG (eliminates 404 console errors)
- Dialog/modal semantics with role=dialog and aria-modal

P2 API improvements:
- result_id, rank, engine on every result; timestamp, total_results, has_next on response
- Standardized APIError model (code/message/details/retry_hint) on all error responses
- X-Response-Time-Ms and rate-limit headers on all responses
- curl examples and sample JSON in OpenAPI docs for every endpoint
- Global exception handler returns consistent error JSON
- engines parameter in URL for reproducible sessions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:06:09 +11:00
junvandCopilot bd22089d23 Update CHANGELOG and FEATURES docs for v1.3.0
- Lightbox navigation with arrow keys
- Visited link styling
- Mobile settings modal fix
- Search stats collapsed by default on mobile

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 16:28:04 +11:00
junv a09c245d6e UI update 2026-02-23 16:24:33 +11:00
junv 40ef206667 update 2026-02-23 16:22:07 +11:00
junv b1e6712283 update image 2026-02-23 16:13:45 +11:00
junv 16968b8565 add masonry image layout 2026-02-23 16:09:52 +11:00
junv 7c0430f2dc Update google and bing search logic 2026-02-23 15:55:25 +11:00
junv e78f9e95ef Add paging 2026-02-23 15:05:01 +11:00