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
-
Environment Setup
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env -
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 -
Access Documentation
# Swagger UI
http://localhost:4200/api
Need Help?
- Check our Troubleshooting Guide
- Submit issues on GitHub