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

Feature (Phase 4): Expand public API (/api/resources filters & /api/resources/[slug]), add API & Agents page + llms.txt, and community freshness/credits

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

This bundles four separate features: query filters on src/app/api/resources/route.ts, a new src/app/api/resources/[slug]/route.ts, an API docs page plus src/app/llms.txt/route.ts, and bookmark-based and contributor credits on /r/[slug]. Start by reading the existing resources route and src/lib/resources.ts, then ask the maintainer which slice to take. Done means the listed acceptance criteria pass for that slice.

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

Descrizione

enhancement

Description

Tracked from docs/2026-09-18-improvement-plan.md (§4 Phase 4.1, 4.3, 4.4). Builds on the initial pagination slice in #69 / #39.

Currently, GET /api/resources only supports ?page=&limit=. To complete Phase 4 distribution and community loops:

Scope & Implementation Plan

1. Expand Public Read API & Rate Limiting (src/app/api/resources/route.ts, src/app/api/resources/[slug]/route.ts)
  • Add query filters to GET /api/resources:
    • kind (perk, scholarship, fellowship, internship, mentorship, program)
    • category (category slug)
    • region (IN, Global)
    • deadline_before (ISO date string — returns active resources closing before date)
  • Add GET /api/resources/[slug] returning full details for a single approved resource (404 if not found).
  • Add rate limiting and Cache-Control: public, s-maxage=60, stale-while-revalidate=300 headers.
2. "API & Agents" Page and /llms.txt
  • Create src/app/api-docs/page.tsx (or /agents) documenting the free JSON API (GET /api/resources, GET /api/resources/[slug]), /deadlines.ics, and /deadlines.rss for student developers, Discord bots, and AI agents.
  • Add src/app/llms.txt/route.ts (or public/llms.txt) describing StudentStack's purpose, endpoints, categories, and presets in standard llms.txt format.
3. Community Freshness & Campus Ambassador Credits (Phase 4.3 & 4.4)
  • Aggregate "N students got this" badge: Query bookmarks where status = 'got_it' grouped by resource_id and surface the aggregate count on resource cards and /r/[slug] pages (keeping individual users private, resolving PRD open question 1).
  • Contributor credit: When a student-submitted resource (/submit, submitted_by) is approved, display an optional contributor credit on its /r/[slug] page.

Acceptance Criteria

  • GET /api/resources supports kind, category, region, and deadline_before query parameters.
  • GET /api/resources/[slug] returns a single resource by slug with cache headers.
  • /llms.txt and an "API & Agents" documentation page are live and linked from the site footer.
  • Resource cards / detail pages display aggregate "N students got this" counts when > 0, and /r/[slug] displays contributor attribution for community-submitted resources.

Files Involved

  • src/app/api/resources/route.ts
  • src/app/api/resources/route.test.ts
  • src/app/api/resources/[slug]/route.ts (new)
  • src/app/llms.txt/route.ts (new)
  • src/app/api-docs/page.tsx (new)
  • src/lib/resources.ts
Lingua principale
TypeScript
Stelle
1
Fork
6
Merge medio
23h 53m
PR unite (30g)
27

Preparare l'ambiente

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 Your-Voldemort/StudentStack

Tutte le issue di Your-Voldemort/StudentStack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.