Web Technologies & Tools

Retrofit Web Tooling Into Client Code on a Solo Budget

An existing web codebase rarely needs a new toolchain all at once. For a solo freelancer, the safer move is to make one repeatable check work on the code already being changed, then expand only when it catches a real mistake. I would spend the first hour on a local verification command, not a platform migration or a paid dashboard.

A repeatable local check beats a new stack

Before installing anything, find out what the repository can already verify. Read package.json, identify the package manager from the lockfile, and run the existing test and build scripts from a clean checkout. A failing baseline matters because a new linter or formatter cannot distinguish its own regressions from failures that were already there. Record the result in a short repository note: the command, the failure, and whether it blocks delivery.

For an npm project with a committed package-lock.json, I would start with this script in scripts/verify.sh. Run it with sh scripts/verify.sh before and after a change. The --if-present option keeps a repository without a test or build script from failing solely because that script is absent; it does not pretend that missing tests passed.

#!/bin/sh
set -eu
npm ci
git diff --check
node -e 'JSON.parse(require("fs").readFileSync("package.json"))'
npm run test --if-present
npm run build --if-present

This is deliberately plain. npm ci installs from the committed lockfile rather than resolving new dependency versions, so two runs are more comparable. git diff --check catches whitespace errors without reformatting untouched files. The Node.js command parses package.json explicitly, while the final commands use whatever test runner and bundler the project already has. If the repository uses pnpm or Yarn, substitute its frozen-lockfile install command instead of adding npm as a second package manager.

Set a local target of 5 minutes for this command; that is a value to tune, not a universal performance standard. If installation dominates every run, keep a second, faster command for checks that do not reinstall dependencies, while retaining the clean-install command for releases. Measure both on your own machine before deciding that either is too slow. A freelancer who runs a fast check on every edit gets more value than one who owns an elaborate command and avoids it.

I read Cheap vs proper dev tooling for backend devs switching to web but reject a price-tier decision as the starting point, because an existing repository’s first constraint is whether its checks can be repeated at all. I would not replace its bundler, package manager, and test runner together: that would make any changed output hard to attribute and would consume the same unpaid time needed to finish the client’s work.

Formatting the whole repository makes the first tooling change harder to review

Prettier and ESLint solve different problems, and neither needs permission to rewrite history. Prettier can make edited files consistent; ESLint can flag specified code patterns. In a mature repository, a whole-tree formatting commit may touch thousands of lines without changing behavior, which obscures the functional edits you need to review. Start with files you are already modifying, keep formatting separate from behavior changes, and leave generated files alone.

There is a real choice between Prettier 3 and Biome 2. Prettier wins when the project already uses it or when you want a formatting-only decision; its cost is a separate linter if you also need code rules. Biome wins when a small project has neither tool and you want formatting and linting under one configuration; its cost is migration work if existing ESLint rules, plugins, or formatting expectations do not map cleanly. Compare their output on a few representative files before committing either configuration, because the cheapest tool to install may be the most expensive one to reconcile with current diffs.

For linting, ESLint 9 uses a flat configuration file such as eslint.config.mjs. Do not enable a large recommended ruleset and then spend an afternoon silencing old violations. Add one rule for an error you have actually seen, run it against the folder you are changing, and expand its file patterns only after the current work passes. If no-debugger catches a forgotten breakpoint, that is a defensible first rule. If it reports nothing across several jobs, a different rule may deserve the next slot.

Keep the boundaries visible. A formatter check should fail because a changed file needs formatting, not because an untouched vendor file differs from a new default. A linter should not silently ignore the active feature folder to produce a green result. Where an old file already has violations, either fix them in a separate commit or restrict the first lint check to new files and document that limit. Calling a partial check “full lint coverage” would give you confidence the command has not earned.

Use a review budget of 20 changed files for the first formatting trial; that is an intentionally adjustable ceiling, not a measured industry norm. If the proposed commit exceeds it, narrow the path and inspect the diff again. Read Top Web Development Tools to Boost Productivity critically: an inventory can suggest candidates, but it cannot tell you which existing files a new configuration will churn. The diff can.

One regression test is worth more than broad, untrusted coverage

After the local command runs, add a test at the next place you expect to make a mistake. Do not begin by chasing a coverage percentage across unfamiliar code, because a high percentage can still miss the behavior named in a client’s bug report. Choose an observable boundary: a price calculation, an authentication redirect, or a form submission that recently failed. Write down the input and expected output before choosing a testing library.

If the project already has Jest, use Jest for that first regression. If it already has Vitest, use Vitest. Swapping runners to pursue faster startup is difficult to justify when the immediate task is proving one behavior. For an application whose only practical check is manual, Playwright can exercise a browser path, but its browser installation and end-to-end setup cost more than a small unit test. The options win in different places: an existing unit runner gives quick feedback on isolated logic, while Playwright wins when the failure depends on navigation, browser storage, or rendered interaction. The former costs test seams in the code; the latter costs setup time and more opportunities for environmental failures.

Use 1 reproduced failure as the entry requirement for the first test; that is a practical selection rule, not a claim about how many tests a project needs. Confirm the test fails for the reported bug and passes after the fix. If it passes before the fix, it may be checking the wrong thing. Where an API contract is the boundary, a test against an HTTP response—status, headers, and body—can be more durable than asserting an internal function name, because implementation details can change without changing the client-visible result.

Track the time spent rerunning checks for 2 weeks as a small personal measurement window. Note which command failed usefully, which failure was flaky, and which check you skipped because it took too long. That evidence is enough to decide whether to narrow a slow test, stabilize a fixture, or add another check. It is more useful to a solo freelancer than adopting a published coverage target without knowing what the current tests protect.

A useful failure should tell you where to act. If a browser test depends on a remote service you do not control, replace that dependency with a local fixture for the behavior under test, because an outage elsewhere cannot diagnose your edit. If a test needs secrets from a client account, keep it out of the default local command until you have a safe way to run it; a check that only works on the client’s machine is not yet a repeatable safety net.

Automation should follow a trusted local command, not precede it

Once the command produces useful results locally, run the same command on a GitHub Actions pull request. For a solo developer, the benefit is less about approval and more about checking a clean environment before delivery. GitHub Actions is convenient when the code is already on GitHub, but its hosted runner is not a substitute for understanding failures locally. If the repository is elsewhere or the client cannot authorize a hosted service, keep the command in the repository and run it before each handoff.

Pin the Node.js major version used for verification to the version the project supports. Node.js 22 is an example to verify against the application’s deployment target, not a recommendation to upgrade a working production runtime. Commit the lockfile, and avoid an automatic dependency-update bot at this stage: unattended version bumps create review work before you have established which existing behavior the checks protect. Add automated updates later if the time saved on discovery exceeds the time spent reviewing their pull requests.

Set a first-pass CI timeout of 10 minutes as a limit to revisit after observing real runs. A timeout should expose a stalled check, not force you to disable a legitimate build. If the clean-install step repeatedly consumes most of that allowance, measure it separately before adding caching; caches reduce repeated downloads but also introduce state that can confuse a rare install failure. Keep the uncached local command available as the reference.

The stopping rule matters as much as the setup. Do not add a dashboard because the first few checks are green, and do not add another tool because a roundup lists it. Add the next check when you can name the mistake it should catch and the file or behavior it should protect. That gives a small codebase a path toward better tooling without turning every client change into a tooling project.

First, run the repository’s existing install, test, and build commands from a clean checkout and write down exactly what fails. Then save one local verification command that reproduces those results without hiding missing scripts. On the next client edit, add a focused check for the behavior you are touching. If that check catches a mistake, you have evidence for expanding it; if it does not, keep the codebase—and your tooling budget—small.