with one click
getting-started
Use when configuring a shared OSRM client in NestJS APIs.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Use when configuring a shared OSRM client in NestJS APIs.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use when creating or updating api specific packages in `packages/api/*`, especially for package structure, exports, module wiring, docs, and validation.
Use when implementing or reviewing HTTP integrations inside api specific packages, especially for transport choice, timeout placement, request shaping, and error handling.
Use when configuring transactional mail delivery in NestJS APIs with @wisemen/nestjs-mail.
Use when generating CSVs in APIs.
Use when scanning NestJS providers with DiscoveryService-backed utilities.
Use when working with the @wisemen/nestjs-custom-fields package — developer-defined custom fields in NestJS with TypeORM persistence and runtime validation. Covers registering the CustomFieldDefinition entity, authoring definitions with customFieldDefinition(), storing resolved values via @CustomFieldValueColumn(), exposing them through CustomFieldValueDto / @IsCustomFields(), and validating submissions with CustomFieldDefinitionsRepository + validateCustomFieldValues(). Use this whenever a task involves custom field definitions, CustomFieldValue columns, custom-field DTOs, or tenant-scoped field definitions, even if the package is not named explicitly.
| name | getting-started |
| description | Use when configuring a shared OSRM client in NestJS APIs. |
Use OsrmModule.forRootAsync(...) to register a shared OSRM client and inject
OsrmClient anywhere the application needs route or table calculations.
import { Module } from '@nestjs/common'
import { ConfigService } from '@nestjs/config'
import { OsrmModule } from '@wisemen/nestjs-osrm'
@Module({
imports: [OsrmModule.forRootAsync({
inject: [ConfigService],
useFactory: (config: ConfigService) => ({
client: {
type: 'service',
url: config.getOrThrow('OSRM_URL')
}
})
})],
exports: [OsrmModule]
})
export class DefaultOsrmModule {}
calculateRoute(...) returns the first route, calculateMultiLegRoute(...)
returns the full OSRM route response, and calculateTable(...) /
calculateTile(...) wrap the table endpoint.
import { Injectable } from '@nestjs/common'
import { OsrmClient } from '@wisemen/nestjs-osrm'
@Injectable()
export class ExampleService {
constructor (private readonly osrm: OsrmClient) {}
async travelTimeBetween (from: Coordinates, to: Coordinates) {
const route = await this.osrm.calculateRoute(from, to, {
overview: false,
annotations: ['distance']
})
return route.duration
}
}
Switch the module to type: 'mock' in test wiring to keep the same injection
surface without calling a live OSRM instance.