6
5 Comments

How many lines of code is your source?

I was curious how many lines of source code my SaaS product has. This includes the front end react app and the back end which is express/node/mongo.

Turns out the current size of the project is 60,000 lines of code! This is source code I've written, it does not include node modules or anything like that.

Without typescript I feel like this would be nearly impossible to maintain for a solo developer. About 90% of my code is front end.

Oh, and I ran "git ls-files | xargs wc -l" from my src directory to count lines.

  1. 3

    59858 is one of my biggest repos checked out. It's an App.
    However, I would argue that lines of code is not a good metric to describe maintainability of a software project. Sure less lines to look at is more pleasant, just make sure to structure your code properly by separating functionality properly. Either into own functions, files, modules or even own projects. ✌️

  2. 2

    According to the suggested command 145.779 lines

  3. 1

    Hmm I never thought to do this!

    Make sure you aren't including your package-lock.json though (that accounted for like 75% of my repos)

    Looks like my web app (https://thoughtreps.com) is:

    • client (react): ~5k lines (3.5k js + 1.2k awful custom css )
    • api (node/express): ~1.1k lines js
    • iOS app (work in progress): ~1.2k lines swift
  4. 1

    I'm at 35k of Java code. ...yet the system is far from being useful. I wish it was an indicator of something other than developer's persistence.

  5. 1

    16,153 so far. I've only initialized React (takes up the majority of the code) and wrote data scripts for the databases. Will be interesting to see how this grows as I build out the app.

Trending on Indie Hackers
How I grew a side project to 100k Unique Visitors in 7 days with 0 audience 47 comments Competing with Product Hunt: a month later 33 comments Why do you hate marketing? 27 comments $15k revenues in <4 months as a solopreneur 14 comments Use Your Product 13 comments How I Launched FrontendEase 13 comments