The Register Home Page

back to article Cloudflare experiment ports most of Next.js API 'in one week' with AI

A Cloudflare engineer says he has implemented 94 percent of the Next.js API by directing Anthropic's Claude, spending about $1,100 on tokens. The purpose of the experimental project was not to show off AI coding, but to address an issue with Next.js, the popular React-based framework sponsored by Vercel. According to …

  1. Pen-y-gors

    Testing

    "A Cloudflare engineer says he has implemented 94 percent of the Next.js API "

    And tested it?

    1. rgjnk
      Devil

      Re: Testing

      Incomplete, untested, unreviewed.

      So basically not done.

      Plus as any fule kno the last few percent is usually the difficult to impossible bit. Getting something from 'mostly works' to 'works' ain't that easy.

      1. Anonymous Coward
        Anonymous Coward

        Re: Testing

        Of course it is. That's why I can leave it to others, while I change job and move up for more pay, based on the experience I gained using AI to complete this job so quickly. Q.e.d.

      2. MonkeyJuice Silver badge

        Re: Testing

        Ah yes. That final 1% is why the adage "Plan to throw one away, you will anyway" came about. It also doesn't mention this process may repeat.

    2. GregRobson

      Re: Testing

      From the article - it seems it is well tested as the tests on Next.js allow.

      "It's not even one week old, and it has not yet been battle-tested with any meaningful traffic at scale. If you're evaluating it for a production application, proceed with appropriate caution.

      "That said, the test suite is extensive: over 1,700 Vitest tests and 380 Playwright E2E tests, including tests ported directly from the Next.js test suite and OpenNext's Cloudflare conformance suite. We’ve verified it against the Next.js App Router Playground. Coverage sits at 94% of the Next.js 16 API surface."

      If an application has sufficient tests then at least it should behave as what it replaces as long as test coverage is high enough.

      1. MonkeyJuice Silver badge

        Re: Testing

        Did you check the tests don't just all `return true`?

    3. Sampler

      Re: Testing

      Another article about how someone sorta, nearly almost made something with AI whilst spending considerable money whilst holding it's hand...

      Can we just stop with the propaganda for the hallucination grift as a service platform and just let this bubble die already, I want to buy some hardware...

    4. LateAgain

      Re: Testing

      It passed the test suite.

      Then again I'm sure that Windows 11 updates also something.

  2. DS999 Silver badge

    I don't use this stuff

    So please be gentle for me asking a stupid question. Is Next.js copyright code? It sorta sounds like it is if people are looking for reasons to reimplement it, versus just improving it which is what you'd expect if it was open source.

    So if it is copyright code, and it is Javascript so it is available in a form an AI could snarf up and use, how do you know that the AI didn't break copyright by copying a lot of stuff from Next.js itself?

    I mean, given that the Windows code was leaked in the past so if you told an AI to "reimplement Windows" (OK realistically some subset of the API) how would you know it didn't use a lot of Microsoft's own code in doing so? Microsoft isn't going to sue just the AI for that. They'll also sue YOU if you release that code!

    1. DanAU

      Re: I don't use this stuff

      Next.js is open-source (MIT license). I'm not sure why they didn't just fork it and make the changes they wanted to.

      1. DS999 Silver badge
        Trollface

        Re: I don't use this stuff

        I suppose because no one would pay attention to a fork announcement, but say "we used AI to re-implement it" and now we're discussing it on The Reg!

  3. ecofeco Silver badge

    Well that explains a lot

    I noticed a LOT of Internet weird last week.

  4. DanAU

    The article says that it's written "from scratch", which makes no sense at all. It's using Next.js test suites, and the AI is almost certainly using Next.js code as part of the output.

  5. kmorwath Silver badge

    So instead of contributing code to make adapters work...

    ... he has just reimplemented everything using AI.

    I see where FOSS projects are going to....

    1. LateAgain

      Re: So instead of contributing code to make adapters work...

      Interesting idea.

      I'm sure that it will happen eventually.

      Open source project where what you feed into the AI is the open bit.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon