Projects BibleWeb Search Pagination
Done

Pagination

Area: Search Milestone: v1

Context

Problem: Bible searches can return hundreds of results. Loading them all at once would be slow and overwhelming.

Solution: Paginated results with 50 per page and Prev/Next navigation.

Not included: Infinite scroll or "load more" pattern. This is traditional page-based pagination.

Functional

User flow:

  1. User searches and gets results
  2. First 50 results displayed
  3. "X–Y of Z" range label shows position (e.g., "1–50 of 234")
  4. Prev/Next buttons to navigate between pages

Edge cases:

  • First page: Prev button disabled
  • Last page: Next button disabled
  • Changing the search query resets to page 1

UX & Design

Pagination controls: Prev/Next buttons with range label, below the results list.

Technical

API params: page (1-based) and limit (default 50) passed to GET /api/search.

Query: LIMIT ${limit} OFFSET ${(page - 1) * limit} applied to the FTS5 query.

Files:

  • apps/web/src/routes/(app)/search/+page.svelte — pagination UI + state

Status

Current: DONE Milestone: v1 Priority: Core — necessary for usable search

Dependencies:

  • Requires: full-text search (DONE)

Screenshots

Feature screenshot