My coding philosophy in one sentence: strict rules let you move fast. Types enforced, formatting enforced, CI blocking anything that breaks the rules. When the structure is non-negotiable from day one, you stop wasting mental energy on decisions that don't matter and just build.
The problem is those decisions are genuinely hard to make upfront. Every new project is the same thing: how do I structure the source? What's my testing setup? ESLint rules? Prettier config? Strict TypeScript? They feel small but they compound, and making them halfway through a feature is a great way to end up with a codebase you quietly resent six months later.
My old solution was opening a previous project and copy-pasting stuff over. Which worked, kind of, until I forgot something and realized three days later I never set up the test directory.
So I finally made a template. It has everything I actually want and nothing I don't. Vitest with a pre-structured test directory. ESLint and Prettier configured exactly how I like them, with CI that blocks non-compliant code from ever merging. Docker included. The folder layout is fixed: app/ for pages, components/ui/ for shadcn, lib/ for utilities, etc. I never have to think about any of this again.
There's also a CLAUDE.md which has become one of the more useful files in there. AI tools are great but left alone they'll invent a different project structure every single time. Some days src/features/, other days src/modules/, sometimes just brainrot (checkout the tarkist.us frontend code to see what I mean: https://github.com/3nd3r1/tarkist.us/tree/main/frontend). The file gives them context so they work within the system rather than around it.
This is just for Next.js. The plan is to have a template for every type of project I work on. Python, Go, whatever comes next. Same idea everywhere: make the hard decisions once, then never again.
The whole thing is on GitHub.