Key takeaway
Want the short version? Skip down for a concise summary.
A small engineering team wanted to build a custom app from scratch but didn't quite know the best way to get started with agentic AI and a modern tech stack. With a few days of consulting, example prompts, and a live review of the codebase, they shipped a near-MVP in under two weeks.
The Result: a production-ready foundation with TanStack Router, TanStack Query, and TanStack Form, utilizing shadcn/ui and Tailwind, built on Vite with React and TypeScript, completed in less than 1/4 the time a typical manual development sprint would have taken.
The Challenge
The client had two developers on the project with limited recent exposure to today’s frontend ecosystem. They needed a scalable foundation without burning weeks debating boilerplate, folder layout, or which libraries to glue together.
The goal was to move fast while adopting practices that hold up over time, including hooks for future agentic AI features alongside clean APIs and observable behavior.
Initial Project Scaffolding With Precise Prompting
We started with a structured discovery conversation: what the application needed to accomplish, roughly who would use it, and what “done” looked like for their first meaningful milestone. That context shaped every prompt that followed.
From there we ran guided prompting sessions in Cursor and Claude Code. The stack we locked in was Vite with React and TypeScript, TanStack Router, TanStack Query, TanStack Form, and shadcn/ui with Tailwind, matching patterns we rely on ourselves.
What good prompts looked like
Concrete beats vague. Effective patterns included naming the frameworks explicitly, declaring non-negotiables such as routing and styling approach, and requesting file-level outputs the team could inspect. Illustrative snippets (domains anonymized):
Scaffold out a Vite React TypeScript project with TanStack Router, TanStack Query, TanStack Form, using shadcn/ui with Tailwind. This project will run as a SPA on the client while allowing for a NodeJS server for any necessary server-side API calls for data or 3rd party integrations. Please include Vitest and React Testing Library to include application wide test suites and configure a minimum require of 80% code coverage.
Outcome: a fully configured codebase with routing, data fetching behaviors, forms, and a UI foundation in minutes rather than days. The next step was to provide necessary prompts for UI development for the account registration, login screen and initial dashboard concepts.
Project Architecture Review
Once scaffolding landed, we walked the repo live with everyone on the call: route tree, loader patterns, modules that own server adapters versus UI, and where types ought to accumulate.
Recommendations covered folder conventions, pragmatic state boundaries, type-safety norms, and a pragmatic testing stance (Vitest plus React Testing Library) so quality did not lag behind momentum.
Repository shape
Tooling roots plus a structured src/ tree: routes, server code, composable UI, and shared modules.
- .claude/focus
- .cursor/
- .husky/
- src/
- __tests__/
- components/
- elevated/
- layout/
- site/
- ui/
- data/
- hooks/
- lib/
- routes/
- server/
- styles/
- router.tsx
Illustrative paths; your repo may vary. The goal is predictable boundaries agents and humans can navigate together.
We tightened a few seams on the spot, explaining why each change mattered so the tradeoffs stuck. Adjustments ranged from narrowing query keys and cache shapes to simplifying a layout that duplicated providers.
Composable UI Component Building
With architecture stable, attention shifted to reusable UI surfaces: core layouts, form sections, filtered tables, empty states. We leaned on targeted prompts plus pair-style sessions while the group watched edits land in Cursor.
The emphasis stayed on accessibility defaults, responsive behavior, and components that behave predictably whether a human writes the next slice or agentic tooling drafts it.
Knowledge Transfer and Hand-off
We capped the engagement with a short, repeatable curriculum on prompting: layering constraints, iterating with checkpoints, verifying diffs critically, and when to escalate to human review.
We summarized architecture decisions into plain-language notes aligned with the codebase. The team left with access to ongoing office hours slots for follow-up questions as they marched toward hardened production behavior.
Engagement Phases
What the Team Experienced
Most collaborative work landed in intentional, short bursts measured in focused hours rather than sprawling calendar blocks. The arc below maps seven work tracks across three contiguous hour bands, with prompt engineering on one axis and code review checkpoints on the other. Sessions stayed long enough for depth but short enough to avoid derailing roadmap meetings elsewhere.
Collaborative hours (illustrative focus blocks)
Each column is a contiguous hour band. Cells pair what we prompted with what we reviewed before the team merged or moved on.
Project scaffolding
Prompt
Single-shot prompts: Vite + React + TS, TanStack Router/Query/Form, shadcn + Tailwind, Vitest + RTL with coverage floor.
Review
Trim duplicate boilerplate, verify scripts and lockfile, confirm folder layout matches how the team will extend the app.
Prompt
Follow-ups for route trees, loader stubs, and env wiring so agents do not invent parallel patterns.
Review
Catch duplicate providers, tighten import boundaries, align route naming with product language.
Prompt
Document stack choices in-repo (AGENTS.md, short skills) so later prompts stay on-rails.
Review
Sign off baseline before UI-heavy work: freeze structure and note explicit extension points.
UI Theme and Design System
Prompt
Prompted Tailwind tokens, type scale, and color roles so generated classes stay consistent.
Review
Contrast check on primary actions, reduce one-off hex usage, align focus styles with shadcn defaults.
Prompt
Install and compose shadcn primitives with variant prompts (buttons, inputs, sheets).
Review
Spacing rhythm across layouts, prop surfaces that stay stable for future agent edits.
Prompt
Theme pass prompts: dark mode, density, and shared layout shells.
Review
Final UI inventory: drift between pages, keyboard paths, and component API consistency.
Dashboard and Content Design Implementation
Prompt
Layout shells, page frames, and placeholder copy blocks sized for real content density.
Review
Information hierarchy: scan order, empty states, and where attention should land first.
Prompt
Table, filter, and card prompts with realistic loading and error skeletons.
Review
Query key hygiene, suspense boundaries, and avoiding duplicate fetches on navigation.
Prompt
Demo-oriented prompts: sample rows, chart stubs, and narrative copy for stakeholders.
Review
Readability at a glance: truncation, tooltips, and mobile stacking before sign-off.
Authentication Guardrails and Security
Prompt
Auth route scaffolding: login, callback, and protected layout shells with explicit constraints.
Review
Secrets stay server-side, env samples are safe, client bundles contain no long-lived tokens.
Prompt
Session and token handling prompts with explicit CSRF and redirect allowlists.
Review
Review edge cases: refresh failures, back-button behavior, and logout clearing state.
Prompt
Role- and route-guard prompts with tests for denied paths.
Review
Least privilege: API shapes, audit logging hooks, and safe error copy on failure.
API Service Integration
Prompt
TanStack Query client setup: base URL, default staleTime, error normalization in prompts.
Review
Query keys are stable and namespaced; retries and aborts match backend behavior.
Prompt
Mutation prompts with invalidation lists and optimistic updates where appropriate.
Review
Race coverage: rapid double-submit, stale closure risks, and rollback messaging.
Prompt
Adapter and mapper prompts so UI types do not leak transport details.
Review
Contract drift: versioned DTOs, consistent error UX, and logging without PII.
Forms and Optimistic UI Updates
Prompt
TanStack Form + Zod prompts with field-level errors and async rules spelled out.
Review
Accessible labels, aria descriptions, and validation timing (blur vs submit).
Prompt
Optimistic cache update prompts with explicit rollback on failure.
Review
Review failure paths: server rejection, partial success, and how lists stay consistent.
Prompt
Submit UX prompts: pending states, toasts, and field re-focus behaviors.
Review
Loading vs disabled states, redundant requests, and test coverage on critical flows.
Mobile Optimizations and Polish
Prompt
Breakpoint and container prompts; avoid fixed widths that break small screens.
Review
Tap targets, overflow clipping, and form keyboards not obscuring CTAs.
Prompt
Touch-friendly nav, sheet patterns, and scroll containment prompts.
Review
Modal focus traps, body scroll lock, and safe-area considerations.
Prompt
Perf polish prompts: lazy routes, image constraints, and bundle sanity checks.
Review
Final pass: Lighthouse smoke, reduced motion respect, and demo-ready polish.
Project scaffolding
Hours 1–3
Prompt
Single-shot prompts: Vite + React + TS, TanStack Router/Query/Form, shadcn + Tailwind, Vitest + RTL with coverage floor.
Review
Trim duplicate boilerplate, verify scripts and lockfile, confirm folder layout matches how the team will extend the app.
Hours 4–6
Prompt
Follow-ups for route trees, loader stubs, and env wiring so agents do not invent parallel patterns.
Review
Catch duplicate providers, tighten import boundaries, align route naming with product language.
Hours 7–9
Prompt
Document stack choices in-repo (AGENTS.md, short skills) so later prompts stay on-rails.
Review
Sign off baseline before UI-heavy work: freeze structure and note explicit extension points.
UI Theme and Design System
Hours 1–3
Prompt
Prompted Tailwind tokens, type scale, and color roles so generated classes stay consistent.
Review
Contrast check on primary actions, reduce one-off hex usage, align focus styles with shadcn defaults.
Hours 4–6
Prompt
Install and compose shadcn primitives with variant prompts (buttons, inputs, sheets).
Review
Spacing rhythm across layouts, prop surfaces that stay stable for future agent edits.
Hours 7–9
Prompt
Theme pass prompts: dark mode, density, and shared layout shells.
Review
Final UI inventory: drift between pages, keyboard paths, and component API consistency.
Dashboard and Content Design Implementation
Hours 1–3
Prompt
Layout shells, page frames, and placeholder copy blocks sized for real content density.
Review
Information hierarchy: scan order, empty states, and where attention should land first.
Hours 4–6
Prompt
Table, filter, and card prompts with realistic loading and error skeletons.
Review
Query key hygiene, suspense boundaries, and avoiding duplicate fetches on navigation.
Hours 7–9
Prompt
Demo-oriented prompts: sample rows, chart stubs, and narrative copy for stakeholders.
Review
Readability at a glance: truncation, tooltips, and mobile stacking before sign-off.
Authentication Guardrails and Security
Hours 1–3
Prompt
Auth route scaffolding: login, callback, and protected layout shells with explicit constraints.
Review
Secrets stay server-side, env samples are safe, client bundles contain no long-lived tokens.
Hours 4–6
Prompt
Session and token handling prompts with explicit CSRF and redirect allowlists.
Review
Review edge cases: refresh failures, back-button behavior, and logout clearing state.
Hours 7–9
Prompt
Role- and route-guard prompts with tests for denied paths.
Review
Least privilege: API shapes, audit logging hooks, and safe error copy on failure.
API Service Integration
Hours 1–3
Prompt
TanStack Query client setup: base URL, default staleTime, error normalization in prompts.
Review
Query keys are stable and namespaced; retries and aborts match backend behavior.
Hours 4–6
Prompt
Mutation prompts with invalidation lists and optimistic updates where appropriate.
Review
Race coverage: rapid double-submit, stale closure risks, and rollback messaging.
Hours 7–9
Prompt
Adapter and mapper prompts so UI types do not leak transport details.
Review
Contract drift: versioned DTOs, consistent error UX, and logging without PII.
Forms and Optimistic UI Updates
Hours 1–3
Prompt
TanStack Form + Zod prompts with field-level errors and async rules spelled out.
Review
Accessible labels, aria descriptions, and validation timing (blur vs submit).
Hours 4–6
Prompt
Optimistic cache update prompts with explicit rollback on failure.
Review
Review failure paths: server rejection, partial success, and how lists stay consistent.
Hours 7–9
Prompt
Submit UX prompts: pending states, toasts, and field re-focus behaviors.
Review
Loading vs disabled states, redundant requests, and test coverage on critical flows.
Mobile Optimizations and Polish
Hours 1–3
Prompt
Breakpoint and container prompts; avoid fixed widths that break small screens.
Review
Tap targets, overflow clipping, and form keyboards not obscuring CTAs.
Hours 4–6
Prompt
Touch-friendly nav, sheet patterns, and scroll containment prompts.
Review
Modal focus traps, body scroll lock, and safe-area considerations.
Hours 7–9
Prompt
Perf polish prompts: lazy routes, image constraints, and bundle sanity checks.
Review
Final pass: Lighthouse smoke, reduced motion respect, and demo-ready polish.
Cadence stayed lightweight: concentrated hour blocks aligned to prompting and reviews, async follow-up, and minimal disruption to standing commitments.
Feedback after the sprint could be summed up cleanly: they crossed from tentative about unfamiliar tooling to confidently owning routing, forms, styling, and how far to trust generators.
The Results and Why This Approach Works
The team exited the engagement near production-quality MVP scope with time left for polish compared with prior internal initiatives that stretched further for less visible progress.
- Initial setup acceleration: ~70% faster versus their prior spreadsheet estimate for manual scaffolding.
- Quality and consistency benefited from shared scaffolding plus live review cycles instead of one-off merges late in development.
- The architecture leaves room for later agent-assisted features, observability, and API layering without refactoring the entire frontend.
- The process also prepares future agents to understand the codebase and its architecture by consistently updating documentation in the codebase via AGENTS.md and various skill files.
Traditional advisory work often emphasizes theory decks. Pairing disciplined agent tooling with hardened stack instincts lets teams learn by shipping. TanStack ergonomics paired with Cursor and Claude Code amplified every hour we spent together.
If this blend of facilitation sounds useful, our AI and modern web strategy consultations capture the fuller menu we described for advisory work beyond single accelerations.
The Result
We were able to help a small engineering team move from uncertainty about agentic AI and modern tech stack libraries to a near-MVP application in less than ten working days. Routing, querying, validated forms, and design-system-backed UI snapped into place sooner than their most optimistic planning, and engineers left empowered to steer the codebase forward with agentic tooling they now understand. This mirrors the condensed, outcomes-first AI and tech acceleration work we routinely deliver.
If your team faces a similar sprint from zero to credible software, reach out. We routinely package short, intensive AI and stack alignment consulting like this.
Work With Us
Have a project in mind?
We build the web's most demanding applications. Let's talk about yours.