Documentation Index
Fetch the complete documentation index at: https://mintlify.com/PloutusLab/krafta-web/llms.txt
Use this file to discover all available pages before exploring further.
Allied print shops join the Krafta network as production partners under the TALLER role. Once onboarded, a workshop receives order assignments, processes each item according to its configured offers and SLA, and hands finished orders to delivery. Krafta currently operates with workshops based in the state of Lara, Venezuela, and the network can be expanded by an admin at any time.
Workshop data model
A Workshop record holds the core identity and operational parameters of a print shop:
| Field | Type | Description |
|---|
name | String | Display name of the workshop |
contactName | String | Primary contact person |
phone | String | Contact phone number |
email | String | Contact email address |
cityBase | String | City where the workshop is physically located |
stateBase | String | Venezuelan state of the workshop |
capacityPerDay | Int | Maximum number of units the workshop can produce per day |
slaDays | Int | Committed turnaround time in business days |
paymentPolicy | PaymentPolicy | When Krafta pays the workshop (see below) |
active | Boolean | Whether the workshop can receive new assignments |
Payment policies
The paymentPolicy field controls when Krafta settles the agreed cost with the workshop:
| Value | Meaning |
|---|
DEPOSITO_TOTAL | Full payment before production begins |
DEPOSITO_PARCIAL | Partial upfront payment, remainder on completion |
PAGO_AL_FINALIZAR | Full payment after production is complete |
PAGO_CONTRA_ENTREGA | Payment when the order is handed to delivery |
Linking users to a workshop
The WorkshopUser model creates a one-to-one link between a User with the TALLER role and a Workshop record:
model WorkshopUser {
id String @id @default(uuid())
userId String @unique
workshopId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
workshop Workshop @relation(fields: [workshopId], references: [id], onDelete: Cascade)
}
A single workshop can have multiple WorkshopUser entries, but each User can only belong to one workshop.
Workshop offers
A WorkshopOffer defines what a workshop charges to produce a specific ProductVariant:
| Field | Description |
|---|
workshopId | The workshop providing this offer |
variantId | The product variant this offer applies to |
cost | Production cost charged by the workshop |
currency | Currency for the cost, defaults to "USD" |
minQuantity | Minimum order quantity for this offer to apply |
reviewRequired | If true, orders using this offer require manual quote review before confirmation |
active | Whether this offer is currently available for routing |
When reviewRequired is true on a WorkshopOffer, an assigned order is not automatically confirmed — it enters a manual review step where the admin or workshop operator must approve the final cost before production begins.
Workshop coverage
WorkshopCoverage records define the geographic areas a workshop can deliver to:
model WorkshopCoverage {
id String @id @default(uuid())
workshopId String
stateName String
cityName String? // Optional: restricts coverage to a specific city
workshop Workshop @relation(fields: [workshopId], references: [id], onDelete: Cascade)
}
A coverage entry with only stateName covers the entire state. Adding a cityName restricts it to that specific city within the state.
Seeded workshops
Two workshops are included in the default seed data and are available immediately after setup:
Taller Creativo Barquisimeto (id: "main-workshop-lara")
cityBase: Barquisimeto, stateBase: Lara
capacityPerDay: 50 units/day
slaDays: 3 business days
paymentPolicy: PAGO_AL_FINALIZAR
Taller Cabudare Premium (id: "taller-cabudare")
cityBase: Cabudare, stateBase: Lara
capacityPerDay: 30 units/day
slaDays: 2 business days
paymentPolicy: DEPOSITO_TOTAL
Both workshops are set to active: true and are immediately selectable as print providers in the creator dashboard publish wizard and in the admin routing panel.
Onboarding a new workshop
New workshops are created by an admin using POST /api/workshops. The endpoint requires the ADMIN role.
POST /api/workshops
Content-Type: application/json
{
"name": "Taller Ejemplo Valera",
"contactName": "María González",
"phone": "04241234567",
"email": "maria@tallerejemplo.com",
"cityBase": "Valera",
"stateBase": "Trujillo",
"capacityPerDay": 20,
"slaDays": 4,
"paymentPolicy": "DEPOSITO_PARCIAL"
}
After the workshop record is created, the admin assigns a TALLER user by creating a WorkshopUser entry. The workshop operator can then log in and access the dashboard at /workshop/dashboard to begin receiving and processing production assignments.