KaroKar Backend is the server-side engine for KaroKar, a B2B2C mobility marketplace. Built as a domain-driven modular monolith with NestJS and PostgreSQL, it exposes REST APIs for vehicle fleet management, booking lifecycle orchestration, employee assignments, multi-tenant identity, and compliance auditing — all secured with permission-based JWT authentication.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Codefied-CodePix/Karokar-backend/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Set up the backend locally and make your first API call in minutes.
Architecture
Understand the modular monolith structure and 8 bounded contexts.
API Reference
Explore every endpoint, request schema, and response shape.
Core Concepts
Learn multi-tenancy, event-driven design, and authorization patterns.
What KaroKar Does
KaroKar connects three types of participants on a single platform:- Vendors — organizations that own and rent out vehicle fleets
- Corporate Organizations — companies that book vehicles for their employees
- Employees — end users who receive and use the assigned vehicles
Key Features
Booking State Machine
A strict 9-state lifecycle (DRAFT → COMPLETED/TERMINATED) with validated transitions and domain events at every step.
Fleet & Availability Engine
Time-based vehicle availability with conflict detection — supports reservations, maintenance windows, and suspensions.
Permission-Based Authorization
RBAC with fine-grained
resource.action permissions scoped to organizational context.Event-Driven Architecture
Domains communicate exclusively via domain events — zero direct cross-domain service calls.
Multi-Tenant Isolation
Every entity carries an
organizationId. All queries are tenant-scoped by design.Verification Framework
Generic verification for organizations, users, and vehicles with expiry tracking and document references.
Getting Started
Clone and install
Clone the repository and install dependencies with your preferred Node package manager.
Configure environment
Copy
.env.example to .env and set your PostgreSQL connection string and JWT secret.See the Quickstart guide for the full step-by-step walkthrough with commands and code examples.