Content: public read endpoints, Meilisearch posts index, ISR revalidation (Phase 4.4)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 42/100
Línea de trabajo
Comienza con los patrones del módulo CommunityPro.Search, el comando reindex existente y las pruebas que usan los search fakes existentes; Members/MembersTestHarness.cs muestra las convenciones del test harness del proyecto. Sigue el evento PostPublished emitido por #4 y las convenciones de agrupación de los endpoints públicos. Se considera terminado cuando se cumplen todos los criterios de aceptación, incluido el filtrado de posts no publicados, una sincronización y revalidación resistentes, códigos de error estables y la reindexación por lotes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Scope
Public read surface + search sync + frontend cache invalidation for the blog.
Endpoints (anonymous)
| Method | Path | Notes |
|---|---|---|
| GET | /posts |
published only, tag filter, paginated, newest first |
| GET | /posts/{slug} |
published only; feeds the ISR post page |
| GET | /posts/featured |
the single featured published post |
Meilisearch posts index
- Follow the
CommunityPro.Searchmodule patterns exactly (hand-rolled REST client, index+settings ensured at boot, sync-on-write handler that logs failures and never throws). - Document shape mirrors public card data only: id, slug, title, excerpt, tags, authorId, publishedAt. Searchable:
title, excerpt, tags; filterable:tags; sortable:publishedAt. Never index drafts/submitted/rejected posts — publish adds, unpublish/reject removes. - Extend the existing
reindexcommand (dotnet run -- reindex) to rebuildpostsalongsidemembersin 500-doc batches.
ISR revalidation
On PostPublished: POST {FRONTEND_URL}/api/revalidate?tag=post-{slug} with a shared secret header (REVALIDATE_SECRET — treat like any credential). Best-effort with logging; never fail the pipeline.
Error codes
content.not_found, search.unavailable (degrade like members search does)
Dependencies
Blocked by #3; consumes the PostPublished event emitted by #4.
Acceptance criteria
- Unpublished posts are unreachable via every public endpoint and absent from the index (query-level filtering, tested)
-
PostPublishedhandler upserts the search doc; failure is logged, not thrown - Revalidation call sends the secret and swallows/logs failures
-
reindexrebuilds posts (test via the existing search fakes)
Conventions (project-wide, non-negotiable)
- .NET 9, records for immutable shapes, file-scoped namespaces, primary constructors where they read well. Minimal-API endpoints grouped per module via
IEndpointModule.MapEndpoints. Result<T>(SharedKernel) instead of exception-driven control flow. Endpoint results map failures to ProblemDetails with the stable error codes listed above — the frontend keys off them.- Module owns its EF Core
DbContextmapped to its own Postgres schema. Modules never reference each other's internals — cross-module needs go through a public contract interface or an in-process domain event (IEventPublisher). - All external calls (GitHub, Stripe, Brevo, Cloudinary, Meilisearch) behind interfaces owned by the consuming module.
- Every list endpoint paginated (offset is fine). xUnit tests in
tests/CommunityPro.Tests/<Module>/following the existing harness patterns (seeMembers/MembersTestHarness.cs).
- Lenguaje dominante
- C#
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CommunityPro/community-pro-api
-
cross-cutting decision
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
cross-cutting
Dificultad 4/5 3-5 días Aptitud para principiantes 58/100
-
admin
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
admin
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
sponsorship
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Todos los issues de CommunityPro/community-pro-api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
stryker-mutator/stryker-net#3892 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MobiFlight/MobiFlight-Connector#3419 ·
Los mantenedores suelen responder en 1 día
-
`Source` with an `avares://` URI and a `#fragment` throws instead of scrolling to the anchorAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Kryptos-FR/MarkView.Avalonia#105 ·
Los mantenedores suelen responder en 1 día
-
[辞書]Abierto提案 辞書
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
microsoft/fluentui-blazor#5410 ·
Los mantenedores suelen responder en 1 día