A Real-Time Full-Stack Web Application from a Mockup and a 1-Paragraph Prompt
- Melvin Jones
- Sep 9
- 4 min read
What if I told you that a single paragraph and a UI mockup could generate a complete real-time web application in minutes?
Last week, I conducted an experiment that completely changed how I think about software development. I gave an AI assistant one prompt, attached a Figma design, and watched it build an entire full-stack pizza polling application with real-time WebSocket connections, comprehensive error handling, and production-ready architecture.
The result? A fully functional app that met every requirement, built for just 36 AI credits.
The Contract-First Revolution
We've all heard of contract-first API development – where you define your API specification before writing a single line of code. It's a proven approach that ensures consistency, improves collaboration, and reduces integration headaches.
But what if we could extend this concept beyond just APIs? What if we could do contract-first full-stack development?
That's exactly what AI-assisted coding is enabling today.

The Experiment
Here's the complete prompt I used:
"Create a pizza polling application using shadcn/ui components. See the attached image for the ui layout. When a user loads the application in his browser, he has the option to vote yes or no to order pizza. The number in the "Total votes" field is the total number of votes that have been cast by all users. This number updates live as votes are cast by other users that are also using the application. When a user votes "Yes" the vote is submitted and the vote button is disabled and the text is changed to "Voted". The vote button for "No" is disabled as well but the text remains the same. The progress bar on both the yes and no cards is a representation of the percentage of votes "yes" and "no" of the total votes respectively. These progress bars update live as votes are cast by the current user or any other user casting votes."
One paragraph. One UI mockup. That's it.
What the AI Built
From this minimal specification, the AI generated a complete application with this impressive tech stack:
Frontend:
Next.js 15 with App Router
React 18 with TypeScript
shadcn/ui component library
Tailwind CSS
Socket.io client with reconnection logic
Backend:
Node.js with Express.js
Socket.io server for real-time communication
In-memory data store with session management
Comprehensive error handling and validation
Development Tools:
Bun package manager
TypeScript compilation
Hot reload development environment
Advanced Features the AI Added Automatically:
Real-time vote synchronization across all clients
Session-based vote tracking (one vote per user)
Automatic reconnection and offline detection
Rate limiting and spam protection
Hydration-safe client-side rendering
Comprehensive error boundaries
Input validation and sanitization
Responsive mobile-first design
The Reality Check
Now, let's be honest – it wasn't perfect out of the box. There were some adjustments needed:
A few import statements to fix
Some hydration issues to resolve
Minor styling tweaks to match the prototype exactly
But here's the remarkable part: the application met every functional requirement from the original prompt. The real-time voting worked flawlessly, the UI matched the design, and the user experience was exactly as specified.
Why This Matters
This experiment demonstrates something profound about the future of software development:
1. Speed of Iteration What traditionally takes days or weeks of planning, architecture design, and implementation happened in minutes.
2. Consistency Across the Stack The AI maintained perfect consistency between frontend and backend, something that often requires careful coordination in team environments.
3. Best Practices by Default The generated code included error handling, type safety, and performance optimizations that junior developers might miss.
4. Contract-First Everything We're moving beyond just API contracts to full application contracts – where UI/UX specifications become the source of truth for entire systems.
The Bigger Picture
This isn't just about building apps faster (though that's pretty exciting). It's about fundamentally changing how we approach software architecture:
Design-Driven Development: UI/UX becomes the contract that drives technical implementation
Rapid Prototyping: Ideas can be validated with working software in minutes, not months
Democratized Development: Complex applications become accessible to a broader range of creators
Focus on Value: Developers can spend more time on business logic and user experience, less on boilerplate
What's Next?
I'm convinced we're at the beginning of a new era in software development. The combination of AI assistance and contract-first thinking is going to reshape how we build applications.
Imagine:
Product managers sketching ideas that become working prototypes instantly
Designers seeing their visions implemented in real-time
Developers focusing on complex business logic while AI handles the infrastructure
Startups validating ideas with production-ready MVPs in hours, not months
See It for Yourself
I've open-sourced the entire project on my GitHub so you can explore the code, run it locally, and see exactly what 36 AI credits can accomplish. The repository includes the original prompt, the Figma design, and detailed documentation of the entire development process.
What experiments are you running with AI-assisted development? Have you tried contract-first approaches beyond APIs?
Drop a comment below – I'd love to hear about your experiences and what you're building!
Comments