B2B Import ERP is a production-grade, modular enterprise resource planning platform built for industrial B2B companies — specifically ventilation, HVAC, and industrial engineering firms. It covers the complete commercial and operational lifecycle: from initial lead capture and technical pre-engineering wizards, through quoting, multi-level approvals, and job execution, all the way to invoicing, Wompi payment processing, and post-sale warranties. The platform is architected as a true multi-tenant SaaS — every record is scoped to aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ency07/B2B-import/llms.txt
Use this file to discover all available pages before exploring further.
tenant_id enforced at the PostgreSQL Row Level Security (RLS) layer, making it suitable for agencies, resellers, or ISVs who need to serve multiple independent clients from a single Next.js deployment.
What B2B Import ERP Covers
The platform is organized around three major areas of business operations:- Multi-Tenant SaaS Core — Tenant provisioning, white-label branding (logo, colors, domain — zero code changes), user and role management (RBAC), site and area hierarchies, and a full audit trail on every critical state change.
- Commercial Lifecycle — CRM leads with scoring (
CALIENTE/TIBIO/FRÍO/SPAM), B2B client profiles, technical requirements, itemised quotes with multi-level approval workflows, and a public-facing interactive pre-engineering wizard (WizardStepper) for prospect qualification and CFM calculations. - Operations & Finance — Work order (job) management, multi-warehouse inventory stock control with movement history, electronic invoicing, Wompi payment gateway integration with webhook processing, and post-sale warranty claim tracking.
Roles and Access Control
The platform ships with nine pre-defined roles modelled in a full RBAC matrix. Every permission is evaluated at runtime through a three-tier cascade: role defaults → per-user exceptions (user_permissions table) → site-level restrictions.
| Role | Scope |
|---|---|
SUPER_ADMIN | Platform-wide — tenant provisioning, global audit |
ADMIN_EMPRESA | Full tenant admin — users, settings, all modules |
GERENTE_GENERAL | Multi-site visibility — approvals, finance, ops |
DIR_COMERCIAL | Commercial director — quotes, clients, approvals |
EJECUTIVO_COM | Sales executive — CRM, quotes, requirements |
DIR_OPERACIONES | Operations director — jobs, inventory, field ops |
TECNICO_CAMPO | Field technician — job execution, inventory movements |
AUDITOR | Read-only audit access across commercial and finance |
CLIENTE | Client portal — own quotes, invoices, documents |
Technology Choices
B2B Import ERP is built on a deliberately minimal, high-leverage stack chosen for long-term maintainability in enterprise contexts.| Concern | Technology |
|---|---|
| Framework | Next.js 16 (App Router, React 19) |
| Database | PostgreSQL via Supabase |
| Tenant isolation | Row Level Security (RLS) policies |
| Auth | Supabase Auth (GoTrue / JWT) |
| UI Components | Radix UI (headless primitives) |
| Styling | Tailwind CSS v4 |
| Animations | Framer Motion (transitions < 200 ms) |
| Forms | React Hook Form + Zod |
| Charts | Recharts |
| PDF Export | jsPDF (dynamic import, client-side) |
| Excel Export | XLSX |
| Payments | Wompi payment gateway (webhook at /api/webhooks/wompi) |
Architecture Pillars
The codebase is governed by four non-negotiable architectural rules that apply across every module:- No direct database access from the UI. All data mutations flow through Next.js Server Actions. UI components never import or call Supabase directly for business operations.
- Domain layer owns all business rules. Validation, state transitions, approval logic, and audit recording are centralised in Server Actions and utility modules — never scattered across React components.
- Tenant isolation at the RLS layer. Application-level
tenant_idfiltering is supplementary; the RLS policies in PostgreSQL are the security boundary. A compromised application query cannot leak cross-tenant data. - Every action is audited. Create, update, soft-delete, status change, approval, and rejection events are recorded to the
audit_logtable with actor, timestamp, and previous/next state.
Explore the Documentation
Quickstart
Clone the repo, configure environment variables, run migrations, and access your first tenant dashboard in under 10 minutes.
Architecture
Deep-dive into the layered module design, directory structure, and the rules that keep the codebase maintainable at scale.
Multi-Tenancy
Understand how tenant isolation works through PostgreSQL RLS policies and the
tenant_id contract.RBAC & Permissions
Learn how roles, permissions, and per-user exceptions are modelled and enforced across all modules.
The reference implementation ships with two pre-configured demo tenants in the ventilation and industrial engineering sector — AeroMax Industrial (
acme) and Apex Logística B2B (apex). All seed data, product catalogs, and test scripts target this vertical. When deploying for a different industry, tenant settings, catalog data, and the pre-engineering wizard decision trees are fully configurable from the admin panel without touching source code.