This guide walks you through running Krafta on your local machine from a fresh clone to a fully functional development environment, including a seeded admin account and a working checkout flow. The entire setup requires only Node.js and npm — no Docker, no external database, and no Supabase credentials for local development.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.
Krafta includes a local filesystem fallback for all file uploads. When Supabase environment variables are absent or set to placeholder values, design files and payment receipts are saved to
public/uploads/ instead of a private Supabase bucket. This means you can explore the full feature set — including the design editor and payment submission flow — without any cloud credentials.Prerequisites and clone
Make sure you have Node.js 18 or later and npm installed. Then clone the repository and move into the project directory:
Install dependencies
Install all runtime and development dependencies. Krafta uses standard npm conventions and is compatible with yarn and pnpm as well.Key packages installed include Next.js 16, React 19, Prisma with the libSQL adapter, Fabric.js, Supabase JS client, Sharp, and Zod.
Configure environment variables
Create a To enable Supabase Storage for design files and receipts, add the following optional variables. If they are omitted or left as placeholders, the platform automatically falls back to the local filesystem.
.env file at the project root with at minimum the two required variables:.env
.env
Never commit your
.env file. The repository’s .gitignore already excludes it.Run database migrations
Krafta uses Prisma to manage the SQLite schema. For a fresh local setup, you have two options:Option A — Full migration history (recommended for development):This applies all existing migrations in This synchronises the current
prisma/migrations/, generates the Prisma Client, and prompts you to name any new migration if you have edited the schema.Option B — Push schema directly (fastest for a quick first look):prisma/schema.prisma to the database without creating a migration history entry. It is useful for prototyping but should not be used in production environments.Start the development server
Start the Next.js development server with Turbopack enabled:Open http://localhost:3000 in your browser. You will see the Krafta storefront homepage with the product catalog, design editor, and creator portal links in the header.
Seed an admin user and access the admin panel
Krafta does not ship a seed script by default, so the easiest way to create an admin account is via the register endpoint followed by a manual role update.Step 1 — Register a new account by visiting http://localhost:3000/creator or calling the API directly:This creates a user with the default Open http://localhost:5555 in your browser, navigate to the User table, find the record for Step 3 — Log in and visit the admin panel at http://localhost:3000/creator. After signing in with your admin credentials, navigate to http://localhost:3000/admin. The middleware will verify your JWT, confirm the
CLIENTE role.Step 2 — Promote to ADMIN using Prisma Studio:admin@krafta.local, and change the role field from CLIENTE to ADMIN. Save the record.Alternatively, you can update the role directly with the Prisma CLI:ADMIN role, and grant access.Next steps
With the server running and an admin account created, you can:- Add products and variants from the admin catalog panel at
/admin/catalog/create. - Open the design editor at
/editorand upload a PNG or SVG design file. - Complete a test checkout using the Pago Móvil or bank transfer payment flow and approve the submission in
/admin/payments. - Register a workshop account and view the production dashboard at
/workshop/dashboard.
