FPay

Freight Payment Platform

AI-Powered EDI Processing & Payment Management

Active Development

Project Overview

FPay is a comprehensive freight payment processing platform built to streamline payment operations for freight and logistics services. The platform provides complete payment lifecycle management, invoice tracking, and advanced EDI (Electronic Data Interchange) 210 transaction processing capabilities.

What sets FPay apart is its innovative integration with Anthropic's Claude AI to automatically generate realistic freight shipment data and EDI 210 files. Instead of manual data entry, users can leverage AI to create authentic freight data including company names, addresses, realistic weights, freight charges, and all necessary EDI fields.

Timeline

November 2025 - Present

Role

Lead Developer / Architect

Type

Web Application / REST API

Status

Active Development

Tech Stack

Node.js 24 Express.js 4.18 MongoDB Atlas Mongoose 8.0 Claude AI SDK 0.32 Helmet Security Azure Web App Azure DevOps HTML5/CSS3

Development Metrics

40
Commits
5
Data Models
10
Shipment Types
10+
Admin Pages

Key Features

🤖 AI-Powered EDI Generation

Claude AI generates realistic freight data and EDI 210 files. Select shipment type and quantity, get authentic company names, addresses, weights, and charges.

📄 EDI 210 Processing

Full ANSI X12 EDI 210 implementation. Parse existing files, generate new ones, convert to/from JSON, and auto-create invoice records.

💳 Payment Lifecycle

Secure payment processing with complete lifecycle management. Track status from pending through completed with audit trails.

📊 Invoice Management

Full CRUD operations for freight invoices. Track carrier, origin/destination, weights, charges, and payment status.

🚛 Carrier Management

Comprehensive carrier tracking with contact info, rates, and performance metrics. Real-time carrier data management.

🔍 Error Tracking

Custom middleware-based error logging. All errors captured to MongoDB with full context, timestamps, and stack traces.

🔐 Admin Panel

PIN-protected admin interface with multi-page navigation. View errors, manage data, and access system statistics.

📱 Mobile Responsive

Dedicated mobile CSS ensures full functionality on phones and tablets. Touch-optimized interfaces throughout.

Innovation: AI-Generated Freight Data

FPay leverages Claude AI to generate industry-realistic freight shipment data. Users select a shipment type (LTL, FTL, Refrigerated, Flatbed, Intermodal, Hazmat, Expedited, Parcel, White Glove, or Oversized/Heavy Haul) and quantity. Claude then generates authentic company names, addresses appropriate for the shipment type, realistic weights (e.g., lighter for parcel, heavier for oversized), appropriate freight charges, and complete EDI 210 files with proper segment structure. This dramatically accelerates testing and development while ensuring data quality.

EDI 210 Implementation

Full implementation of ANSI X12 EDI 210 (Motor Carrier Freight Details and Invoice) standard with:

EDI Structure

EDI Capabilities

Sample EDI 210 Segment

ISA*00* *00* *ZZ*SENDER123 *ZZ*RECEIVER456 *251115*1430*U*00401*000000001*0*P*~ GS*QM*SENDER123*RECEIVER456*20251115*1430*1*X*004010~ ST*210*0001~ B3*INVOICE123*SHIPMENT456*PP*50000*LB~ N9*BM*BOL123456~ G62*10*20251115~ N1*SF*ABC Logistics~ N3*123 Shipping Lane~ N4*Chicago*IL*60601~ N1*ST*XYZ Distribution~ N3*456 Receiving Blvd~ N4*Dallas*TX*75201~ LX*1~ L5*1*Freight Shipment~ L0*1*50000*LB~ L1*1*FR*5000.00~ L3*50000*LB*5000.00~ SE*16*0001~ GE*1*1~ IEA*1*000000001~

Technical Architecture

AI Integration

FPay uses Anthropic's Claude AI SDK (version 0.32.1) with these capabilities:

Error Tracking System

Custom middleware-based error instrumentation:

Security Implementation

Project Structure

FPay/ ├── server.js # Express server ├── models/ │ ├── Payment.js # Payment lifecycle │ ├── Invoice.js # Invoice management │ ├── Carrier.js # Carrier tracking │ ├── EDIDocument.js # EDI metadata │ └── ErrorLog.js # Error tracking ├── routes/ │ ├── payments.js # Payment APIs │ ├── invoices.js # Invoice APIs │ ├── edi210.js # EDI processing │ ├── carriers.js # Carrier APIs │ └── errors.js # Error retrieval ├── utils/ │ └── edi210Generator.js # EDI class ├── middleware/ │ └── errorLogger.js # Error tracking ├── public/ │ ├── index.html # Dashboard │ ├── admin.html # Admin panel │ ├── edi-generator.html # AI interface │ ├── errors.html # Error viewer │ └── mobile.css # Responsive styles ├── edi_files/ # Generated EDI └── azure-pipelines.yml # CI/CD

Supported Shipment Types

  1. LTL (Less Than Truckload): Partial truckload shipments
  2. FTL (Full Truckload): Dedicated full truck shipments
  3. Refrigerated: Temperature-controlled freight
  4. Flatbed: Open-top trailers for oversized items
  5. Intermodal: Multi-modal transportation (truck/rail/ship)
  6. Hazmat: Hazardous materials requiring special handling
  7. Expedited: Time-critical rush shipments
  8. Parcel: Small package delivery
  9. White Glove: Premium handling and setup services
  10. Oversized/Heavy Haul: Extra-large or overweight cargo

API Endpoints

Payment Management

EDI Processing

System

Deployment

Azure Infrastructure

Build Pipeline

  1. Commit triggers Azure DevOps pipeline
  2. Install Node.js 24 and dependencies
  3. Run tests and linting (if configured)
  4. Package application with node_modules
  5. Deploy to Azure Web App
  6. Restart application with new code

Documentation

FPay includes comprehensive inline documentation:

Future Enhancements

Lessons Learned

← Back to Current Projects