FlyRank AI Engineering Internship Capstone Submission
Live Web Application: https://capstone-project-final-two.vercel.app/
GitHub Repository: github.com/maaz2417/capstone-project
A production-ready, highly accessible, and resilience-tested Next.js web application integrating Claude 3.5 Sonnet token streaming, Generative UI tool execution, dynamic workload analytics, and motion-choreographed UI components.
Modern software teams struggle with prioritization fatigue, ambiguous workload balances, and brittle web interfaces that break when AI model API streams fail or rate-limit. Standard AI chatbots return unstructured markdown text, forcing engineers to manually transcribe advice into actionable tasks.
TaskFlow is designed for technical leads, engineering managers, and individual developers. It provides an intuitive task management workspace paired with a live Claude 3.5 Sonnet AI Copilot. Rather than returning raw text, Claude executes structured tool calls that render interactive Generative UI score cards and workload distribution charts.
This project demonstrates the complete engineering spectrum learned over the 8-week internship: WCAG 2.1 AA accessibility, Framer Motion spring physics with zero layout thrash, structured LLM stream resilience with sabotage error testing, Vitest/Playwright automated test suites, and GitHub Actions CI automation.
TaskFlow features 6 fully functional, production-ready pages:
| Route | Page Name | Primary Capability | Key Components |
|---|---|---|---|
/ |
Task Dashboard | Task CRUD, status toggling, search query, priority & category filtering, and modal task creation. | <SmartActionButton />, Filter Pills, Status Checkboxes |
/chat |
AI Streaming Chat | Live token-by-token streaming with Claude 3.5 Sonnet, prompt chips, and sabotage error triggers. | <StreamingChat />, <PriorityScoreCard />, <WorkloadChartCard /> |
/stats |
Workload Analytics | Live velocity meters, hours estimation, SVG category distribution bars, and priority impact matrix. | Workload Metrics, SVG Category Bar Charts |
/settings |
Workspace Settings | Theme selector (Dark/Light/System), AI priority threshold slider, export task JSON backup, and API connection status. | Theme Toggles, JSON Backup Exporter |
/health |
System Diagnostics | Live API route ping (/api/health), latency benchmark (ms), Vitest metrics, Playwright status, and Sabotage test controls. |
Diagnostic Cards, Sabotage Trigger Pills |
/tasks/[id] |
Task Detail View | Dedicated task inspection, inline task edit modal, deletion, and quick "Analyze with Claude AI" trigger. | Task Details, Edit Modal |
capstone-project/
βββ frontend/
β βββ src/
β β βββ app/
β β β βββ layout.tsx # Root layout wrapped in TasksProvider
β β β βββ page.tsx # Task Dashboard (CRUD, search, filters)
β β β βββ chat/page.tsx # AI Chat & Generative UI Tool Execution
β β β βββ stats/page.tsx # Productivity & Workload Analytics
β β β βββ settings/page.tsx # Preferences, Theme & Data Export
β β β βββ health/page.tsx # System Health & Sabotage Control Panel
β β β βββ tasks/[id]/page.tsx # Detailed Task Inspection & Edit View
β β β βββ api/
β β β βββ chat/route.ts # Claude 3.5 Sonnet streaming & tool calls
β β β βββ health/route.ts # Route health ping endpoint
β β βββ components/
β β β βββ ui/
β β β β βββ smart-action-button.tsx # 5-state motion button lifecycle
β β β βββ chat/
β β β β βββ streaming-chat.tsx # Vercel AI SDK chat container
β β β β βββ motion-showcase.tsx # Interactive reviewer button showcase
β β β β βββ tools/
β β β β βββ priority-score-card.tsx # Generative UI priority card
β β β β βββ workload-chart-card.tsx # Generative UI SVG workload chart
β β β βββ nav-bar.tsx # Sticky header navigation bar
β β βββ lib/
β β βββ tasks-store.tsx # Shared Task Data Context & LocalStorage
β β βββ ai/ # AI system prompts and Zod tool schemas
β βββ e2e/
β β βββ chat-flow.spec.ts # Playwright cross-browser E2E suite
β βββ vitest.config.ts # Vitest JSDOM testing configuration
β βββ playwright.config.ts # Playwright cross-browser configuration
βββ .github/
β βββ workflows/ci.yml # GitHub Actions CI workflow
βββ vercel.json # Vercel deployment configuration
- Provider: Vercel AI SDK (
ai/reactuseChat) + Anthropic Claude 3.5 Sonnet (@ai-sdk/anthropic). - Streaming Handlers: Uses Server-Sent Events (SSE) to render incoming text token-by-token with zero lag.
Claude is equipped with two custom Zod-validated tools defined in src/lib/ai/tools.ts:
score_task_priority: Evaluates task parameters and returns a score (0β100), Eisenhower Matrix quadrant, effort-to-impact ratio, and sprint allocation strategy.audit_workload_distribution: Analyzes active category workloads and returns total estimated hours, SVG progress bar data, and burnout risk alerts.
The <SmartActionButton /> manages a 5-state lifecycle:
idle: Resting state with gradient accent glow and label.hover / focus:scale: 1.02, y: -1transform + visible focus ring (focus-visible:ring-2).loading: Label slides down (y: 10,opacity: 0), active spinner enters (y: 0,opacity: 1) without layout shift.success: Checkmark badge pop with emerald green transition (bg-emerald-500), auto-resetting after 1.8s.error: 8-frame horizontal error shake with red alert badge (bg-red-500).
- Spring Physics:
stiffness: 400, damping: 25(cubic-bezier(0.16, 1, 0.3, 1)). Animates compositor-friendly properties only (transform&opacity). - Reduced Motion: Respects
prefers-reduced-motionviauseReducedMotion(). When enabled, physical shake keyframes are safely bypassed while visual color badges remain clear.
npx vitest runstreaming-chat.test.tsx: Onboarding empty state, message history, sabotage test toggles, and stream error retry recovery.priority-score-card.test.tsx: Generative UI score card rendering, priority tier badges, Eisenhower matrix quadrants, and return ratios.smart-action-button.test.tsx: 5 lifecycle states (idle,loading,success,error,disabled) and user click events.
npx playwright test- Mocks AI streaming routes for fast, deterministic E2E execution.
- Tests primary onboarding flow, prompt chip selection, motion showcase state morphs, and sabotage error recovery (
500 Err-> retry).
- Lighthouse Performance Score: 95+ on Mobile & Desktop.
- WCAG 2.1 AA Compliance:
- Accessible ARIA labels (
aria-label,aria-expanded,aria-describedby) on all interactive buttons and modals. - High-contrast text colors (
text-foreground,text-accent) exceeding 4.5:1 contrast ratios over dark background surfaces. - Semantic HTML structure (
<header>,<nav>,<main>,<h1>hierarchy). - Keyboard navigation operability across all forms, filters, and modal dialogs.
- Accessible ARIA labels (
- Audit Improvement Made: Replaced raw color-only badges with dual text+icon badges and implemented
useReducedMotion()to safely bypass physical shake animations for users with motion sensitivity.
# 1. Clone the repository
git clone https://github.com/maaz2417/capstone-project.git
cd capstone-project/frontend
# 2. Install dependencies
npm install
# 3. Start local development server
npm run devOpen http://localhost:3000 in your browser.
- Live URL: https://capstone-project-final-two.vercel.app/
- CI Pipeline: GitHub Actions (
.github/workflows/ci.yml) runsnpm ci,npm run build, andnpx vitest runon everypushandpull_requesttomain. - Error Boundaries: Next.js route error boundaries catch unexpected runtime errors and display fallback recovery views.
- Rollback Plan: Deployment rollbacks can be executed instantly via Vercel Dashboard or by redeploying the previous green commit hash (
git checkout <hash> && git push origin main).
Managing state choreography during network stream interruptions was the most intricate challenge. Balancing Vercel AI SDK's useChat hook state with custom error boundaries, sabotage header triggers, and Framer Motion layout transitions required careful synchronization to avoid race conditions or flickering layout shifts.
Next time, I would introduce optimistic UI updates for task creation and tool results prior to receiving full SSE response frames. This would give the user an instantaneous visual feedback loop while the LLM processes in the background.
I was surprised by how significantly compositor-friendly animations (transform and opacity) improve UI smoothness compared to animating height or padding. Restricting Framer Motion transitions to transforms completely eliminated browser layout thrash and ensured butter-smooth 60fps state transitions across both desktop and mobile web viewports.