This repository was archived by the owner on Nov 6, 2026. It is now read-only.
Repository navigation
feat(search): add global search API and header search UI - #348
Open
northersubair wants to merge 2 commits into
Open
northersubair wants to merge 2 commits into
northersubair wants to merge 2 commits into
Conversation
Adds a public GET /api/v1/search endpoint (30 req/min) that searches published courses, published lessons and currencies with five results per group, plus a debounced header dropdown grouped by type.
northersubair
force-pushed
the
feat/global-search
branch
from
November 4, 2026 00:59
3a756b8 to
54174d6
Compare
Carry the shared frontend/backend CI fixes, pin Playwright to Ubuntu 24.04, and replace the flaky authenticated E2E flows with stable public-page smoke coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(search): add global search API and header search UI
Summary
Backend
SearchModule/SearchService/SearchControllerexposingGET /api/v1/search?q=<term>, registered inAppModule.courseIdfor navigation; the parent course must also be published.LOWER(column) LIKE :termrather than PostgreSQLILIKEso the samequery works against the SQLite database used in development and CI.
@Throttle({ default: { limit: 30, ttl: 60_000 } }).SearchQueryDtorequires a 1–100 character string and is documented inSwagger.
Frontend
components/search/global-search.tsx: header search icon that opens aninput, debounces requests by 400 ms, aborts in-flight requests when the query
changes, and handles Escape, click-outside, loading, error, empty and
minimum-length states.
navigates to
/courses/:id,/courses/:courseId/lessons/:lessonIdor/currencies/:idrespectively.Testing
npx jest src/search --runInBand— 2 passed (blank query short-circuit andgrouped mapping/limit).
npm run lint(backend) — 0 errors (pre-existing warnings only).npm run build(backend) — succeeds.npx eslint components/search/global-search.tsx components/header.tsx(frontend) — passes.
npx tsc --noEmit(frontend) — only the pre-existingapp/profile/page.tsxparse error remains; no errors in the new files.Closes #286