Track all changes, improvements, and new features in the Bill of Entry system.
Mandatory and conditional document capture with progression gating, vessel ETA tracking, a Step-2 vetting checklist with HS-module lookup, an intake-first create dialog, and admin-as-supervisor access.
One-click, auto-playing, benefit-led product demos that span multiple pages and fake their submissions. Built as a project-agnostic module so the same engine can drive demos in other apps.
Status-driven tracking of sea-freight clearing (Box 1โ9) with role-based task assignment, mandatory confirmations/guards before progression, blocking reasons, and an audit timeline. Document upload gating, ASYCUDA reminder timers, SLA alerts/notifications, and reporting are planned for later phases.
A guarded event bridge lets guided tours open real dialogs and inject temporary demo data (demo BL/AWB, demo Excel mapping rows, sample HS search) that always reverts. The create-BOE, HS-code and BOE-lifecycle tours were reworked to anchor to real elements and showcase the add-item and Excel-import flows hands-on.
Render the HS-code hierarchy in 40-row chunks with infinite scroll, and replace the per-row selection-logging mutation with a single shared handler. Eliminates the hundreds-to-thousands of React/tRPC hooks that made the page and picker modal slow.
Converted four client-side HS-code modules from the inline `import { type X }` form to `import type { X }` so Next 16.2 Turbopack correctly elides the server router graph from client bundles, fixing the runtime crash on the New Bill of Entry and HS-code pages.
Bumped Next.js to 16.2.7 to match the other deployed apps and pick up upstream fixes. Resolved the stricter Turbopack module-boundary errors by making server-only code unambiguously server-side (type-only router/Decimal imports, a server-only guard on the PDF generator, and serverExternalPackages for the puppeteer/chromium stack).
Ported a real binary .xlsx generator (xlsx-js-style) and applied it to the Stock List export plus new Export-to-Excel buttons on the Bills of Entry list, the manifest Bills of Lading tab, and the Delivery Order / Arrival Notice dialogs. Output matches the legacy FastReport header, columns and totals. Purely additive โ every pre-existing export format (HTML, Text/CSV, XML, Print, PDF) is retained.
Added a first-visit welcome tour (auto-starts once, replayable from Help), a cross-cutting reporting/export tour, an Arrival Notices tracking tour, and end-to-end Manifest and Bill of Entry workflow tours. Tours explicitly cover the consignee email/notification flow (Brevo) and the customs ASYCUDA export.
Removed the right-side code-preview panel that overflowed the viewport on mobile and rebuilt the hero as a single centered column with a wrapping badge and stacked, full-width CTA buttons.
Replaced the Prev/Next-only footer in the HS-code search results with numbered page buttons (active highlight, ellipses, ARIA labels) and sorted the chapter filter numerically instead of lexicographically.
Introduced a Shepherd.js-based guided tour engine with a Help launcher available on every dashboard page, plus dedicated tours for the Create Bill of Entry, HS-Code browser, and Manifest Import workflows.
Added integration tests using the tRPC createCaller for Bill of Entry create/edit and manifest import, covering happy paths, validation/authorization errors, and editable round-trips.
Fixed tenant filtering to check both created_by_id and user_id fields with OR logic. All 589 manifests now visible to correct users. Dashboard statistics now accurate.
Fixed shipping_marks minLength validation by using consignee name as fallback. Added container type mapping from database. XML exports now 100% compliant with customs requirements.
Successfully imported 589 manifests, 44,511 bills of lading, and 71,600 containers from SSN production data. 99.996% success rate with only 2 encoding errors. Complete traceability with legacy IDs maintained.
Added full support for India's Nhava Sheva port manifest format. Automatic detection, smart parsing, and support for special cargo (hazardous, reefer, OOG). Multiple containers per BOL supported.
Created manual column mapping modal with fuzzy matching for unknown formats. Category-based organization, required field validation, and real-time progress tracking. User-friendly fallback for non-standard files.
Imported 28 container types (20DC, 40HC, 40RE, etc.) and 37 package types (BG, CTN, PK, BX, etc.) from production system. Full ASYCUDA code mappings for customs compliance.
Full-featured company settings page with 5 organized tabs: Company Info, Email (SMTP), PDF Paths, Templates, and Documents. Complete CRUD operations for all company_settings schema fields with real-time updates.
Real-time error tracking system displaying error counts on each tab. Created useTabErrors hook and ErrorBadge component for visual feedback, helping users quickly identify and fix validation issues.
Implemented React 19 Activity API for all 8 BOE form tabs (general, transport, cargo, commercial, permits, other, taxes, asycuda). Tab state now persists when switching, eliminating re-mounting and preserving form field values.
Complete SMTP configuration system with test connection and send test email functionality. Supports custom email messages for arrival notices and delivery orders with template variables.
Tenant-specific branding with custom logo URLs, header text, subtitle text, footer company info, addresses, and contact information for professional document generation.
Created /references page organizing 40+ reference types into 6 categories: Geographic & Shipping, Cargo & Containers, Charges & Tariffs, Parties & Organizations, Customs & Compliance, and System Configuration.
Complete demurrage charge system with tenant-specific and global charges. Supports DRY, REEFER, and SPECIAL container types with 4-period pricing tiers, free days configuration, and effective date ranges.
Tenant-specific container deposit management with per-TEU pricing, payment terms, refund policies, and active/inactive status tracking with soft delete support.
Custom arrival notice and delivery order template for SSN tenant matching legacy PDF format. Includes logo positioning, company info layout, demurrage display, and deposit fee sections.
Resolved 14 type errors by changing ctx.session.user.id to ctx.userId throughout charges router, aligning with protectedProcedure middleware conventions.
Complete Excel import workflow with auto-detection, tenant-specific access control, and comprehensive vessel info extraction. Supports large files with chunked processing.
Improved tour system with validation, step completion tracking, confirmation dialogs, and better user guidance through complex workflows.
Fixed table headers, voyage number display issues, and improved data formatting with clean fallbacks for missing information.
New party management system with auto-complete functionality for consignees and shippers, integrated with manifest and BOL workflows.
Added complete degroup implementation docs, workflow guides, and UI flow mapping for better system understanding and user training.
Implemented comprehensive admin interfaces for container charges and system parameters management. Features full CRUD operations, professional card-based navigation, and type-safe database integration with proper validation and error handling.
Achieved zero TypeScript compilation errors through systematic interface alignment with database schemas. Fixed all type mismatches, null vs undefined handling, and Decimal type conversions for production-ready code safety.
Added comprehensive system parameters management with support for decimal, integer, boolean, and string types. Includes utility functions for configuration access, proper validation, and tenant-configurable settings.
Professional container charges management with pricing control, soft deletion support, and comprehensive CRUD operations. Features type-safe interfaces with proper database schema alignment.
Added professional reference data card components to dashboard providing centralized access to administrative functions. Improved user experience with consistent UI patterns and intuitive navigation.
Implemented modern arrival notice printing with react-to-print contentRef API, proper document generation, and comprehensive manifest data integration for shipping operations.
Created comprehensive schema documentation system with backup tools and comment preservation. Ensures database schema knowledge is maintained during development and migration processes.
Maintained 100% compatibility with legacy business rules while adding modern reference data management. Updated LegacyMapper with comprehensive documentation and field mapping strategies.
Created AutoCreationHelper.ts with safe auto-creation functions for approved reference data types (suppliers, importers, warehouses, points of entry). Features skipIfExists logic, silentFail error handling, and user isolation with proper transaction patterns.
Integrated auto-creation into Excel import workflow to automatically create missing reference data before BOE creation. Reduces manual setup and prevents import failures due to missing relationships.
Enhanced manifest.ts with UN LOCODE port auto-creation during XML processing. Automatically creates departure and arrival ports to prevent XML import failures due to missing port references.
Fixed seed-ports.ts country lookup from iso2_code to code field, resolving seeding failures. Ensures proper country relationships for port data during system initialization.
Resolved merge conflicts using evidence-based approach following LegacyMapper patterns. Preserved both implementations with //todo markers, no code removal, and maintained legacy compliance patterns.
Created stocklist page for inventory management functionality with consistent UI patterns and legacy-compliant data handling for improved inventory tracking.
Enhanced HS code requests table with improved filtering and display capabilities, maintaining consistency with existing UI patterns for better user experience.
Implemented comprehensive error handling ensuring auto-creation operations don't disrupt core business processes. Features silent failure modes and graceful degradation to maintain system stability.
Resolved country router conflicts and updated TaxCalculator.ts with preserved legacy compliance patterns. Applied evidence-based conflict resolution maintaining dual implementations.
Successfully executed Priority 1 migration of 498 suppliers from legacy TXEEXPORTR and 24 importers from legacy TXEIMPORTR tables. Resolved critical data gaps where importer/exporter dropdowns were nearly empty (23 vs 500+ expected, 9 vs 300+ expected), making system appear non-functional.
Created three comprehensive analysis documents: MIGRATION_VERIFICATION_ANALYSIS.md (initial 95% assessment), DEEP_DIVE_MIGRATION_ANALYSIS.md (47-section technical analysis), and MIGRATION_DATA_GAPS_ANALYSIS.md (critical data gaps discovery). Identified schema vs operational data discrepancy.
Created migrate-trading-partners.ts (executed successfully) and migrate-manifest-operational-data.ts (ready for future use). Scripts include proper error handling, duplicate detection, ESM compatibility, and correct Prisma client integration.
Fixed Prisma client import paths ('db' vs '@prisma/client'), resolved ESM module compatibility issues, corrected database field mappings to match actual schema structure (name vs company_name, telephone vs telephone_no), and implemented proper user ID handling.
Fixed duplicate changelog routes error preventing build compilation by removing conflicting /dashboard/changelog/page.tsx while preserving comprehensive changelog progress in main /changelog/page.tsx.
Transformed system from appearing empty/non-functional to professional operational status with real historical data. BOE forms now reference actual trading partners, dropdowns populated with 500+ companies, establishing foundation for incremental manifest data addition.
Classified data as tenant-specific (Mahe Shipping), system-wide, and hybrid categories. Documented business impact: empty search results โ rich historical data, limited dropdowns โ complete options, poor UX โ professional appearance.
Systematically resolved ~95+ TypeScript compilation errors through evidence-based field mapping corrections cross-referenced against LegacyMapper.ts documentation and legacy system analysis.
Restored critical custom_number field mapping to ICICUNUM legacy field and corrected snake_case database field mappings (line_status, export_line_items) with proper data structure for HS codes and pricing.
Corrected vessel nationality field mapping from transporter_nationality_code to vessel_nationality per LegacyMapper.ts verification. Fixed package fields, transport mode, and mass field mappings.
Replaced invalid ctx.procedures with direct database queries aligned with LEVRULES table access patterns for proper environmental levy calculations.
Removed problematic optimizePackageImports configuration causing webpack caching conflicts. Fixed PrismaClientKnownRequestError import paths from incorrect 'db/runtime/library' to '@prisma/client/runtime/library'.
All field mapping changes cross-referenced against LegacyMapper.ts documentation ensuring accuracy and preventing future migration issues. Comprehensive legacy system integration verification.
Achieved clean TypeScript compilation with zero errors, successful generation of all 34 static pages, and optimized bundle sizes ready for production deployment.
Fixed critical XML export issue where generated XML had empty fields (voyage_number, customs_office_code, etc.) compared to legacy samples. Added missing SCPO point of entry and created proper test BOE data for validation.
Made description field optional in BOE line items by removing required validation from tempBillItemSchema. Users can now submit items without forced description entry.
Enhanced package type dropdown to show format 'Description (Code)' instead of 'Description Code'. Users can now easily see that code '08' corresponds to 'Units/Pcs (08)'.
Confirmed backend properly supports manual HS code entry (returns hsCodeFound: false but allows operation). Resolved any frontend validation issues that were blocking manual HS code entry.
Created comprehensive XML testing script (fix-xml-export-data.ts) that automatically validates XML exports against legacy samples with field-by-field comparison for quality assurance.
Conducted complete manual testing using ALAIN_019.xml legacy sample data. User successfully generated XML matching legacy format, confirming full workflow functionality.
Successfully migrated 15,054 international ports from SPACE95MANIFEST.GDB with proper country relationships and port classification. Includes comprehensive parsing of MPORTS table with legacy ID preservation and code standardization.
Complete migration system for Bills of Entry from TXEBOE and TXEBOELINS tables. Successfully parsed 651 BOE headers and 43,785 line items with proper field mapping (cif_value, line_no, unit_id) and foreign key relationship handling.
Fixed critical NextAuth compatibility issues caused by downgrade from v5.0.0-beta.25 to v4.24.11. Restored proper middleware functionality and resolved 'Invalid value used as weak map key' runtime errors.
Systematic fix of camelCase vs snake_case field naming inconsistencies across CIC export permits, reference data, and user models. Corrected deletedAt โ deleted_at, permitYear โ permit_year, createdBy โ created_by throughout the system.
Added comprehensive migration commands to package.json: db:migrate-boe, db:migrate-full, db:migrate-all for different migration scenarios. Includes proper script organization and execution flow.
Created missing-legacy-fields-2025-01-04.md with comprehensive analysis of TXEBOE and TXEBOELINS field mappings. Documented successfully mapped fields and identified areas requiring future migration phases.
Migrated environmental levy rules from BOESYS LEVRULES table with HS code mapping, unit costs, and quantity application rules. Supports plastic bottle levies (0.7 SCR) and container-based calculations.
Complete migration of TAXCONSC table with concession codes, descriptions, GST percentages, and tax percentages. Includes proper null handling and percentage validation.
Updated LegacyMapper.ts with comprehensive migration documentation including command usage, data analysis results, and field mapping strategies. Serves as central reference for legacy system integration.
Fixed Prisma schema relationship issues by correcting foreign key field usage (user_id vs user relation), proper connection syntax, and field name alignment with database schema.
Implemented comprehensive migration result validation with PostgreSQL queries for record counts, data integrity checks, and successful migration confirmation. Includes psql-based verification workflows.
Fixed package types frontend and API consistency by aligning code field usage (package_code) and resolving React key prop issues in tax concession codes component.
New freight_rate_config model and freightRateConfigRouter with full CRUD operations. Replaces hardcoded values (doFee: 250.00, cfsCharge2: 140.00, vatPercentage: 15.0) with database-configurable parameters. Supports multi-tenant rates and temporal validity.
Complete environmental_levy_rules system for HS-code specific levies from legacy LEVRULES table. Supports plastic bottles (0.7 SCR), beverages (0.25 SCR/liter), containers with quantity-based calculations and partial HS code matching.
Updated manifest-freight-calculator.ts to use configurable rates via getDefaultManifestFreightParams() with database integration and fallback to hardcoded values for backwards compatibility.
Both freight rates and environmental levies support tenant-specific configurations (tenant_id field) allowing different organizations to maintain custom rate structures while supporting system-wide defaults.
Added effective_from and effective_to fields enabling scheduled rate changes, historical rate tracking, and seamless rate transitions without system downtime.
Complete legacy database analysis with 199,144 lines of structured data from BOESYS.gdb (60,085 lines, 44 tables) and SPACE95MANIFEST.GDB (139,059 lines, 18 tables) for comprehensive system migration.
Created seed-freight-rates.ts with default Seychelles configurations including all 10 freight parameters (D/O fee, CFS rates, VAT, exchange rates) and environmental levy samples for immediate system usability.
Documented existing tax_concession_codes system with comprehensive tRPC router functionality. Fixed seed file field mapping (conc_code vs concession_code) for proper database integration.
Added freightRateConfig and environmentalLevyRules routers to main appRouter with role-based access control (adminProcedure for modifications, protectedProcedure for queries).
All new systems implement proper RBAC with admin-only procedures for rate modifications and protected procedures for queries, ensuring secure configuration management.
Added refetch mechanism to automatically update total_weight field after container operations. Users no longer need to manually refresh to see calculated weights.
Fixed exchange rate field not updating when currency is changed. Added getAutoExchangeRate logic with form.setValue and proper reactivity flags.
Fixed missing exchange rate auto-update logic in shared CommercialTab component used by Excel import modals. All forms now have consistent behavior.
Fixed Decimal type casting issues in bill data refetch operations and Prisma transaction type compatibility for container weight calculator.
Added w-64 class to constrain dropdown width instead of stretching full width, improving visual appearance and usability.
Reduced max height from 320px to 240px (max-h-60) to prevent overflow while maintaining scrollability.
Added overflow-auto to Card for proper scrolling behavior and better content management.
Restructured layout with flex-col to pin footer at bottom and added flex-1 to ScrollArea for proper space distribution.
Fixed dashboard role-based access control using ServerBOEOnly, ServerManifestOnly, ServerViewerPlus guards to properly restrict access based on user roles.
BOE users can no longer see Manifest Management sections and viewer users cannot access creation buttons and forms.
Implemented comprehensive server-side role guards throughout the application to prevent unauthorized access.
Updated users list to use server-side role checking instead of client-side for improved security.
Resolved TypeScript compilation errors in auth config and components, fixed type-only imports.
Added RoleBasedNavigation component for consistent role-based menu rendering across the application.
Implemented getServerRolePermissions helper for centralized role checking and permission management.
Successfully tested with seeded accounts (System Owner, Admin, BOE user, Manifest user, Viewer) and verified Excel import functionality.
Added user_id fields to all tenant-scoped models (bills_of_entry, importers, suppliers, manifests, warehouses) for complete data isolation between shipping companies.
New platform-wide dashboard showing tenant statistics, license distribution, API usage across all tenants, and top active tenants with proper root user detection.
Updated all TRPC procedures to enforce tenant boundaries with user_id filtering in queries and access control checks.
Added 'What's New' badge linking to changelog and footer navigation for better user discovery of new features.
Implemented role-based access control with audit capabilities, permission middleware, and granular resource-action permissions.
Created comprehensive seed data with system owner and Mahe Shipping tenant users, including proper role assignments and data relationships.
Fixed system owner detection to use authenticated user data instead of insecure URL parameters. All system owner checks now based on database user profile.
Added getSystemWideAll procedures for Bills of Entry allowing system owners to view all tenant data with proper tenant identification columns.
Enhanced system owner dashboard to focus on platform management and user administration instead of data creation, with read-only oversight capabilities.
Resolved compilation errors and refactored authentication middleware for better type safety and reliability.
Comprehensive legacy-compatible calculation system for duties, taxes, and fees with accurate weight distribution and duty computation.
Legacy-compatible Bills of Entry creation from manifest data with comprehensive analysis and automatic field mapping.
Intelligent shipping marks auto-population system with legacy compatibility and comprehensive container-to-item mapping.
Added dedicated navigation link for HS code requests in the admin menu for better accessibility.
Added prominent disclaimer on pricing page to clarify demo pricing vs actual costs.
Implemented comprehensive system to preserve user-selected HS codes during imports and updates, preventing data loss.
New user-driven system allowing users to request HS code updates with admin review and approval workflow.
Enhanced HS code search with better caching and faster lookup performance for improved user experience.
Resolved various TypeScript compilation issues for better development experience and build stability.
Improved authentication middleware for better security and performance.
Implemented comprehensive RBAC system with roles, permissions, and resource-based access control.
Added comprehensive audit logging system to track user actions and system changes for compliance and security.
Implemented comprehensive auto-calculation system compatible with legacy BOE processing requirements.
Implemented BOE creation from manifest data with full legacy system compatibility and comprehensive analysis.
Added comprehensive shipping marks auto-population with legacy compatibility for streamlined data entry.
This changelog is automatically updated with each release. For technical details, check our git commit history.