o3ํ•œํ…Œ LLM WebDev ๋Šฅ๋ ฅ ํ‰๊ฐ€์šฉ ๋ฌธ์ œ ๋งŒ๋“ค์–ด๋‹ฌ๋ผํ•˜๊ณ  ๋„ฃ์—ˆ๋Š”๋ฐ opus 4๋Š” ์‹คํŒจํ•˜๊ณ  ์–˜๋Š” ์„ฑ๊ณตํ–ˆ๊ณ  ๊ฝค ์ž˜๋งŒ๋“ค์—ˆ๋…ธ




๋ฌธ์ œ ์ „๋ฌธ:

Objective
Design, implement, and document a full-stack web applicationโ€”โ€œWorldWatchโ€โ€”that lets users explore real-time, AI-summarized news from around the globe. The project must demonstrate mastery across modern front-end, back-end, DevOps, and security practices while showcasing an LLMโ€™s reasoning and code-generation skills.1

Functional Requirements
AreaRequirement
Data Ingestionโ€ข Poll the freely available News API every 10 min for the 20 latest English-language articles.
โ€ข De-duplicate by canonical URL and persist raw JSON in a database.
AI Summariesโ€ข For each article, generate a 150-word abstractive summary and a 3-bullet โ€œkey takeawaysโ€ list using your own OpenAI-compatible completion endpoint.
โ€ข Cache summaries; regenerate only if the original article text changes.
REST & GraphQLโ€ข Expose identical functionality through both a REST layer (/api/v1/โ€ฆ) and a GraphQL endpoint (/graphql).
Web UI (PWA)โ€ข React 18 + TypeScript + Vite.
โ€ข Infinite scrolling, dark-mode toggle, and search-as-you-type filtering.
โ€ข Offline support (service worker + IndexedDB).
Real-Time Updatesโ€ข Broadcast new or updated articles to all open clients via WebSockets; the UI must auto-insert them without a hard refresh.
Accessibility & i18nโ€ข Meet WCAG 2.2 AA contrast and keyboard-nav guidelines.
โ€ข Provide an i18n scaffold (English + one additional locale of your choice).
Authโ€ข Implement Google OAuth 2.0; anonymous read-only users see truncated summaries, logged-in users see full content.
Admin Consoleโ€ข Password-protected /admin route to view ingestion logs, force refresh, and toggle feature flags stored in Redis.
Rate Limiting & Cachingโ€ข Apply per-IP rate limiting (Sliding Window) to public APIs.
โ€ข Use HTTP conditional requests (ETag, Last-Modified) and CDN-friendly headers.
Testingโ€ข โ‰ฅ 80 % combined branch coverage across unit, integration, and E2E (Playwright or Cypress) suites.
CI/CDโ€ข GitHub Actions pipeline: lint, test, build Docker image, push to registry, deploy to staging on every main-branch push.
Deploymentโ€ข K8s (Kind) manifests plus Helm chart; one-command local spin-up via make dev.
Observabilityโ€ข Structured JSON logging (w/ trace IDs), Prometheus metrics, and OpenTelemetry distributed traces spanning the ingestion job, API, and WebSocket gateway.
Security Hardeningโ€ข OWASP Top 10 mitigations: CSP, CSRF via SameSite cookies, param binding, prepared statements, secrets in Vault, etc.
Documentationโ€ข README.md with architecture diagram, setup steps, and a 500-word โ€œdesign trade-offsโ€ section.
Non-Functional Constraints

  • Language & Framework Freedom: You may choose any back-end stack (e.g., FastAPI, NestJS, Go Fiber) as long as TypeScript is used on the front end.

  • Database: PostgreSQL 15; use a migration tool (e.g., Prisma, Flyway).

  • Containerization: Everything must run in Docker; the project should also support docker compose up for quick local evaluation.

  • Compute Budget: The full system (ingestor + API + front end) must idle on โ‰ค 1 vCPU / 1 GB RAM.

  • Lines of Code: โ‰ค 5 000 excluding generated files and test fixtures.


    ํ•œ๊ธ€ ์š”์•ฝ:

    ๋ชฉํ‘œ
    โ€˜WorldWatchโ€™๋ผ๋Š” ํ’€์Šคํƒ ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์„ค๊ณ„ยท๊ตฌํ˜„ยท๋ฌธ์„œํ™”ํ•ฉ๋‹ˆ๋‹ค. ์ด ์•ฑ์€ ์ „ ์„ธ๊ณ„ ์ตœ์‹  ๋‰ด์Šค(News API 10๋ถ„ ์ฃผ๊ธฐ ์ˆ˜์ง‘)๋ฅผ AI๋กœ ์š”์•ฝํ•˜์—ฌ ์‹ค์‹œ๊ฐ„ยท์˜คํ”„๋ผ์ธ์—์„œ๋„ ์ œ๊ณตํ•ด์•ผ ํ•˜๋ฉฐ, ๊ณผ์ œ๋Š” LLM์˜ ์„ค๊ณ„ยท์ฝ”๋“œ ์ƒ์„ฑยทDevOpsยท๋ณด์•ˆ ๋Šฅ๋ ฅ์„ ์ข…ํ•ฉ์ ์œผ๋กœ ์ธก์ •ํ•ฉ๋‹ˆ๋‹ค.

    ์ฃผ์š” ๊ธฐ๋Šฅ ์š”๊ตฌ ์‚ฌํ•ญ
    1. ๋ฐ์ดํ„ฐ ์ˆ˜์ง‘ & ์ €์žฅ

      • News API์—์„œ ์ตœ๊ทผ ์˜๋ฌธ ๊ธฐ์‚ฌ 20๊ฑด์„ 10๋ถ„๋งˆ๋‹ค ํฌ๋กค๋ง โ†’ URL ์ค‘๋ณต ์ œ๊ฑฐ ํ›„ PostgreSQL์— ์›๋ณธ JSON ์ €์žฅ.

    2. AI ์š”์•ฝ

      • ๊ธฐ์‚ฌ๋‹น 150์ž(๋‹จ์–ด ๊ธฐ์ค€) ์ถ”์ƒ์  ์š”์•ฝ + 3๊ฐœ ํ•ต์‹ฌ ํฌ์ธํŠธ ์ƒ์„ฑ.

      • ๊ธฐ์‚ฌ ๋‚ด์šฉ์ด ๋ฐ”๋€Œ์ง€ ์•Š์œผ๋ฉด ์บ์‹œ ์žฌ์‚ฌ์šฉ.

    3. API

      • ๋™์ผ ๊ธฐ๋Šฅ์„ REST(/api/v1/...)์™€ GraphQL(/graphql)๋กœ ๋ชจ๋‘ ๋…ธ์ถœ.

    4. ํ”„๋ŸฐํŠธ์—”๋“œ(PWA)

      • React 18 + TypeScript + Vite.

      • ๋ฌดํ•œ ์Šคํฌ๋กค, ๋‹คํฌ ๋ชจ๋“œ, ์‹ค์‹œ๊ฐ„ ๊ฒ€์ƒ‰, ์˜คํ”„๋ผ์ธ(IndexedDB + Service Worker) ์ง€์›.

    5. ์‹ค์‹œ๊ฐ„ ์—…๋ฐ์ดํŠธ

      • WebSocket์œผ๋กœ ์ƒˆ ๊ธฐ์‚ฌ ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ โ†’ ํด๋ผ์ด์–ธํŠธ๋Š” ์ƒˆ ์นด๋“œ ์ฆ‰์‹œ ์‚ฝ์ž….

    6. ์ ‘๊ทผ์„ฑยท๋‹ค๊ตญ์–ด

      • WCAG 2.2 AA ์ถฉ์กฑ, ํ‚ค๋ณด๋“œ ๋‚ด๋น„๊ฒŒ์ด์…˜ ๊ฐ€๋Šฅ.

      • i18n ์Šค์บํด๋”ฉ(์˜์–ด + ์ถ”๊ฐ€ 1๊ฐœ ์–ธ์–ด).

    7. ์ธ์ฆ

      • Google OAuth 2.0. ๋น„๋กœ๊ทธ์ธ ์‚ฌ์šฉ์ž๋Š” ์š”์•ฝ ์ผ๋ถ€๋งŒ, ๋กœ๊ทธ์ธ ์‚ฌ์šฉ์ž๋Š” ์ „๋ฌธ ์—ด๋žŒ.

    8. ๊ด€๋ฆฌ ์ฝ˜์†”

      • /admin ๋ณดํ˜ธ ๋ผ์šฐํŠธ: ์ˆ˜์ง‘ ๋กœ๊ทธ, ๊ฐ•์ œ ์ƒˆ๋กœ๊ณ ์นจ, Redis ๊ธฐ๋ฐ˜ ๊ธฐ๋Šฅ ํ”Œ๋ž˜๊ทธ ํ† ๊ธ€.

    9. ์„ฑ๋Šฅยท๋ณด์•ˆ

      • IP๋‹น ์Šฌ๋ผ์ด๋”ฉ ์œˆ๋„์šฐ Rate-limit, ETagยทCDN ์บ์‹ฑ, CSPยทCSRFยทPrepared Statement ๋“ฑ OWASP Top 10 ๋Œ€์‘.

    10. ํ…Œ์ŠคํŠธ & CI/CD

      • ๋‹จ์œ„ยทํ†ตํ•ฉยทE2E ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€ 80 % ์ด์ƒ.

      • GitHub Actions: ๋ฆฐํŠธยทํ…Œ์ŠคํŠธยทDocker ๋นŒ๋“œ โ†’ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํ‘ธ์‹œ โ†’ ์Šคํ…Œ์ด์ง• ๋ฐฐํฌ.

    11. ๋ฐฐํฌยท์šด์˜

      • ๋ชจ๋“  ์ปดํฌ๋„ŒํŠธ Dockerize, docker compose up ์ง€์›.

      • Kind(K8s) ๋งค๋‹ˆํŽ˜์ŠคํŠธ + Helm ์ฐจํŠธ, make dev๋กœ ๋กœ์ปฌ ์ผ๋ฐœ ๊ธฐ๋™.

      • ๋กœ๊ทธ(๊ตฌ์กฐํ™” JSON + Trace ID), Prometheus ๋ฉ”ํŠธ๋ฆญ, OpenTelemetry ๋ถ„์‚ฐ ์ถ”์ .

    ๋น„๊ธฐ๋Šฅ ์ œ์•ฝ

    • ํ”„๋ŸฐํŠธ๋Š” ๋ฐ˜๋“œ์‹œ TypeScript, ๋ฐฑ์—”๋“œ๋Š” ์ž์œ (FastAPI/NestJS/Go ๋“ฑ).

    • PostgreSQL 15, ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ํˆด ํ•„์ˆ˜.

    • ์ „์ฒด ์‹œ์Šคํ…œ ์œ ํœด ์‹œ โ‰ค 1 vCPU / 1 GB RAM, ์ฝ”๋“œ 5 000ํ–‰ ์ดํ•˜(์ƒ์„ฑ ํŒŒ์ผยทํ…Œ์ŠคํŠธ ํ”ฝ์Šค์ฒ˜ ์ œ์™ธ).