Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Content: public read endpoints, Meilisearch posts index, ISR revalidation (Phase 4.4)

Aperta
#5 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
csharp, postgres

Direzione di ricerca

Inizia dai pattern del modulo CommunityPro.Search, dal comando reindex esistente e dai test che usano gli search fake esistenti; Members/MembersTestHarness.cs mostra le convenzioni del test harness del progetto. Traccia l’evento PostPublished emesso da #4 e le convenzioni di raggruppamento degli endpoint pubblici. Il lavoro è completato quando tutti i criteri di accettazione sono soddisfatti, inclusi il filtraggio dei post non pubblicati, una sincronizzazione e una rivalidazione resilienti, codici di errore stabili e la reindicizzazione in batch.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

content

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.Search module 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 reindex command (dotnet run -- reindex) to rebuild posts alongside members in 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)
  • PostPublished handler upserts the search doc; failure is logged, not thrown
  • Revalidation call sends the secret and swallows/logs failures
  • reindex rebuilds 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 DbContext mapped 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 (see Members/MembersTestHarness.cs).
Lingua principale
C#
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CommunityPro/community-pro-api

Tutte le issue di CommunityPro/community-pro-api

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.