PM-5499 extend shocase post#29
Open
vas3a wants to merge 8 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enriches project showcase post responses by aggregating Topcoder challenge metadata from external databases and expands filtering documentation for industries/categories.
Changes:
- Added external Prisma client helpers for Topcoder challenge/member/resource/skills databases.
- Updated
ProjectShowcasePostServiceto load and attach per-challenge metadata (submissions, registrants, skills, track, countries) to showcase post DTOs. - Updated API DTOs/Swagger decorators and tests to reflect the enriched response and array-based filtering docs.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shared/global/external-prisma.client.ts | Adds lazy singleton external Prisma clients and env-driven DB URL wiring. |
| src/api/project-showcase-post/project-showcase-post.service.ts | Loads external challenge metadata and adds projectTitle/challengeMetadata to responses. |
| src/api/project-showcase-post/project-showcase-post.service.spec.ts | Mocks external Prisma clients and asserts metadata-related queries are made. |
| src/api/project-showcase-post/project-showcase-post.controller.ts | Updates Swagger query documentation to indicate array inputs for industry/category filters. |
| src/api/project-showcase-post/dto/project-showcase-post-response.dto.ts | Extends response schema with projectTitle and challengeMetadata. |
| src/api/project-showcase-post/dto/project-showcase-post-list-query.dto.ts | Updates Swagger metadata for industry/category filters to show array typing. |
| src/api/project-showcase-post/dto/challenge-metadata.dto.ts | Introduces DTO for aggregated challenge metadata payload. |
| package.json | Adds Topcoder API repos as dependencies to access their Prisma clients. |
| .env.example | Adds required external DB URL environment variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces enhanced integration with external Topcoder APIs to enrich project showcase posts with additional challenge metadata, such as the number of submissions, registrants, skills, track, and participating countries. It also improves filtering capabilities for industries and categories and updates the API response structure accordingly. The most important changes are as follows:
Integration with External APIs and Metadata Enrichment:
package.jsonto enable fetching external challenge data.ChallengeMetadataDtoand logic inProjectShowcasePostServiceto aggregate challenge metadata (submissions, registrants, skills, track, countries) for each showcase post by querying the specific databases.Configuration Updates:
.env.examplefor external database URLs required.