Skip to content

feat(backend+frontend): implement global search across courses, lessons, and currencies #286

@portableDD

Description

@portableDD

Description

The frontend has no global search. Users cannot find courses, lessons, or currencies from a single search bar. This issue builds a GET /api/v1/search backend endpoint and a global search UI in the site header.

Background

  • No SearchModule or SearchController exists in the backend
  • Search should cover courses (title and description), lessons (title), and currencies (name and symbol)
  • Results grouped by type, max 5 per group
  • No auth required for search

Implementation Guide

Backend: Create SearchModule, SearchService, and SearchController. GET /api/v1/search?q=bitcoin queries all three repositories using ILIKE and returns { courses: [...], lessons: [...], currencies: [...] } limited to 5 per category. Add rate limiting (30 requests/minute) to prevent abuse.

Frontend: Create frontend/components/search/global-search.tsx — a search icon in the header. On click, show a search input. Debounce 400ms. Call GET /api/v1/search?q=.... Show results in a dropdown grouped by Courses, Lessons, Currencies. Clicking a result navigates to the correct page. Escape key closes the dropdown.

Acceptance Criteria

  • GET /api/v1/search?q=bitcoin returns grouped results from all three types
  • Results limited to 5 per category
  • No authentication required for search
  • Frontend search icon in header
  • Results grouped by type in dropdown
  • Clicking a result navigates to correct page
  • Input debounced 400ms, Escape closes dropdown

Complexity: High - 200 points
Join: https://t.me/ByteChainAcademy | Contact: contact@nexacore.org

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions