6. Final Capstone Project

Capstone Project: Typed Issue & Sprint Board App

Combine closures, immutable state reducers, event delegation, XSS-safe DOM rendering, localStorage persistence, and TypeScript architecture into an interactive Issue & Sprint Board.

5 min readUpdated 2026-12-01
In This Lesson
  • Combine pure state reducers, event delegation, search filtering, and localStorage in one web app
  • Render dynamic user-created cards safely with textContent (zero XSS risk)
  • Structure a complete multi-file TypeScript + Vite + Vitest project locally

Congratulations on reaching the final capstone of Modern JavaScript, TypeScript & Async Web! Let's combine everything you mastered—immutable state transitions, ?? defaults, event delegation (closest), XSS-safe textContent rendering, localStorage persistence, and TypeScript architecture—into an interactive Issue & Sprint Board.

1. Live Interactive Issue & Sprint Board (Run in Browser)

Click Run & Preview to add issues, filter by status (All, Todo, Doing, Done), search in real time, cycle statuses with one delegated click handler, and persist across reloads via localStorage:

HTML / CSS / JSCapstone App: Interactive Issue & Sprint Board
Live Browser Preview

2. Full Local TypeScript + Vite + Vitest Structure

For your local portfolio project (npm create vite@latest issue-board -- --template vanilla-ts), split the types, pure reducer, and tests cleanly:

text
issue-board/
├── src/
│   ├── types.ts        # Issue, Priority, IssueStatus, BoardAction union
│   ├── reducer.ts      # Pure boardReducer + exhaustive never check
│   └── reducer.test.ts # Vitest assertions
└── tsconfig.json       # "strict": true

src/types.ts + src/reducer.ts

ts
export type IssueStatus = "todo" | "doing" | "done";
export type Priority = "low" | "medium" | "high";

export interface Issue {
  readonly id: string;
  title: string;
  priority: Priority;
  status: IssueStatus;
}

export type BoardAction =
  | { type: "ADD"; id: string; title: string; priority: Priority }
  | { type: "CYCLE"; id: string }
  | { type: "DELETE"; id: string };

const NEXT_STATUS: Record<IssueStatus, IssueStatus> = {
  todo: "doing",
  doing: "done",
  done: "todo",
};

export function boardReducer(issues: readonly Issue[], action: BoardAction): Issue[] {
  switch (action.type) {
    case "ADD": {
      const title = action.title.trim();
      if (!title) return [...issues];
      return [...issues, { id: action.id, title, priority: action.priority, status: "todo" }];
    }
    case "CYCLE":
      return issues.map((it) =>
        it.id === action.id ? { ...it, status: NEXT_STATUS[it.status] } : it
      );
    case "DELETE":
      return issues.filter((it) => it.id !== action.id);
    default: {
      const _exhaustive: never = action;
      return _exhaustive;
    }
  }
}

Capstone Checklist & Next Steps

Modern JS & TypeScript Capstone Checklist

0/4 done

Take the Final Assessment next to test your Modern JavaScript & TypeScript mastery and earn your certificate!