NodeAPI Starter — Express + MySQL REST Boilerplate
A production-ready REST API starter: JWT auth, roles, Zod validation, Drizzle, Swagger and Docker.
- Starter Kit
- nodejs
- express
- mysql
- rest-api
- boilerplate

Price: FreeFree
Free license · Free: no payment, no account. ·
- JWT auth with refresh tokens
- Role-based access control
- Zod validation on every route
- Swagger docs generated for you
- Docker, tests and CI included
Start your API on day one, not week three
NodeAPI Starter is the boring-but-essential part of every backend, done: authentication, roles, validation, database, docs, tests and deployment. Clone it and start writing features.

What's inside
Express 5 with TypeScript
JWT auth with refresh tokens and role-based access
Zod validation and typed request handlers
Drizzle ORM with MySQL migrations
Swagger (OpenAPI) docs at /docs
Docker Compose, Vitest tests and GitHub Actions
Get started
git clone nodeapi-starter && cd nodeapi-starter
cp .env.example .env
docker compose up -d
npm run devOpen http://localhost:4000/docs to try every route.
- JWT authenticationAccess and refresh tokens, rotation and logout.
- Role-based accessRoles and permissions checked by middleware.
- Zod validationBodies, queries and params validated and typed.
- Drizzle ORMTyped MySQL schema and migrations.
- Swagger docsOpenAPI generated from the Zod schemas.
- DockerAPI and MySQL with one docker compose up.
- TestsVitest and Supertest, 48 tests out of the box.
- CIGitHub Actions: lint, typecheck, test on every push.
- Security defaultsHelmet, CORS, rate limiting and structured errors.
- LoggingRequest logs with Pino, without secrets.
Free license
Free for personal and commercial projects.
Attribution is appreciated but not required. You may not resell or redistribute the source files as they are.
Is it really free?
Yes, under the free license: personal and commercial projects, no attribution required.
Which Node.js version?
Node.js 20 or later.
Can I use PostgreSQL?
It is built for MySQL, but Drizzle supports PostgreSQL; switching takes a new schema file and connection.
How do I add a route?
Write a Zod schema, a handler and one line in the router; the Swagger docs pick it up.
Do I need Docker?
No. Docker is there for convenience; the API runs with any MySQL server.
1.0.0
First public release.
0.9.0
Swagger docs from Zod schemas; refresh-token rotation.
Gallery
NodeAPI Starter docs
Terminal
The users router in the editor
Users endpoints with request and response examples



