elite-ai-assisted-coding.dev

AI-Powered FastHTML Development

Building Annotation Apps with Claude + FastHTML

$ claude-code "Let's build a RAG annotation tool"
🤖 Planning architecture...
🚀 Generating FastHTML code...
✓ App ready at localhost:5001
elite-ai-assisted-coding.dev

See It In Action

elite-ai-assisted-coding.dev

The Challenge

Building a RAG Annotation Tool

~ 7K Records

Domain experts need to annotate thousands of RAG results efficiently

Really fast annotation

Updates without any page refreshes so annotators can get through a lot quickly

Two-Page App

Query list view + Document annotation view

elite-ai-assisted-coding.dev

AI-Assisted Development Workflow

1

Context


.ruler/

2

Plan


plan.md

3

Generate


Claude Code

4

Test


MCP Server

elite-ai-assisted-coding.dev

LLM Context with .ruler

.ruler/ ├── api_conventions_monsterui.md # UI component guidelines └── project_context.md # FastHTML patterns

MonsterUI Components

Pre-configured component library with consistent styling

FastHTML Patterns

Best practices for routing, database operations, and HTMX

elite-ai-assisted-coding.dev

Auto-Distribute to Any AI Agent

elite-ai-assisted-coding.dev

Start with a Clear Plan

Initial Ask for Plan
elite-ai-assisted-coding.dev

AI Validates Against Real Data

Claude Checking Data
elite-ai-assisted-coding.dev

Iterating on the Plan

Fixing Plan
elite-ai-assisted-coding.dev

Live Testing with MCP Server

# mcp_server.py @mcp.tool async def start_app(): """Starts the fasthtml application with browser automation""" @mcp.tool async def get_console_logs(): """Captures browser console for debugging""" @mcp.tool async def navigate_to(path: str = "/") -> str: """Navigate the browser to a specific path in the application.""" @mcp.tool async def click_element(selector: str): """Interacts with the UI programmatically"""

Claude can now do simple testing a human would do like navigate around and click things, and see browser console logs.

elite-ai-assisted-coding.dev

MCP Catches Errors Automatically

MCP 404 Error Detection
elite-ai-assisted-coding.dev

Automated UI Testing

MCP Click Testing
elite-ai-assisted-coding.dev

The Result: Query List View

Query List Page Screenshot
elite-ai-assisted-coding.dev

Document Annotation View

Query List Page Screenshot
elite-ai-assisted-coding.dev

Why This Approach Wins

Requires less energy and time

Save the time and energy for the interesting and hard parts

AI Understands Context

Ruler configs ensure consistent, idiomatic code

Self-Testing Apps

MCP server enables automated testing during development and more context for the LLM

Plan File

Plan files enable you to get consistent results from coding agents

elite-ai-assisted-coding.dev

Learn to Build Like This

Master AI-powered development

🎓 Join the AI Coding Course

Follow my journey and get free exclusive content

📬 Subscribe to the Substack

Join live sessions

🗣️ Join Free Talks
1 / 16