# Story 1.1: Project Initialization & Solution Scaffold Status: review ## Story As a developer, I want the solution scaffolded with ASP.NET Core 10 Web API and Vite React TypeScript, so that the team has a working, runnable baseline with the correct project structure for all subsequent stories. ## Acceptance Criteria 1. Given the initialization commands are run (`dotnet new sln`, `dotnet new webapi`, `npm create vite@latest --template react-ts`) when the solution builds, then both `Campaign_Tracker.Server` and `campaign-tracker-client` compile without errors. 2. Given the solution is running locally, when the Vite dev server starts, then the React app loads at the configured local URL with no console errors. 3. Given the server is running, when `GET /health` is called, then it returns `200 OK` with a status payload. 4. Given the solution structure is created, when reviewed against the architecture decision, then the `.sln` file, server project folder, and client project folder exist at expected paths and `.gitignore` excludes `node_modules`, `bin`, `obj`, and `.env` files. ## Tasks / Subtasks - [x] Create baseline solution and projects (AC: 1, 4) - [x] Run `dotnet new sln -n campaign-tracker` at repo root. - [x] Run `dotnet new webapi -n Campaign_Tracker.Server -f net10.0 --use-controllers`. - [x] Add server project to solution: `dotnet sln add .\\Campaign_Tracker.Server\\Campaign_Tracker.Server.csproj`. - [x] Run `npm create vite@latest campaign-tracker-client -- --template react-ts`. - [x] Add operational baseline hardening files (AC: 4) - [x] Add/update root `.gitignore` with `.env`, `node_modules/`, `bin/`, `obj/`, and common build artifacts. - [x] Ensure folders are exactly: - `./Campaign_Tracker.Server/` - `./campaign-tracker-client/` - `./campaign-tracker.sln` - [x] Implement health endpoint (AC: 3) - [x] Ensure server exposes `GET /health` returning JSON payload and HTTP 200. - [x] Add lightweight server integration check for `/health` response shape and status. - [x] Verify local run and build paths (AC: 1, 2, 3) - [x] Validate `dotnet build` succeeds for server and solution. - [x] Validate client install and dev start (`npm install`, `npm run dev`) succeeds with no runtime console errors on first render. - [x] Capture exact run commands in README or implementation notes for handoff. ## Dev Notes - This story is the implementation foundation for all subsequent stories in Epic 1. - Do not add domain models, workflow logic, or auth integration here; keep scope to scaffold + health + runnability. - Preserve architecture separation: independent server and client lifecycle with explicit boundary. ### Technical Requirements - Backend stack: ASP.NET Core 10 Web API (`net10.0`) with controllers template option enabled. - Frontend stack: Vite + React + TypeScript (`react-ts`). - Node requirement from Vite docs: Node.js `20.19+` or `22.12+`. - Must retain ability to run server/client independently in local development. ### Architecture Compliance - Use selected starter architecture exactly as documented. - Keep immutable-legacy policy in mind: this story must not introduce data-layer assumptions that alter legacy schemas. - Keep future role-based and UX work unblocked by maintaining clean folder and naming patterns. ### File Structure Requirements - Required outputs: - `campaign-tracker.sln` - `Campaign_Tracker.Server/Campaign_Tracker.Server.csproj` - `campaign-tracker-client/package.json` - Keep server and client sibling directories at repo root. ### Testing Requirements - Minimum for this story: - Build verification (`dotnet build` and client install/run). - Health endpoint verification (`GET /health` returns `200` and JSON payload). - Smoke-level client render check (no console errors on first load). ### Project Structure Notes - This repository currently centers planning artifacts in `_bmad-output/planning-artifacts`. - Implementation outputs for stories are stored in `_bmad-output/implementation-artifacts`. - Keep story-driven changes traceable and avoid editing planning docs during implementation unless explicitly requested. ### References - Story source and ACs: `_bmad-output/planning-artifacts/epics.md` (Story 1.1 section) - Starter commands and rationale: `_bmad-output/planning-artifacts/architecture.md` (Selected Starter section) - UX/build context and component roadmap: `_bmad-output/planning-artifacts/ux-design-specification.md` (Implementation Roadmap / Component Strategy) - Vite CLI and template usage + Node version: https://vite.dev/guide/ - .NET template behavior and options (`webapi`, `--use-controllers`, `net10.0`): https://learn.microsoft.com/dotnet/core/tools/dotnet-new-sdk-templates ## Dev Agent Record ### Agent Model Used GPT-5 Codex ### Debug Log References - Sprint source file: `_bmad-output/implementation-artifacts/sprint-status.yaml` - Requirement source files: `epics.md`, `architecture.md`, `ux-design-specification.md` - Build/test commands: `dotnet build`, `dotnet test`, `npm install`, `npm run lint`, `npm run build` - Runtime smoke checks: `GET /health` integration test and Vite startup probe on `http://127.0.0.1:5173` ### Completion Notes List - Created root solution scaffold (`campaign-tracker.sln`), ASP.NET Core `net10.0` API, and Vite React TypeScript client. - Updated root `.gitignore` with required exclusions (`.env`, `node_modules/`, `bin/`, `obj/`) plus standard build artifacts. - Implemented `GET /health` in server startup pipeline returning `{ "status": "ok" }` with HTTP 200. - Added lightweight server integration test coverage for `/health` status code and payload shape. - Verified solution and server builds, server tests, client lint/build, and client dev-server startup. - Captured exact local run/test commands in root `README.md`. ### File List - `.gitignore` - `README.md` - `campaign-tracker.sln` - `Campaign_Tracker.Server/Campaign_Tracker.Server.csproj` - `Campaign_Tracker.Server/Program.cs` - `Campaign_Tracker.Server/appsettings.json` - `Campaign_Tracker.Server/appsettings.Development.json` - `Campaign_Tracker.Server/Properties/launchSettings.json` - `Campaign_Tracker.Server/Campaign_Tracker.Server.http` - `Campaign_Tracker.Server.Tests/Campaign_Tracker.Server.Tests.csproj` - `Campaign_Tracker.Server.Tests/HealthEndpointTests.cs` - `campaign-tracker-client/package.json` - `campaign-tracker-client/README.md` - `campaign-tracker-client/index.html` - `campaign-tracker-client/eslint.config.js` - `campaign-tracker-client/vite.config.ts` - `campaign-tracker-client/tsconfig.json` - `campaign-tracker-client/tsconfig.app.json` - `campaign-tracker-client/tsconfig.node.json` - `campaign-tracker-client/public/favicon.svg` - `campaign-tracker-client/public/icons.svg` - `campaign-tracker-client/src/main.tsx` - `campaign-tracker-client/src/App.tsx` - `campaign-tracker-client/src/App.css` - `campaign-tracker-client/src/index.css` - `campaign-tracker-client/src/assets/react.svg` - `campaign-tracker-client/src/assets/vite.svg` - `campaign-tracker-client/src/assets/hero.png` - `_bmad-output/implementation-artifacts/1-1-project-initialization-solution-scaffold.md` ### Change Log - 2026-05-05: Completed Story 1.1 scaffold implementation, health endpoint, integration test coverage, and local run/build verification.