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
Complexity: High - 200 points
Join: https://t.me/ByteChainAcademy | Contact: contact@nexacore.org
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/searchbackend endpoint and a global search UI in the site header.Background
SearchModuleorSearchControllerexists in the backendImplementation Guide
Backend: Create
SearchModule,SearchService, andSearchController.GET /api/v1/search?q=bitcoinqueries 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. CallGET /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=bitcoinreturns grouped results from all three typesComplexity: High - 200 points
Join: https://t.me/ByteChainAcademy | Contact: contact@nexacore.org