Import/Export Log
Build with AI Agent
Import/Export Log Backend

Import/Export Log Backend Template
HTS Codes, Duty Logs, and Customs Entry History

A production-ready import/export log backend on Back4app with HTS codes, duty logs, and customs entry history. Includes ER diagram, data dictionary, JSON schema, API playground, and an AI Agent prompt for fast setup.

Key Takeaways for Log Operations

This template gives you an import/export log backend with HTS codes, duty logs, and customs entry history so operations staff can review entries and shipments in one place.

  1. HTS code trackingStore HTSCode rows with tariff numbers, descriptions, and country-specific classification notes.
  2. Duty log historyKeep duty log entries tied to shipments, entry numbers, and assessed amounts.
  3. Customs entry historyReview Entry records by port, broker, filing date, and release status.
  4. Shipment visibilityLink Shipment and CustomsEntry classes so staff can follow each import or export from filing to clearance.

Overview: Import/Export Log

In import/export log, “we usually do it this way” is not a control — documented steps and captured outcomes are. On Back4app, Shipment, HTSCode, DutyLog, CustomsEntry, and AuditNote connect into a coherent import/export log narrative instead of a pile of disconnected tickets and files. The schema covers Shipment (shipmentNo, direction, originPort, destinationPort), HTSCode (code, description, dutyRate), DutyLog (shipment, htsCode, dutyAmount, assessedBy), CustomsEntry (entryNo, broker, filedAt, releaseStatus), and AuditNote (entry, note, author) with auth and role-based access built in. Connect your frontend and start logging customs activity faster.

Best for:

Import/export operations teamsCustoms entry tracking toolsDuty calculation dashboardsHTS classification directoriesBroker and coordinator portalsTeams choosing BaaS for logistics workflows

How this Import/export Log backend is organized

Mobile crews and back-office staff see different slices of reality in import/export log; the product job is to stitch those slices without blame games.

Review Shipment, HTSCode, and DutyLog first, then open a stack card to see SDK-specific notes and integration patterns.

Core Import/Export Log Features

Every technology card in this hub uses the same import/export log schema with Shipment, HTSCode, DutyLog, CustomsEntry, and AuditNote.

Shipment tracking

Shipment stores shipmentNo, direction, originPort, destinationPort, and status.

HTS code library

HTSCode keeps code, description, chapter, and dutyRate fields.

Duty log entries

DutyLog links shipment, htsCode, dutyAmount, and assessedBy.

Customs entry history

CustomsEntry captures entryNo, broker, filedAt, and releaseStatus.

Why Build Your Import/Export Log Backend with Back4app?

Back4app gives your team shipment, duty, and entry primitives so the focus stays on classification and filing work instead of infrastructure chores.

  • Shipment and filing data in one model: Shipment and CustomsEntry classes keep originPort, destinationPort, entryNo, and releaseStatus tied together.
  • Duty and HTS visibility: HTSCode and DutyLog fields such as code, dutyRate, dutyAmount, and assessedBy support review and audit tasks.
  • Realtime log updates: Use Live Queries to watch CustomsEntry changes while keeping REST and GraphQL available for dispatch tools and reporting.

Build a log backend that gives managers and coordinators the shipment history they need without reworking the schema later.

Core Benefits

An import/export log backend that helps teams review filings faster and keep shipment details in one place.

Faster classification review

Use HTSCode.code and HTSCode.dutyRate to compare items without digging through spreadsheets.

Clear duty traces

DutyLog.dutyAmount and DutyLog.assessedBy preserve who calculated each duty figure.

Cleaner entry history

CustomsEntry.entryNo, filedAt, and releaseStatus make it easy to answer status questions from the office or warehouse.

Shipment-level context

Shipment.shipmentNo and Shipment.direction keep import and export records grouped by route.

Audit-friendly notes

AuditNote.note and AuditNote.author add reviewer comments to specific entries when brokers or managers request context.

AI-assisted bootstrap

Generate the schema, security rules, and starter API flow with one structured prompt.

Ready to launch your import/export log app?

Let the Back4app AI Agent scaffold your import/export log backend and generate shipment, duty, and customs entry workflows from one prompt.

Free to start — 50 AI Agent prompts/month, no credit card required

Technical Stack

Everything included in this import/export log backend template.

Frontend
13+ technologies
Backend
Back4app
Database
MongoDB
Auth
Built-in auth + sessions
API
REST and GraphQL
Realtime
Live Queries

Shipment and Customs ER Diagram

Entity relationship model for the import/export log backend schema.

View diagram source
Mermaid
erDiagram
    User ||--o{ ImportBatch : "manager"
    User ||--o{ DutyEntry : "enteredBy"
    User ||--o{ CustomsHistory : "recordedBy"
    ImportBatch ||--o{ DutyEntry : "importBatch"
    ImportBatch ||--o{ CustomsHistory : "importBatch"

    User {
        String objectId PK
        String username
        String email
        String password
        String role
        Date createdAt
        Date updatedAt
    }

    ImportBatch {
        String objectId PK
        String batchNumber
        String direction
        String status
        String portOfEntry
        String managerId FK
        Date createdAt
        Date updatedAt
    }

    DutyEntry {
        String objectId PK
        String importBatchId FK
        String htsCode
        String goodsDescription
        String countryOfOrigin
        Number declaredValue
        Number dutyAmount
        String enteredById FK
        Date createdAt
        Date updatedAt
    }

    CustomsHistory {
        String objectId PK
        String importBatchId FK
        String entryStatus
        String entryNumber
        Date recordedAt
        String recordedById FK
        Date createdAt
        Date updatedAt
    }

    HtsCodeCatalog {
        String objectId PK
        String htsCode
        String description
        Number dutyRate
        Date effectiveDate
        Date createdAt
        Date updatedAt
    }

Customs Integration Flow

Typical runtime flow for login, shipment lookup, duty logging, and customs entry updates.

View diagram source
Mermaid
sequenceDiagram
  participant User
  participant App as Import/Export Log App
  participant Back4app as Back4app Cloud

  User->>App: Sign in
  App->>Back4app: POST /login
  Back4app-->>App: Session token

  User->>App: Open import batches
  App->>Back4app: GET /classes/ImportBatch?include=manager
  Back4app-->>App: Batch list

  User->>App: Add duty entry with HTS code
  App->>Back4app: POST /classes/DutyEntry
  Back4app-->>App: DutyEntry objectId

  User->>App: Record customs history
  App->>Back4app: POST /classes/CustomsHistory
  Back4app-->>App: CustomsHistory objectId

  App->>Back4app: GET /classes/HtsCodeCatalog?order=htsCode
  Back4app-->>App: HTS code catalog

Log Data Dictionary

Field-level reference for every class in the import/export log schema.

FieldTypeDescriptionRequired
objectIdStringAuto-generated unique identifierAuto
usernameStringUser login name
emailStringUser email address
passwordStringHashed password (write-only)
roleStringRole of the user (e.g. manager, coordinator, field_staff)
createdAtDateAuto-generated creation timestampAuto
updatedAtDateAuto-generated last-update timestampAuto

7 fields in User

Security and Permissions

How ACL and CLP protect shipments, HTS codes, duty logs, customs entries, and review notes.

Role-based log access

Only managers, coordinators, and approved staff can edit Shipment, DutyLog, and CustomsEntry rows.

Controlled HTS maintenance

HTSCode entries should be writable only by users who maintain classifications or approve tariff changes.

Audit trail protection

Use Cloud Code rules so AuditNote and DutyLog changes are validated before saving.

Schema (JSON)

Raw JSON schema definition ready to copy into Back4app or use as implementation reference.

JSON
{
  "classes": [
    {
      "className": "User",
      "fields": {
        "objectId": {
          "type": "String",
          "required": false
        },
        "username": {
          "type": "String",
          "required": true
        },
        "email": {
          "type": "String",
          "required": true
        },
        "password": {
          "type": "String",
          "required": true
        },
        "role": {
          "type": "String",
          "required": true
        },
        "createdAt": {
          "type": "Date",
          "required": false
        },
        "updatedAt": {
          "type": "Date",
          "required": false
        }
      }
    },
    {
      "className": "ImportBatch",
      "fields": {
        "objectId": {
          "type": "String",
          "required": false
        },
        "batchNumber": {
          "type": "String",
          "required": true
        },
        "direction": {
          "type": "String",
          "required": true
        },
        "status": {
          "type": "String",
          "required": true
        },
        "portOfEntry": {
          "type": "String",
          "required": true
        },
        "manager": {
          "type": "Pointer",
          "required": true,
          "targetClass": "User"
        },
        "createdAt": {
          "type": "Date",
          "required": false
        },
        "updatedAt": {
          "type": "Date",
          "required": false
        }
      }
    },
    {
      "className": "DutyEntry",
      "fields": {
        "objectId": {
          "type": "String",
          "required": false
        },
        "importBatch": {
          "type": "Pointer",
          "required": true,
          "targetClass": "ImportBatch"
        },
        "htsCode": {
          "type": "String",
          "required": true
        },
        "goodsDescription": {
          "type": "String",
          "required": true
        },
        "countryOfOrigin": {
          "type": "String",
          "required": true
        },
        "declaredValue": {
          "type": "Number",
          "required": true
        },
        "dutyAmount": {
          "type": "Number",
          "required": true
        },
        "enteredBy": {
          "type": "Pointer",
          "required": true,
          "targetClass": "User"
        },
        "createdAt": {
          "type": "Date",
          "required": false
        },
        "updatedAt": {
          "type": "Date",
          "required": false
        }
      }
    },
    {
      "className": "CustomsHistory",
      "fields": {
        "objectId": {
          "type": "String",
          "required": false
        },
        "importBatch": {
          "type": "Pointer",
          "required": true,
          "targetClass": "ImportBatch"
        },
        "entryStatus": {
          "type": "String",
          "required": true
        },
        "entryNumber": {
          "type": "String",
          "required": true
        },
        "recordedAt": {
          "type": "Date",
          "required": true
        },
        "recordedBy": {
          "type": "Pointer",
          "required": true,
          "targetClass": "User"
        },
        "createdAt": {
          "type": "Date",
          "required": false
        },
        "updatedAt": {
          "type": "Date",
          "required": false
        }
      }
    },
    {
      "className": "HtsCodeCatalog",
      "fields": {
        "objectId": {
          "type": "String",
          "required": false
        },
        "htsCode": {
          "type": "String",
          "required": true
        },
        "description": {
          "type": "String",
          "required": true
        },
        "dutyRate": {
          "type": "Number",
          "required": true
        },
        "effectiveDate": {
          "type": "Date",
          "required": true
        },
        "createdAt": {
          "type": "Date",
          "required": false
        },
        "updatedAt": {
          "type": "Date",
          "required": false
        }
      }
    }
  ]
}

Build with AI Agent

Use the Back4app AI Agent to generate a real import/export log app from this template, including frontend, backend, auth, and shipment, duty, and customs entry flows.

Back4app AI Agent
Ready to build
Create an import/export log app backend on Back4app with this exact schema and behavior.

Schema:
1. User (use Back4app built-in): username, email, password; objectId, createdAt, updatedAt (system).
2. Shipment: shipmentNo (String, required), direction (String, required), originPort (String, required), destinationPort (String, required), status (String, required); objectId, createdAt, updatedAt (system).
3. HTSCode: code (String, required), description (String, required), chapter (String, required), dutyRate (Number, required); objectId, createdAt, updatedAt (system).
4. DutyLog: shipment (Pointer to Shipment, required), htsCode (Pointer to HTSCode, required), dutyAmount (Number, required), assessedBy (Pointer to User, required), assessedAt (Date, required); objectId, createdAt, updatedAt (system).
5. CustomsEntry: shipment (Pointer to Shipment, required), entryNo (String, required), broker (String, required), filedAt (Date, required), releaseStatus (String, required); objectId, createdAt, updatedAt (system).
6. AuditNote: entry (Pointer to CustomsEntry, required), note (String, required), author (Pointer to User, required), createdAtNote (Date, required); objectId, createdAt, updatedAt (system).

Security:
- Only authorized managers and coordinators can edit shipments, duty logs, and customs entries. Use Cloud Code for validation.

Auth:
- Sign-up, login, logout.

Behavior:
- List shipments, classify HTS codes, add duty logs, update customs entries, and attach audit notes.

Deliver:
- Back4app app with schema, ACLs, CLPs; frontend for shipments, HTS codes, duty logs, customs entries, and notes.

Press the button below to open the Agent with this template prompt pre-filled.

This is the base prompt without a technology suffix. You can adapt the generated frontend stack afterward.

Deploy in minutes50 free prompts / monthNo credit card required

API Playground

Try REST and GraphQL endpoints against the import/export log schema. Responses use mock data and do not require a Back4app account.

Loading playground…

Uses the same schema as this template.

Choose Your Technology

Expand each card to see how to integrate Shipment, HTSCode, and DutyLog with your chosen stack.

Flutter Import/Export Log Backend

React Import/Export Log Backend

React Native Import/Export Log Backend

Next.js Import/Export Log Backend

JavaScript Import/Export Log Backend

Android Import/Export Log Backend

iOS Import/Export Log Backend

Vue Import/Export Log Backend

Angular Import/Export Log Backend

GraphQL Import/Export Log Backend

REST API Import/Export Log Backend

PHP Import/Export Log Backend

.NET Import/Export Log Backend

What You Get with Every Technology

Every stack uses the same import/export log schema and API contracts.

Unified shipment log structure for import/export log

Manage Shipment, HTSCode, DutyLog, CustomsEntry, and AuditNote with one data model.

HTS and duty workflows for import/export log

Classify goods, store duty calculations, and keep filing history attached to each entry.

Customs entry history for import/export log

Review entry numbers, brokers, filing dates, and release status in one place.

Role-aware access in import/export log

Define who can view or edit shipment logs, duty records, and audit notes.

REST/GraphQL APIs for import/export log

Integrate web, mobile, and back-office tools with the same backend contract.

Extensible log architecture for import/export log

Add exceptions, inspection results, or container details later without changing the core flow.

Import/Export Framework Comparison

Compare setup speed, SDK style, and AI support across all supported technologies.

FrameworkSetup TimeImport/Export BenefitSDK TypeAI Support
About 5 minSingle codebase for shipment logs on mobile and web.Typed SDKFull
Under 5 minutesFast web dashboard for customs entry history.Typed SDKFull
~3–7 minCross-platform mobile app for duty logs.Typed SDKFull
Rapid (5 min) setupServer-rendered web app for HTS review.Typed SDKFull
~3–5 minLightweight web integration for import/export logs.Typed SDKFull
About 5 minNative Android app for field shipment updates.Typed SDKFull
Under 5 minutesNative iOS app for customs entry review.Typed SDKFull
~3–7 minReactive web UI for shipment logs.Typed SDKFull
Rapid (5 min) setupEnterprise web app for duty and HTS tracking.Typed SDKFull
Under 2 minFlexible GraphQL API for customs history.GraphQL APIFull
Quick (2 min) setupREST API integration for logistics tools.REST APIFull
~3 minServer-side PHP backend for import/export logs.REST APIFull
~3–7 min.NET backend for shipment and duty workflows.Typed SDKFull

Setup time reflects expected duration from project bootstrap to first Shipment or CustomsEntry query using this template schema.

Frequently Asked Questions

Common questions about building an import/export log backend with this template.

Which import/export log controls matter most when operations span multiple sites?
What relationships between Shipment, HTSCode, and DutyLog make import/export log audits easier to narrate?
Can we add import/export log risk scoring or exception queues without a redesign?
How do I query shipments and duty logs in Flutter?
How do I manage import/export log access with Next.js server actions?
Can React Native cache customs entries offline?
How do I prevent unauthorized changes to HTS codes?
What is the best way to show customs entry history on Android?
How does the duty log workflow work end to end?

Trusted by developers worldwide

Join teams shipping import/export log products faster with Back4app templates

G2 Users Love Us Badge

Ready to Build Your Import/Export Log App?

Start your import/export log project in minutes. No credit card required.

Choose Technology