Skip to content

Is a Project Built With Next.js Maintainable...? 💭  #12

@nelsonic

Description

@nelsonic

At the time of writing, this is the Next.js page on GitHub: https://github.com/vercel/next.js

vercel-nextjs-homepage

Some of these stats are a positive sign including Stars (123k), Used By (3.1M) and Contributors (3,3k).

Note: I always find it interesting when a project has more users than stars ...
I've always thought of "stars" as a way of showing support for a project while keeping a bookmark of it.
So there are 30x more people using the code than there are people who bothered to star it on GitHub ... 🤦‍♂️

But the other stats are not as good

667 branches https://github.com/vercel/next.js/branches who can possibly know what they all contain?!
image
Every one of the active branches failing CI. Most of the CI checks pass ...
but 90+ checks tells me this project has grown out-of-hand trying to be all things to all stakeholders ...

image

That's a lot of actions ... https://github.com/vercel/next.js/actions
image

Obviously to someone who has been working on the project for a while this might all seem familiar.
But to anyone looking at this for the first time it's a bit of a head-scratcher. 🙃

https://github.com/vercel/next.js/pulls?page=21&q=is%3Apr+is%3Aopen
image

Languages 💭

image

Still 69.5% JavaScript. This reflects the fact that the project was started in JS and they probably haven't had time to port everything over to TS yet ... But there doesn't appear to be any ongoing effort to tidy this.
And the docs are still littered with examples in both JS and TS. Pick a lane.

What is the 3.9% Rust? 🦀

When we tried looking for rust-related files the GitHub search failed:
https://github.com/search?q=repo%3Avercel%2Fnext.js++language%3ARust&type=code
image

Perhaps one to return to later ... are they rebuilding in Rust ...? 🤷‍♂️
ref: vercel/next.js#67780

A quick glance at the issues searching for the "rust" keyword:
https://github.com/vercel/next.js/issues?q=is%3Aissue+is%3Aopen+rust

I feel like diving into this rabbit hole further is just going to consume time I don't have right now ... 🐇 🕳️ ⏳

Crucially for someone considering adopting the stack for project, we have to ask:

How Much Effort Does it Take to Maintain a Project Built With Next.js?

If there are 2744 tags and 2600+ releases for a project started in October 2016 (8 years ago); 2847 days. ⏳
2600 releases / 2847 days = 0.91 updates per day.
That's almost one update per day for 8 years and crucially a lot of breaking changes to get to v14.2.5.

Next.js appears to only have 7 dependencies:
https://www.npmjs.com/package/next?activeTab=dependencies
image

https://npmgraph.js.org/?q=next
image

But the devDependencies are 200 which is what are actually used to develop/deploy a Next.js app;
You cannot build a React Framework App without React!!

Including the devDependencies in the graph/tree it becomes illegible!
https://npmgraph.js.org/?q=next#deps=devDependencies&sizing=&zoom=h
Dependencies_for_next_dependencies

if each one of these devDependencies has just 2 updates per year you will be flooded with dependency updates
and forced to maintain your app at least once a day!! 😕

With a security hat on this number of devDependencies gives me nightmares!!
You are relying on so many people not to be malicious.

If you build an App and have to step away from it for a few months, there's a good chance when you return to it,
there will be a breaking change that will cause you a substantial waste of time.

# Bottom Line: Great to Get Started; Nightmare to Maintain.

If you don't do anything too advanced, you might be able to get away with it.
But from experience of seeing larger projects with multiple sub-projects I wouldn't want to inherit a Next.js project.

As noted in dwyl/nextra-demo#5 (comment) Next.js and Nextra are slooooow for larger projects ...
image

Build time 20 seconds for a medium sized project ... 🐌 😱 #painful
Morethan 10 thousand modules compiled. 🤷‍♂️

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussShare your constructive thoughts on how to make progress with this issuetech-debtA feature/requirement implemented in a sub-optimal way & must be re-writtentechnicalA technical issue that requires understanding of the code, infrastructure or dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions