Skip to main content

Welcome to ICL Cotizaciones

ICL Cotizaciones is a comprehensive freight quotation management SaaS platform designed for international logistics operations. Built with Next.js 16 and modern web technologies, it streamlines the entire quotation lifecycle from creation to closing.

Quickstart

Get up and running in 5 minutes with your first quotation

Installation

Detailed setup instructions for development and production

User Roles

Understanding the 6 role-based access control levels

Quotation Management

Create and manage FCL/LCL freight quotations

Key Features

Six distinct roles with granular permissions:
  • DIRECTOR: Full system access and administrative control
  • GERENTE: Management-level access to all quotations
  • ADMINISTRACION: Administrative functions and reporting
  • COMERCIAL: Sales representatives managing their own quotations
  • CSV: Customer service operations
  • OPERACIONES: Operations team with quotation visibility
Non-admin roles (COMERCIAL, CSV, OPERACIONES) see only quotations assigned to them, ensuring data privacy and focused workflows.
Complete quotation lifecycle management:
  • FCL & LCL Support: Handle both Full Container Load and Less than Container Load shipments
  • Auto-numbering: Automatic quote number generation with format COT-YYMM-NNNN
  • Route Management: Track origin, via ports, and destination with comprehensive location database
  • Cost Structure: Detailed net/sale pricing for freight and origin costs
  • Status Tracking: Five-state lifecycle (En Cotización, Ganada, Perdida, Pendiente, Pend A/C)
  • Profit Calculation: Automatic margin calculation between net and sale prices
Robust client relationship tools:
  • Client Types: FFWW (freight forwarder), Final (end client), or Both
  • Commercial Agreements: Store negotiated rates, payment terms, and special conditions
  • Auto-assignment: Clients linked to their designated sales representatives
  • Agreement Loading: Automatic population of fiscal deposit costs from stored agreements
Sophisticated pricing management:
  • Port Rate Tables: Base tariffs by port of loading with volume-based pricing tiers
  • Net Pricing Tables: Unified FCL/LCL rate management with currency support (USD, EUR, ARS)
  • Auto-suggestions: System recommends freight rates based on port and cargo volume
  • Rate Validity: Track pricing validity periods for compliance
Business intelligence at your fingertips:
  • Weekly Grouping: Quotations organized by calendar week for pipeline visibility
  • Multi-dimensional Filtering: Filter by date range, client, status, sales rep, and port
  • Profit Analysis: Real-time margin tracking across all quotations
  • Export Capabilities: Generate reports in multiple formats

Technology Stack

Frontend

  • Next.js 16 (App Router)
  • React 19 with Server Components
  • Tailwind CSS v4
  • Radix UI primitives
  • TanStack Table for data grids

Backend

  • Next.js API Routes
  • SQLite with better-sqlite3
  • Drizzle ORM
  • Iron Session for auth
  • bcryptjs for password hashing

DevOps

  • TypeScript 5.9
  • Drizzle Kit for migrations
  • WAL mode for concurrent access
  • Node.js runtime

Core Entities

The system manages five primary data entities:
EntityDescriptionKey Fields
QuotationsFreight quotes with full pricingQuote number, route, cargo details, costs, status
ClientsFFWW customers and end clientsLegal name, tax ID, client type, assigned sales rep
Commercial AgreementsNegotiated terms per clientRate schedules, fiscal deposit costs, payment terms
LocationsPorts and origin citiesName, country, region, type (origin/via)
Pricing TablesBase rates and net pricingPort rates, FCL/LCL pricing, volume tiers, validity
All quotations include automatic profit calculation: profit = (freight_sale - freight_net) + (origin_costs_sale - origin_costs_net)

Quotation Workflow

Non-admin users can only view and edit quotations assigned to them. The system enforces this at both the API and UI levels.

Getting Started

Ready to deploy ICL Cotizaciones? Follow our quickstart guide to get your instance running:

Quickstart Guide

Install dependencies, seed the database, and create your first quotation in under 5 minutes

Database Schema Highlights

ICL Cotizaciones uses SQLite with the following key tables:
// Core user authentication and authorization
export const users = sqliteTable("users", {
  id: integer("id").primaryKey({ autoIncrement: true }),
  full_name: text("full_name").notNull(),
  email: text("email").notNull().unique(),
  password: text("password").notNull(),
  role: text("role", { 
    enum: ["DIRECTOR", "GERENTE", "COMERCIAL", "CSV", "OPERACIONES", "ADMINISTRACION"] 
  }).notNull(),
  is_active: integer("is_active", { mode: "boolean" }).notNull().default(true),
});

// Client management with sales rep assignment
export const clients = sqliteTable("clients", {
  id: integer("id").primaryKey({ autoIncrement: true }),
  legal_name: text("legal_name").notNull(),
  tax_id: text("tax_id"),
  client_type: text("client_type", { 
    enum: ["FFWW", "Final", "Both"] 
  }).notNull().default("FFWW"),
  user_id: integer("user_id").references(() => users.id),
});

// Comprehensive quotation entity
export const quotations = sqliteTable("quotations", {
  id: integer("id").primaryKey({ autoIncrement: true }),
  quote_number: text("quote_number").notNull().unique(),
  date: text("date").notNull(),
  load_type: text("load_type", { enum: ["FCL", "LCL"] }).notNull(),
  client_id: integer("client_id").references(() => clients.id),
  origin_id: integer("origin_id").references(() => locations.id),
  via_id: integer("via_id").references(() => locations.id),
  status: text("status", { 
    enum: ["SI", "NO", "PEND", "ENCOTIZACION", "PEND A/C"] 
  }).notNull(),
  profit: real("profit"),
});

Support & Documentation

API Reference

Complete REST API documentation with examples

Deployment Guide

Production deployment best practices

Build docs developers (and LLMs) love