Skip to content

feat: scaffold Express API starter (lint, tests, CI, git hooks)#1

Merged
ModulosPB merged 1 commit intomainfrom
devin/1776424731-scaffold-express
Apr 17, 2026
Merged

feat: scaffold Express API starter (lint, tests, CI, git hooks)#1
ModulosPB merged 1 commit intomainfrom
devin/1776424731-scaffold-express

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Apr 17, 2026

Summary

Initial scaffold for api00: a Node.js 20+ / Express 4 API in plain JavaScript (ESM), with no database and no auth. Intended as a clean foundation to build on top of.

What's included:

  • App structure (src/): createApp() factory in app.js (testable, no listen), server.js entrypoint, config/env.js (dotenv), two routes (GET / metadata, GET /health), and centralized notFound + errorHandler middleware. x-powered-by disabled.
  • Tests: Vitest + supertest. 3 tests covering GET /, GET /health, and a 404 on an unknown route.
  • Tooling: ESLint 9 flat config, Prettier, EditorConfig, .nvmrc (Node 20), .env.example.
  • Git hooks: Husky + lint-staged (pre-commit) + commitlint with config-conventional (commit-msg). Installed automatically via npm install's prepare script.
  • CI (.github/workflows/ci.yml): on PR and push to main, runs npm ci → lint → format:check → test on Node matching .nvmrc.
  • README: how to run, endpoints, scripts, layout, env vars, hooks.

Locally verified: npm run lint, npm run format:check, and npm test (3 passing) all clean.

Review & Testing Checklist for Human

  • Run npm install on a fresh clone with Node 20 and confirm dependencies resolve and git hooks land in .husky/_/.
  • Verify hooks actually block bad input: try committing with a non-conventional message (e.g. git commit -m "oops" — should fail) and with a file containing an unused variable (pre-commit eslint --fix + Prettier should run).
  • Confirm GitHub Actions CI goes green on this PR (matches local: lint + format:check + test).
  • Skim eslint.config.js / .prettierrc.json / commitlint.config.js and tell me if you'd prefer different style rules before more code piles up on top.

Notes

  • No license file yet — README flags it as "unlicensed"; add one when the project stops being a sandbox.
  • npm audit was skipped during install; worth a manual npm audit pass before going public-facing.
  • No deploy config yet, per your request ("aún no, solo el esqueleto local + CI"). When you want deploys, the next PR can add Railway/Render/Fly config and a second CI job for preview deploys.

Link to Devin session: https://app.devin.ai/sessions/38829c1a13124d54a5fdf114ce348ba9
Requested by: @ModulosPB


Open with Devin

Co-Authored-By: mpb <modulospb@protonmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@ModulosPB ModulosPB merged commit 0858ea1 into main Apr 17, 2026
2 checks passed
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