fix(marketplace): review pass — add ReportDoc type, fix table formatting, renumber sections, add cost estimates
This commit is contained in:
parent
983e84e6de
commit
8b36cd9e4d
@ -156,6 +156,22 @@ interface MarketplaceCertificationDoc {
|
|||||||
} | null;
|
} | null;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── Report (user abuse/flag) ──────────────────────────────
|
||||||
|
|
||||||
|
interface MarketplaceReportDoc {
|
||||||
|
id: string; // rpt_<uuid>
|
||||||
|
listingId: string;
|
||||||
|
productId: string;
|
||||||
|
reporterId: string; // userId of reporter
|
||||||
|
reason: 'spam' | 'harmful' | 'misleading' | 'copyright' | 'inappropriate' | 'other';
|
||||||
|
details: string; // Free text explanation
|
||||||
|
status: 'open' | 'resolved' | 'dismissed';
|
||||||
|
resolvedBy: string | null; // Admin userId
|
||||||
|
resolutionNotes: string | null;
|
||||||
|
createdAt: string;
|
||||||
|
resolvedAt: string | null;
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -365,9 +381,9 @@ Each app defines what goes inside the `payload` field. The marketplace module tr
|
|||||||
## 7. Reuse Strategy — Existing Modules
|
## 7. Reuse Strategy — Existing Modules
|
||||||
|
|
||||||
| Existing Module | How Marketplace Reuses It |
|
| Existing Module | How Marketplace Reuses It |
|
||||||
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
|
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| **comments** | **Decision: keep reviews separate.** Reviews are structurally different (star rating, verified install, helpful count). Comments remain tracker-only. |
|
| **comments** | **Decision: keep reviews separate.** Reviews are structurally different (star rating, verified install, helpful count). Comments remain tracker-only. |
|
||||||
| **votes** | Generalize to support `entityType: 'tracker_item' | 'marketplace_listing'`. Same toggle pattern. |
|
| **votes** | Generalize to support `entityType: 'tracker_item' \| 'marketplace_listing'`. Same toggle pattern. |
|
||||||
| **blob** | Template screenshots upload via existing SAS token endpoints. New container: `marketplace_assets`. |
|
| **blob** | Template screenshots upload via existing SAS token endpoints. New container: `marketplace_assets`. |
|
||||||
| **stripe** | Paid template purchases via existing Stripe integration. New `line_item` type for marketplace. |
|
| **stripe** | Paid template purchases via existing Stripe integration. New `line_item` type for marketplace. |
|
||||||
| **flags** | Feature-flag new marketplace features per product. |
|
| **flags** | Feature-flag new marketplace features per product. |
|
||||||
@ -409,7 +425,7 @@ New module: `services/platform-service/src/modules/marketplace/`
|
|||||||
|
|
||||||
### Phase 4 — Discovery and Analytics (Sprint 5)
|
### Phase 4 — Discovery and Analytics (Sprint 5)
|
||||||
|
|
||||||
- Trending algorithm (installs _ recency _ rating)
|
- Trending algorithm (installs x recency x rating)
|
||||||
- Featured curation (admin)
|
- Featured curation (admin)
|
||||||
- Author analytics dashboard
|
- Author analytics dashboard
|
||||||
- Recommendation engine ("Users who installed X also installed Y")
|
- Recommendation engine ("Users who installed X also installed Y")
|
||||||
@ -424,6 +440,7 @@ New module: `services/platform-service/src/modules/marketplace/`
|
|||||||
| `marketplace_reviews` | ~20,000 | Low |
|
| `marketplace_reviews` | ~20,000 | Low |
|
||||||
| `marketplace_installs` | ~100,000 | Medium (high write volume) |
|
| `marketplace_installs` | ~100,000 | Medium (high write volume) |
|
||||||
| `marketplace_certifications` | ~10,000 | Low |
|
| `marketplace_certifications` | ~10,000 | Low |
|
||||||
|
| `marketplace_reports` | ~2,000 | Low |
|
||||||
|
|
||||||
Serverless Cosmos DB: ~$0.25/100K RU. Total estimated cost: **<$5/month** at launch scale.
|
Serverless Cosmos DB: ~$0.25/100K RU. Total estimated cost: **<$5/month** at launch scale.
|
||||||
|
|
||||||
@ -431,7 +448,7 @@ Additional blob container needed: `marketplace_assets` (screenshots, preview ima
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 9.1 Rate Limiting
|
## 10. Rate Limiting
|
||||||
|
|
||||||
All public marketplace endpoints inherit the rate limiting from the `public` module pattern:
|
All public marketplace endpoints inherit the rate limiting from the `public` module pattern:
|
||||||
|
|
||||||
@ -445,7 +462,7 @@ All public marketplace endpoints inherit the rate limiting from the `public` mod
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 9.2 Versioning and Update Workflow
|
## 11. Versioning and Update Workflow
|
||||||
|
|
||||||
When an author updates a published listing:
|
When an author updates a published listing:
|
||||||
|
|
||||||
@ -459,7 +476,7 @@ When an author updates a published listing:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 10. Dashboard UI (Admin + Tracker)
|
## 12. Dashboard UI (Admin + Tracker)
|
||||||
|
|
||||||
### Admin Dashboard — Marketplace Management
|
### Admin Dashboard — Marketplace Management
|
||||||
|
|
||||||
@ -486,7 +503,7 @@ Each app builds its own browse UI consuming the public API:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 11. Cross-App Benefits Summary
|
## 13. Cross-App Benefits Summary
|
||||||
|
|
||||||
| App | Without Generic Marketplace | With Generic Marketplace |
|
| App | Without Generic Marketplace | With Generic Marketplace |
|
||||||
| -------------- | --------------------------------------------- | ------------------------------------------------ |
|
| -------------- | --------------------------------------------- | ------------------------------------------------ |
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user