π Devkit Node
A Node / Express / Mongoose / JWT stack that can be run as a standalone backend or in a fullstack setup with another repo (ex: Vue, Swift).
Designed to be cloned into downstream projects and kept up-to-date via git merge from the stack repo.
| Subject | Informations |
|---|---|
| Architecture | Layered Architecture : everything is separated in layers, and the upper layers are abstractions of the lower ones, that's why every layer should only reference the immediate lower layer (vertical modules architecture with Repository and Services Pattern) |
| Server | Node >= 22 - Express - Helmet - CORS nodemon |
| Database | MongoDB - Mongoose - GridFS upload Sequelize - PostgreSQL, MySQL, SQLite (option) JOI - Models & Repository validation |
| Security | passport-jwt - JWT Stateless bcrypt - zxcvbn - Passwords SSL - Express / Reverse Proxy |
| API | jsend - Default response wrapper: status, message, data or error |
| Upload | Mongo GridFS - Multer - Sharp - Image stream, all content types |
| Testing | Jest - SuperTest - Coverage & Watch |
| CI | GitHub Actions |
| Linter | ESLint ecmaVersion latest |
| Developer | Dependabot - Snyk semantic-release - commitlint - commitizen |
| Dependencies | npm |
| Deliver | Docker & Docker-compose |
- User : classic register / auth or oAuth (Google, Apple) - profile management (update, avatar upload)
- User data privacy : delete all - get all - send all by mail
- Admin : list users - get user - edit user - delete user
- Tasks : list - get - add - edit - delete
- File Uploads : get stream - add - delete - image stream & sharp operations
- Git - Download & Install Git
- Node.js (22.x or 24.x) - Download & Install Node.js
- Recommended: Use nvm for Node version management
- MongoDB - Download & Install MongoDB
git clone https://github.com/pierreb-devkit/Node.git && cd Node
npm installnpm startRuns the server at http://localhost:3000/. For auto-reload during development, use npm run debug (nodemon).
CORS Note: When connecting to the Vue stack, ensure CORS is configured:
DEVKIT_NODE_cors_origin=['http://localhost:8080'] npm startnpm run prodnpm test # Run all tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Generate coverage reportTests are organized per module in modules/*/tests/
npm run lint # Check code quality (read-only)
npm run lint:fix # Auto-fix code quality issuesnpm run seed:dev # Seed development database
npm run seed:prod # Seed production database
npm run seed:user # Seed default user/admin only (no drop)
npm run seed:mongodrop # Drop database (with confirmation)npm run commit # Commit with commitizen
npm run release -- --first-release # First release
npm run release -- --release-as 1.1.1 # Release specific version
GITHUB_TOKEN=xxx npm run release:auto # Semantic release (CI)Configuration files live in config/defaults/. The development.js file is the base; other files in that folder override it.
Environment variables prefixed with DEVKIT_NODE_ are merged on top. The variable path maps directly to the config object key:
DEVKIT_NODE_app_title='my app' # sets config.app.title
DEVKIT_NODE_db_uri='mongodb://...' # sets config.db.uridocker run --env DEVKIT_NODE_db_uri=mongodb://host.docker.internal/NodeDev --env DEVKIT_NODE_host=0.0.0.0 --rm -p 3000:3000 pierreb/nodeBuild yourself:
docker build -t pierreb/node .With Vue stack as frontend:
docker-compose upThis stack ships with an embedded Claude Code configuration in the .claude/ folder β works immediately after cloning, no additional setup needed.
| Skill | Description |
|---|---|
/verify |
Run quality loop (lint + tests) |
/create-module |
Create new module by duplicating the tasks template |
/feature |
Implement feature following layered architecture rules |
/update-stack |
Merge stack updates into downstream projects |
/naming |
Check or apply file and folder naming conventions |
- Layer order is strict: Routes β Controllers β Services β Repositories β Models
- Controllers must not call repositories directly β always go through services
- Each module is self-contained in
modules/{name}/ - Shared code goes in
lib/helpers/orlib/services/with explicit justification - Tests are organized per module:
modules/*/tests/
git remote add devkit-node https://github.com/pierreb-devkit/Node.git
git fetch devkit-node
git merge devkit-node/masterOpen issues and pull requests on GitHub.
This work is based on MEAN.js and more precisely on a fork named Riess.js. The goal is a simple, easy-to-use toolbox to start and maintain fullstack projects across multiple languages (Vue, Node, Swift ...).