Skip to content

chore: add Makefile for one-command dev setup#86

Merged
WhiteMuush merged 6 commits into
mainfrom
chore/makefile-setup
Jun 22, 2026
Merged

chore: add Makefile for one-command dev setup#86
WhiteMuush merged 6 commits into
mainfrom
chore/makefile-setup

Conversation

@WhiteMuush

Copy link
Copy Markdown
Owner

What

Adds a Makefile wrapping the existing npm scripts and scripts/db-init.sh.

Why

A fresh clone needs several manual steps (install, craft .env.local with
secrets, start the DB, migrate, seed). This collapses them into one command.

Highlights

  • make setup - one-shot: install + env + db-init.
  • make env - creates .env.local from .env.example and fills AUTH_SECRET
    and DIRECTORY_ENCRYPTION_KEY with openssl rand -base64 32. No-op if the
    file already exists (never clobbers secrets).
  • make check - mirrors the CI gates (lint with zero warnings, tsc --noEmit,
    prisma validate, build).
  • Thin wrappers for dev, build, lint, test, db-up/down, migrate,
    seed, plus make help (default) listing every target.

No behavior change to the app or existing scripts.

🤖 Generated with Claude Code

WhiteMuush and others added 6 commits June 22, 2026 16:32
Wrap the existing npm scripts and scripts/db-init.sh behind make targets so a
fresh clone comes up with 'make setup' (install, generate .env.local secrets,
start DB, migrate, seed). 'make check' mirrors the CI gates.
'make run' replaces 'make dev'. 'make doctor' reports node, .env.local,
Docker daemon, the db container health, prisma client, and live migration
status to troubleshoot setup issues.
Check toolchain (node/npm/openssl), every .env.local var (presence,
placeholders, key length), Docker (binary/compose/daemon/db container),
database TCP reachability, and Prisma (client, schema validity, migration
status). Print an OK/WARN/FAIL summary and exit non-zero on any failure.
After the diagnosis, prompt to auto-fix (interactive tty only), separating
failures from warnings: [e]rrors only, [a]ll, or [n]o. Fixes cover .env.local
creation and secret generation, AUTH_URL/CRON_SECRET, npm install, prisma
generate, db-up, and migrate deploy.
Extract the env-init and doctor shell logic out of the Makefile into
scripts/env-init.sh and scripts/doctor.sh, matching scripts/db-init.sh. The
env and doctor targets are now thin callers.
@WhiteMuush WhiteMuush merged commit cfecf22 into main Jun 22, 2026
11 checks passed
@WhiteMuush WhiteMuush deleted the chore/makefile-setup branch June 22, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant