Conversation
|
@Bentroen |
|
@Bentroen To implement a search feature for users and songs is harder than I imagined. I have a few worries about How efficient searching by keyword, name, title, author, and description by section or substring can be. And, how could we avoid full reads in case some user requests? |
|
https://www.mongodb.com/resources/basics/full-text-search I guess this is the approach to be taken with MongoDB, it already take care of all of this like fuzzy search and indexing is bazeds on words and not full strings. |
|
Thanks for working on these features!
Yes, we can have a single search feature that can return results for both users and channels - selectable with a tab widget, similar to what YouTube does.
Since user profiles are such a simple feature compared to search, I believe this PR can be reduced in scope to just user profiles, since they don't rely on search being ready to be merged into production. We can leverage the existing search infrastructure implemented here in a subsequent PR. |
…ure/zod-db-packages
…ator - Add env, Discord strategy, and song form schemas to @nbw/validation - Wire ConfigModule to validateEnv; parse user/song/query payloads with Zod - Replace DTO class helpers with mappers in song.util; re-export validation from @nbw/database for consumers - Frontend: import song form schemas from @nbw/validation; remove local SongForm.zod - Remove class-validator/class-transformer and global ValidationPipe from backend - Update specs; note bun test may need workspace resolution fixes for @nbw/config
- Introduce a new jsonStringField function to validate and parse JSON strings, ensuring invalid JSON surfaces as a Zod issue. - Update thumbnailData and customInstruments fields to utilize jsonStringField for improved validation.
…instructions - Change package name to @nbw/validation and clarify its role as the source of shared Zod schemas and TypeScript types. - Add detailed layout and script sections for building, developing, testing, linting, and cleaning the package. - Include instructions for consumers on how to import and use the package after building.
- Delete jest.config.js as part of the cleanup process for the validation package.
…TO names Remove common/types.ts and song/types.ts (PageQueryDTOType and *DtoType aliases). Add song/uploadMeta.ts for VisibilityType, CategoryType, LicenseType, TimespanType. Export SongsFolder from SongPage.dto.ts next to SongPageDto. Point SongPreview/SongView/UploadSongDto at uploadMeta; update package index exports. Rename frontend imports from *DtoType to the real DTO types (via @nbw/database).
…ckage dependencies - Introduced new UI components: Button, Input, Label, and Textarea for consistent styling and functionality across the application. - Added @radix-ui/react-label dependency to package.json for label component integration. - Updated existing components to utilize the new UI components for improved user experience. - Refactored ProfileBioEditor and ProfilePublicNameEditor to use the new Input and Button components.
9b0e525 to
fb03997
Compare


This PR adds comprehensive features to enhance user profile management and songs and user search functionality
Planned Features:
Song search functionality based on keywords
User profile search functionality based on keywords
User profile pages for viewing member information
Profile editing interface for users to manage their details