Escaping the 'AI Spaghetti Code' Trap: How I Refactored My Next.js App with spec-kit

Published: (February 13, 2026 at 04:23 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

Introduction

I’m Xin Wan, a full‑stack engineer, and I just launched Printable Handwriting. The journey to get here was a massive learning curve. Back in 2025, I heavily relied on AI coding assistants to build the MVP. The result worked visually, but the codebase became an unmaintainable, tangled mess. Adding any new feature felt like walking through a minefield.

I recently bit the bullet and performed a complete rewrite using Next.js and spec‑kit to enforce strict modularity and maintainability. It was painful, but the performance and developer experience are finally where they need to be.

With a solid foundation, I’ve finally rolled out the complete toolset I envisioned to help people systematically improve their handwriting aesthetics.

Generators

Lines

For basic pen control and stroke stability.

Alphabet

To build a solid foundation with core letters.

Print

For clean, highly legible formal writing.

Cursive

Designed to improve writing speed and flow.

Name

Specifically for practicing and designing signatures.

AI Handwriting Analyzer

The core feature I’m most proud of is our AI Handwriting Analyzer. Users can upload their current handwriting, and the AI:

  • Analyzes their specific style
  • Recommends the most suitable fonts to practice
  • Generates a highly targeted training plan with custom materials

Current Challenges

I’m still battling the SEO game and figuring out how to pass the AdSense “low value content” filters. My current pivot is toward hardcore, high‑quality blog posts about paper physics and ink‑bleeding mechanisms to build strong E‑E‑A‑T.

Call to Action

I would absolutely love it if you could test out the AI analyzer or try generating a signature worksheet. Any harsh feedback on the Next.js frontend performance or the AI’s accuracy would be incredibly valuable!

0 views
Back to Blog

Related posts

Read more »