Skip to main content

🚀 TypeScript Server Boilerplate

Welcome to the official MapColonies™ boilerplate for building robust TypeScript servers powered by Express.js!

This boilerplate is packed with pre-configured features, industry-standard packages, and strict linting rules to drastically speed up your development process while guaranteeing top-tier code quality.

🌍 Where do I find it?

Grab the code directly from the MapColonies™ GitHub repository!

🛠️ How do I create a new project?

Starting a new project is effortless. Simply use the boilerplate as a template repository directly in GitHub!

create-repo-boilerplate

👉 Need a step-by-step walkthrough? Check out the Getting Started Guide.

⌨️ Important Scripts

Memorize these! They are your daily drivers:

  • 🟢 npm run start:dev - Spin up the server in hot-reloading development mode.
  • 🚀 npm run start - Boot the server in production mode.
  • 🧪 npm run test - Run the entire test suite.
  • 🔍 npm run test:unit - Run only unit tests.
  • 🔗 npm run test:integration - Run only integration tests.
  • 🧹 npm run lint - Lint the codebase for errors.
  • npm run format:fix - Auto-format the code using Prettier.
  • 🏗️ npm run build - Compile the TypeScript project.
  • 🤖 generate:openapi-types - Auto-generate TypeScript types from your OpenAPI schema!

🤿 Deep Dive

Want to know how it all ticks? Explore the core components of the boilerplate:

1. 🏗️ Code Architecture

A highly modular, resource-driven structure using Express, Dependency Injection, and heavy OpenTelemetry observability.

2. 🧪 Testing Strategy

A robust testing environment powered by Jest and SWC, perfectly configured for blazing-fast unit and integration testing.

3. ⚙️ Repository & Validation

The secret sauce! A massive collection of pre-configured tools (ESLint, Prettier, Husky, Commitlint, Dependabot) working together to enforce elite code quality.

4. 🐳 Deployment

Your app is ready to ship on day one! The boilerplate includes a highly optimized Dockerfile and a standard Helm chart so you can deploy straight to Kubernetes without breaking a sweat.