Skip to content

Commit faf5fa7

Browse files
committed
Update README with usage details
1 parent 055ac8c commit faf5fa7

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,35 @@ Refer to the verification document `Verification.md`
283283

284284
- In the app-constants.js Topics field, the used topics are using a test topic,
285285
the suggested ones are commented out, because these topics are not created in TC dev Kafka yet.
286+
287+
**Downstream Usage**
288+
289+
- This service is consumed by multiple Topcoder apps. Below is a quick map of where and how it’s called to help with debugging.
290+
291+
**platform-ui**
292+
293+
- Admin and Review apps read challenge data and metadata via v6 endpoints:
294+
- Search challenges: `GET /v6/challenges?{filters}`. See `platform-ui/src/apps/admin/src/lib/services/challenge-management.service.ts`.
295+
- Fetch challenge by id: `GET /v6/challenges/{id}`. See `platform-ui/src/apps/admin/src/lib/services/challenge-management.service.ts` and `platform-ui/src/apps/review/src/lib/services/challenges.service.ts`.
296+
- Challenge types and tracks: `GET /v6/challenge-types`, `GET /v6/challenge-tracks`. See `platform-ui/src/apps/admin/src/lib/services/challenge-management.service.ts` and `platform-ui/src/apps/review/src/lib/services/challenges.service.ts`.
297+
- Support requests: `POST /v6/challenges/support-requests`. See `platform-ui/src/libs/shared/lib/components/contact-support-form/contact-support-functions/contact-support-store/contact-support.store.ts`.
298+
- Local dev proxy maps `/v6/challenges`, `/v6/challenge-types`, `/v6/challenge-tracks`, `/v6/challenge-phases`, and `/v6/timeline-templates` to this service on port 3000. See `platform-ui/src/config/environments/local.env.ts`.
299+
300+
**community-app**
301+
302+
- Uses v6 endpoints for public challenge listing and details:
303+
- List/search challenges for dashboards and content blocks: `GET /v6/challenges?{filters}`. See `community-app/src/shared/services/dashboard.js` and `community-app/src/shared/actions/contentful.js`.
304+
- Fetch challenge details (e.g., for review opportunity details pages): `GET /v6/challenges/{id}`. See `community-app/src/shared/services/reviewOpportunities.js`.
305+
306+
**work-manager**
307+
308+
- Work Manager CRUD and metadata flows rely on v6 Challenge API:
309+
- Get challenge details: `GET /v6/challenges/{id}`. See `work-manager/src/services/challenges.js`.
310+
- Create/update/delete challenges: `POST /v6/challenges`, `PUT /v6/challenges/{id}`, `PATCH /v6/challenges/{id}`, `DELETE /v6/challenges/{id}`. See `work-manager/src/services/challenges.js`.
311+
- Manage attachments: `POST /v6/challenges/{id}/attachments`, `DELETE /v6/challenges/{id}/attachments/{attachmentId}`. See `work-manager/src/services/challenges.js`.
312+
- Default reviewers: `GET /v6/challenge/default-reviewers?typeId&trackId`. See `work-manager/src/services/challenges.js`.
313+
- Challenge metadata: `GET /v6/challenge-types`, `GET /v6/challenge-tracks`, `GET /v6/challenge-phases`, `GET /v6/challenge-timelines`. See `work-manager/src/services/challenges.js` and config under `work-manager/config/constants/*`.
314+
- API base configuration points to v6 in dev/local and v5 in prod (for compatibility):
315+
- Dev: `work-manager/config/constants/development.js`.
316+
- Local: `work-manager/config/constants/local.js`.
317+
- Prod: `work-manager/config/constants/production.js`.

0 commit comments

Comments
 (0)