6
6 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.

posted to Icon for group Developers
Developers
on November 26, 2019
  1. 1

    My frontend (Nuxt, Vue, TypeScript, GraphQL) has 79k lines of code
    My backend (Symfony) has 73k

    Total: 152,000 lines

    Method of counting: find . -type f -exec wc -l {} +

    Of course I excluded all vendor / node_modules and left only real code files to count.

  2. 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. ✌️

  3. 2

    According to the suggested command 145.779 lines

  4. 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
  5. 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.

  6. 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
Your SaaS Isn’t Failing — Your Copy Is. User Avatar 50 comments Veo 3.1 vs Sora 2: AI Video Generation in 2025 🎬🤖 User Avatar 34 comments Solo SaaS Founders Don’t Need More Hours....They Need This User Avatar 33 comments Planning to raise User Avatar 14 comments The Future of Automation: Why Agents + Frontend Matter More Than Workflow Automation User Avatar 12 comments From side script → early users → real feedback (update on my SaaS journey) User Avatar 11 comments