Commit Graph
36 Commits
Author SHA1 Message Date
junv c5c18ae74a Add format=llm support which get rid of extra content and only focus on title, url, snippet 2026-03-09 17:55:38 +11:00
junv 4e5b0424b0 Add published date option and filter 2026-03-09 17:35:36 +11:00
junv e63ac6ee59 Load REDIS_URL and save it to db when it exists 2026-03-07 12:19:00 +11:00
junvandGitHub c8b1f269a3 Merge branch 'master' into feat/update-guide 2026-03-07 11:25:00 +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
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 4e0a703e93 Add engine sort 2026-02-24 12:45:48 +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
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
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 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 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 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
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
junv cb1469c23d Update settings! 2026-02-23 14:56:27 +11:00
junv 2144687bd3 Add feature to exclude results from a website 2026-02-23 14:50:31 +11:00
junv 8ded475231 Update 2026-02-23 14:41:23 +11:00
junv 9d36d4aba9 Done by copilot 2026-02-23 14:37:07 +11:00