A lean, fully wired foundation for SaaS development. It provides a complete Next.js setup, Docker-managed PostgreSQL, structured migrations, and automated environment orchestration - so your project boots with a single command and stays consistent across machines.
The foundation also includes integration testing, plus enforced code quality through ESLint and Prettier. For Git hygiene, it uses Husky, Commitlint, and Commitizen to keep your commit history clean, predictable, and automation-friendly.
Everything is preconfigured to eliminate setup friction, prevent “works on my machine” headaches, and let you focus directly on building product features - not infrastructure.
The automated development workflow ensures you never waste time manually preparing your environment.
Instead of juggling multiple terminal commands, connection waits, and database setup steps, a single script handles everything: starting infrastructure, validating service readiness, applying migrations, and booting the application. This removes entire classes of “it works on my machine” problems, keeps onboarding effortless for new developers, and makes day-to-day development dramatically smoother and more reliable.
The dev script performs everything in sequence:
- Starts Docker services
- Waits for PostgreSQL
- Applies migrations
- Runs Next.js in development mode
Run it with:
npm run devUnder the hood, what this command will do is:
npm run services:up && npm run services:wait:database && npm run migrations:up && next dev
To ensure your project’s Git history stays clean, consistent, and reliable.
Husky enforces checks before bad commits sneak in, Commitlint guarantees every commit message follows a predictable and searchable format, and Commitizen gives contributors an easy, structured way to write proper commit messages without memorizing conventions. Together, they prevent chaotic commit logs, improve collaboration, power automated changelogs, and make long-term maintenance far less painful.
- Husky hooks installed automatically through
preparescript - Commitlint enforces conventional commits
- Commitizen interactive prompts via:
npm run commit- Jest fully configured for ESM
- Integration tests located in
tests/integration/api/v1/... - Tests call real Next.js API routes
- CI test flow automatically spins up services and runs migrations
- Scripts:
npm testnpm run test:watchnpm run test:ci— runs Next.js + Jest concurrently
Made to ensure the project grows in a clean, secure and professional way, running this GitHub Action on all pull requests:
- Automated tests
- Commit linting
- Code quality linting
- Code style linting
If you or someone else ever make a bad PR, GitHub will let you know.
Tip: You can make the tests Required for merge in GitHub's interface. That way, if some check don't pass, the Merge button won't be available, adding some extra security for the project.
Docker Compose (infra/compose.yaml) that provides a PostgreSQL container.
Service commands:
npm run services:up— start infrastructure containersnpm run services:stop— stop containersnpm run services:down— remove containers and volumes
- PostgreSQL managed via Docker Compose
- Automatic database readiness check (
infra/scripts/wait-for-postgres.js) - Migration system powered by node-pg-migrate
- Migration files stored in
infra/migrations - Scripts:
npm run migrations:create— create a new migration filenpm run migrations:up— apply pending migrations
- API routes organized under
pages/api/v1/... - Example endpoints (such as
status) - Ready-to-expand modular folder structure
- ESM-first setup (
"type": "module"in package.json)
- ESLint with Next.js, Jest, and Prettier integrations
- Prettier config prewired
- Linting commands:
npm run lint:eslint:checknpm run lint:prettier:checknpm run lint:prettier:fix
MIT License.
