Skip to main content

Building a Login Feature

Let's compare approaches.


Vibecoding

Prompt:

Create a login page.

Result:

LoginPage.tsx

Maybe 300 lines.

Contains:

  • Form
  • Validation
  • State
  • API calls
  • Error handling

All in one file.

Works.

Until requirements grow.


Predictive Development

Requirement:

Create authentication.

Analysis:

Domain:
Identity

Subdomain:
Authentication

Architecture:

LoginModel
AuthService
AuthState
AuthApi

UI:

Input
Label
Button
LoginForm
LoginPage

Implementation follows architecture.

The result scales much more effectively.


Mini Exercise

Compare the Vibecoding and Predictive Development versions of this login feature and list the biggest structural difference.

Example

The Vibecoding version puts everything in one page, while the predictive version separates model, service, state, API, and UI responsibilities.