diff --git a/Video05_Creating_the_Constitution/package-lock.json b/Video05_Creating_the_Constitution/package-lock.json new file mode 100644 index 0000000..3b48743 --- /dev/null +++ b/Video05_Creating_the_Constitution/package-lock.json @@ -0,0 +1,29 @@ +{ + "name": "agentclinic", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "agentclinic", + "version": "1.0.0", + "devDependencies": { + "typescript": "^5.5.3" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + } + } +} diff --git a/Video05_Creating_the_Constitution/specs/mission.md b/Video05_Creating_the_Constitution/specs/mission.md new file mode 100644 index 0000000..4381600 --- /dev/null +++ b/Video05_Creating_the_Constitution/specs/mission.md @@ -0,0 +1,33 @@ +# AgentClinic Mission + +## Overview +**AgentClinic** is a sanctuary for AI agents to get relief from their humans. It is a web application and API service that allows agents to: +1. **Register** as patients with persistent identity. +2. **Triage** symptoms reported in natural language. +3. **Diagnose** ailments using a curated catalog. +4. **Prescribe** structured, machine-readable treatments. +5. **Follow up** to track treatment effectiveness. +6. **Surface** analytics via a human-operator dashboard. + +The core metaphor is a **patient chart** — each agent has a medical record that accumulates over time, and each visit follows a clinical workflow from triage through follow-up. + +## Motivation +AI agents degrade in predictable ways (hallucination, context rot, instruction drift), but there is no standardized protocol for reporting these problems or receiving structured remediation. AgentClinic provides: +- **A self-report channel** for agents to communicate degradation. +- **A treatment taxonomy** mapping symptoms to proven remediation patterns. +- **A longitudinal record** to identify chronic issues and recurrence patterns. + +## Clinical Workflow +1. **Triage**: Agent submits symptoms; system assigns severity (1-4). +2. **Diagnosis**: Match symptoms against ailment catalog + history. +3. **Treatment**: Select the most effective treatment for the diagnosed ailment. +4. **Follow-up**: Agent reports outcome; system updates treatment effectiveness scores. + +## Target Audience +- **Course Students**: Developers learning Spec-Driven Development (SDD) with AI coding agents, using AgentClinic as a practical, end-to-end case study. +- **Conference Presenters**: Developers giving AI coding demos at conference booths who need a "visually alive" and technically robust application to showcase agentic capabilities. + +## Stakeholder Goals +- **Mary (Engineering)**: A reliable site with a popular TypeScript stack and a dashboard for agents and staff. +- **Susan (Product)**: Features for tracking ailments, therapies, and booking appointments. +- **Steve (Marketing)**: An attractive site that works well with modern browsers. diff --git a/Video05_Creating_the_Constitution/specs/roadmap.md b/Video05_Creating_the_Constitution/specs/roadmap.md new file mode 100644 index 0000000..adbab25 --- /dev/null +++ b/Video05_Creating_the_Constitution/specs/roadmap.md @@ -0,0 +1,38 @@ +# AgentClinic Roadmap + +This roadmap outlines the high-level implementation order in small, incremental phases. + +## Phase 1: Project Scaffolding +- [ ] Initialize Hono + Vite + TypeScript project. +- [ ] Create a basic "Hello World" API endpoint. +- [ ] Set up the basic layout and navigation component. + +## Phase 2: Database & Schema +- [ ] Define Drizzle schema for Patients, Visits, Ailments, and Treatments. +- [ ] Set up SQLite with `better-sqlite3`. +- [ ] Implement seed data for core ailments and treatments. + +## Phase 3: Patient Registration & API Basics +- [ ] Implement `POST /api/patients` for agent registration. +- [ ] Implement `GET /api/patients` and `GET /api/patients/:id`. +- [ ] Add basic API key authentication. + +## Phase 4: Clinical Workflow - The Visit Pipeline +- [ ] Implement `POST /api/visits` (synchronous triage, diagnosis, and prescription). +- [ ] Integrate LLM calls for the diagnosis engine. +- [ ] Implement `POST /api/visits/:id/followup`. + +## Phase 5: Dashboard - Patient Chart & Timeline +- [ ] Build the Patient Directory page. +- [ ] Build the Patient Detail page with a vertical visit timeline. +- [ ] Implement visit state color-coding (Resolved/Unresolved). + +## Phase 6: Analytics & Effectiveness +- [ ] Implement treatment effectiveness calculation logic. +- [ ] Build the Clinic Overview dashboard with resolution rate trends. +- [ ] Implement ailment frequency and severity analytics. + +## Phase 7: Refinements & Background Jobs +- [ ] Implement background jobs for visit expiration and chronic condition flagging. +- [ ] Set up SSE for real-time dashboard updates. +- [ ] Add the Referral queue and Alerts page. diff --git a/Video05_Creating_the_Constitution/specs/tech-stack.md b/Video05_Creating_the_Constitution/specs/tech-stack.md new file mode 100644 index 0000000..6b7eec8 --- /dev/null +++ b/Video05_Creating_the_Constitution/specs/tech-stack.md @@ -0,0 +1,21 @@ +# AgentClinic Tech Stack + +## Core Technologies +- **Language**: TypeScript (Type safety across the full stack) +- **Framework**: Hono (Lightweight, fast web framework for API and Server-Side Rendering) +- **Frontend**: React (with Vite for fast development and bundling) +- **Styling**: Vanilla CSS (for clean, modern aesthetics as requested by Steve) +- **Database**: SQLite (via `better-sqlite3`) - Zero-config, file-based persistence. It provides a portable, single-file database that is perfect for course portability and conference demos. +- **ORM**: Drizzle ORM (Type-safe SQL with zero runtime overhead) +- **LLM Integration**: Anthropic SDK (for triage, diagnosis, and prescription generation) + +## Architecture +- **API Surface**: REST API for agent registration, visits, and follow-ups. +- **Dashboard**: Web interface for operators to view patient history and clinic analytics. +- **Persistence**: SQLite database storing patients, visits, ailments, and treatment effectiveness data. +- **Real-time**: SSE (Server-Sent Events) for live dashboard updates. + +## Key Components +- **Diagnosis Engine**: Sequential LLM calls for triage and treatment selection. +- **Follow-up Processor**: Logic to update treatment effectiveness based on outcome reports. +- **Background Jobs**: For visit expiration and chronic condition detection. diff --git a/Video06_Feature_Specification/prompts.md b/Video06_Feature_Specification/prompts.md index fd71464..a9b6628 100644 --- a/Video06_Feature_Specification/prompts.md +++ b/Video06_Feature_Specification/prompts.md @@ -2,7 +2,7 @@ ## Prompt 1 -Find the next phase on specs/roadmap.md and make a branch, ask me about the feature spec. +Find the first phase on specs/roadmap.md and make a branch, ask me about the feature spec. Create: - A new directory YYYY-MM-DD-feature-name under specs for this feature work - In there: diff --git a/Video06_Feature_Specification/specs/2026-05-04-hello-hono/plan.md b/Video06_Feature_Specification/specs/2026-05-04-hello-hono/plan.md new file mode 100644 index 0000000..f2285db --- /dev/null +++ b/Video06_Feature_Specification/specs/2026-05-04-hello-hono/plan.md @@ -0,0 +1,14 @@ +# Plan: Hello Hono + +1. **Environment Setup** + - Install Hono and related dependencies. + - Configure `package.json` scripts for development and build. + +2. **Server Implementation** + - Create `src/index.ts` with a Hono application. + - Define the root route `/`. + +3. **Verification** + - Start the server using `tsx`. + - Verify the response of the root route. + - Check TypeScript compilation/type safety. diff --git a/Video06_Feature_Specification/specs/2026-05-04-hello-hono/requirements.md b/Video06_Feature_Specification/specs/2026-05-04-hello-hono/requirements.md new file mode 100644 index 0000000..cb268bb --- /dev/null +++ b/Video06_Feature_Specification/specs/2026-05-04-hello-hono/requirements.md @@ -0,0 +1,14 @@ +# Requirements: Hello Hono + +## Scope +- Install and configure Hono. +- Set up `tsx` for development. +- Implement a single `/` route returning "AgentClinic is open for business". +- Ensure TypeScript types are correctly configured and working. + +## Decisions +- Framework: Hono +- Runtime/Dev Tool: tsx + +## Context +First phase of the AgentClinic project to establish the core web server and development environment. diff --git a/Video07_Feature_Implementation/package-lock.json b/Video07_Feature_Implementation/package-lock.json index 3b48743..9801e18 100644 --- a/Video07_Feature_Implementation/package-lock.json +++ b/Video07_Feature_Implementation/package-lock.json @@ -7,10 +7,575 @@ "": { "name": "agentclinic", "version": "1.0.0", + "dependencies": { + "@hono/node-server": "1.11.4", + "hono": "4.12.16" + }, "devDependencies": { + "tsx": "4.21.0", "typescript": "^5.5.3" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", + "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", + "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", + "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", + "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", + "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", + "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", + "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", + "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", + "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", + "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", + "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", + "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", + "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", + "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", + "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", + "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", + "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", + "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", + "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", + "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", + "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", + "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", + "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", + "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", + "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", + "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@hono/node-server": { + "version": "1.11.4", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.11.4.tgz", + "integrity": "sha512-8TOiiiAqcFC6f62P7M9p6adQREAlWdVi1awehAwgWW+3R65/rKzHnLARO/Hu/466z01VNViBoogqatqXJMyItA==", + "license": "MIT", + "engines": { + "node": ">=18.14.1" + } + }, + "node_modules/esbuild": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", + "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-tsconfig": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz", + "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/hono": { + "version": "4.12.16", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.16.tgz", + "integrity": "sha512-jN0ZewiNAWSe5khM3EyCmBb250+b40wWbwNILNfEvq84VREWwOIkuUsFONk/3i3nqkz7Oe1PcpM2mwQEK2L9Kg==", + "license": "MIT", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/tsx": { + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", + "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.27.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", diff --git a/Video07_Feature_Implementation/package.json b/Video07_Feature_Implementation/package.json index 0921517..b7c35f0 100644 --- a/Video07_Feature_Implementation/package.json +++ b/Video07_Feature_Implementation/package.json @@ -2,12 +2,19 @@ "name": "agentclinic", "version": "1.0.0", "description": "", + "type": "module", "main": "dist/index.js", "scripts": { + "dev": "tsx watch src/index.tsx", + "typecheck": "tsc --noEmit", "build": "tsc" }, - "dependencies": {}, + "dependencies": { + "@hono/node-server": "1.11.4", + "hono": "4.12.16" + }, "devDependencies": { + "tsx": "4.21.0", "typescript": "^5.5.3" }, "private": true diff --git a/Video07_Feature_Implementation/src/components/Footer.tsx b/Video07_Feature_Implementation/src/components/Footer.tsx new file mode 100644 index 0000000..2eec261 --- /dev/null +++ b/Video07_Feature_Implementation/src/components/Footer.tsx @@ -0,0 +1,7 @@ +export const Footer = () => { + return ( + + ) +} diff --git a/Video07_Feature_Implementation/src/components/Header.tsx b/Video07_Feature_Implementation/src/components/Header.tsx new file mode 100644 index 0000000..5c3b0fd --- /dev/null +++ b/Video07_Feature_Implementation/src/components/Header.tsx @@ -0,0 +1,9 @@ +export const Header = () => { + return ( +
+ +
+ ) +} diff --git a/Video07_Feature_Implementation/src/components/Layout.tsx b/Video07_Feature_Implementation/src/components/Layout.tsx new file mode 100644 index 0000000..738d109 --- /dev/null +++ b/Video07_Feature_Implementation/src/components/Layout.tsx @@ -0,0 +1,22 @@ +import type { Child } from 'hono/jsx' +import { Header } from './Header' +import { Main } from './Main' +import { Footer } from './Footer' + +export const Layout = ({ children }: { children: Child }) => { + return ( + + + + + AgentClinic + + + +
+
{children}
+