Expressure is a robust and opinionated boilerplate designed to streamline
the development of scalable Node.js APIs. Built with Express.js 5,
TypeScript, and OpenAPI 3, it provides a solid foundation for both
monolithic applications and microservices.
We've handled the heavy liftingβconfiguration, structure, and toolingβso you can focus on building features with zero friction.
- π Modern Stack: Built on Express.js 5 and Node.js 20+.
- πͺ Type-Safe: Full TypeScript support for robust and maintainable code.
- π OpenAPI 3 First: API-first design with auto-generated Swagger documentation.
- π³ Docker Ready: Pre-configured
Dockerfileanddocker-composefor seamless containerization. - π‘οΈ Secure: Integrated
Helmetfor security headers andCorsconfiguration. - π Logging: High-performance logging with
Pino. - π§ͺ Testing: Comprehensive testing setup with
Jest. - π§Ή Code Quality: Linting and formatting with
ESLint,Prettier, andHuskyhooks. - βοΈ Configurable: Environment-based configuration management.
Before you begin, ensure you have the following installed:
- Node.js: v20.x or higher
- PNPM: v10.23.0 or higher (Recommended package manager)
- Docker: v27.x or higher (Optional, but recommended for containerization)
git clone git@github.com:vihuvac/expressure.git
cd expressureSet up your environment variables by copying the template:
cp .env.template .envIMPORTANT
Ensure
NODE_ENVis set todevelopmentfor local work. Adjust other settings in.envorconfig/development.jsonas needed.
pnpm install --frozen-lockfileStarts the application with hot-reloading.
pnpm devRuns the app with inspection enabled on port 9888.
pnpm debugBuilds and starts the compiled JavaScript application.
pnpm build
pnpm startExpressure comes with first-class Docker support.
pnpm docker:up
# OR
docker compose up -dThis will start the API and detach it to the background.
docker logs -f expressurepnpm docker:downWhen the application is running (in non-production environments), you can access the interactive API documentation via Swagger UI.
URL: http://localhost:9889/api/docs
Generate comprehensive technical documentation from your code comments using
JSDoc. Documentation is automatically versioned and saved to the docs
directory.
pnpm docs:generatesrc/
βββ app/
β βββ constants/ # Global constants and enums
β βββ controllers/ # Route controllers (request handlers)
β βββ helpers/ # Utility functions and helpers
β βββ libs/ # Third-party library wrappers/configurations
β βββ middlewares/ # Express middlewares
β βββ specs/ # OpenAPI specifications
β βββ app.ts # App entry point and configuration
βββ tests/ # Unit and integration tests
βββ app.ts # Main entry file
Ensure your code is reliable by running the test suite.
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:debug
# Generate coverage report
pnpm test:coverageContributions are welcome! Check out the Contribution Guide.
This project is licensed under the MIT License. See the LICENSE file for more details.


