Skip to main content

API Overview

The Wrkbelt API is built on NestJS, providing a robust and scalable backend for service business operations. Our API is designed with developer experience in mind, offering clear patterns, comprehensive documentation, and type safety throughout.

Core Concepts

  • TypeScript First - Built with TypeScript for excellent type safety and developer experience
  • Domain-Driven Design - Organized around business domains for clarity and maintainability
  • Clean Architecture - Clear separation of concerns with layered architecture
  • OpenAPI/Swagger - Comprehensive API documentation with interactive testing

Key Sections

Data Models

Our data model documentation covers:

  • Entity relationships and ERDs
  • Field definitions and types
  • Validation rules and constraints
  • Integration points with external systems

Services

Core services that power the platform:

  • Appointment scheduling engine
  • ServiceTitan integration service
  • Payment processing service (Stripe)
  • Notification service

Libraries

Shared libraries and utilities:

  • Common DTOs and interfaces
  • Validation pipes and decorators
  • Testing utilities
  • Helper functions

Patterns

Established patterns and best practices:

  • Request/Response handling
  • Error management
  • Authentication and authorization
  • Caching strategies
  • Transaction management

Getting Started

  1. Environment Setup

    # Install dependencies
    pnpm install

    # Set up environment variables
    cp .env.example .env
  2. Run the API

    # Development mode
    pnpm exec nx run api:serve

    # Production build
    pnpm exec nx run api:build:production && pnpm exec nx run api:serve:production
  3. Access Documentation

    # Swagger UI
    http://localhost:4200/api

Need Help?