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.
- HTS code tracking — Store HTSCode rows with tariff numbers, descriptions, and country-specific classification notes.
- Duty log history — Keep duty log entries tied to shipments, entry numbers, and assessed amounts.
- Customs entry history — Review Entry records by port, broker, filing date, and release status.
- Shipment visibility — Link 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:
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.
Shipment and Customs ER Diagram
Entity relationship model for the import/export log backend schema.
Schema covering shipments, HTS codes, duty logs, customs entries, and audit notes.
View diagram source
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
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 catalogLog Data Dictionary
Field-level reference for every class in the import/export log schema.
| Field | Type | Description | Required |
|---|---|---|---|
| objectId | String | Auto-generated unique identifier | Auto |
| username | String | User login name | |
| String | User email address | ||
| password | String | Hashed password (write-only) | |
| role | String | Role of the user (e.g. manager, coordinator, field_staff) | |
| createdAt | Date | Auto-generated creation timestamp | Auto |
| updatedAt | Date | Auto-generated last-update timestamp | Auto |
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.
{
"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.
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.
API Playground
Try REST and GraphQL endpoints against the import/export log schema. Responses use mock data and do not require a Back4app account.
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.
| Framework | Setup Time | Import/Export Benefit | SDK Type | AI Support |
|---|---|---|---|---|
| About 5 min | Single codebase for shipment logs on mobile and web. | Typed SDK | Full | |
| Under 5 minutes | Fast web dashboard for customs entry history. | Typed SDK | Full | |
| ~3–7 min | Cross-platform mobile app for duty logs. | Typed SDK | Full | |
| Rapid (5 min) setup | Server-rendered web app for HTS review. | Typed SDK | Full | |
| ~3–5 min | Lightweight web integration for import/export logs. | Typed SDK | Full | |
| About 5 min | Native Android app for field shipment updates. | Typed SDK | Full | |
| Under 5 minutes | Native iOS app for customs entry review. | Typed SDK | Full | |
| ~3–7 min | Reactive web UI for shipment logs. | Typed SDK | Full | |
| Rapid (5 min) setup | Enterprise web app for duty and HTS tracking. | Typed SDK | Full | |
| Under 2 min | Flexible GraphQL API for customs history. | GraphQL API | Full | |
| Quick (2 min) setup | REST API integration for logistics tools. | REST API | Full | |
| ~3 min | Server-side PHP backend for import/export logs. | REST API | Full | |
| ~3–7 min | .NET backend for shipment and duty workflows. | Typed SDK | Full |
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.
Ready to Build Your Import/Export Log App?
Start your import/export log project in minutes. No credit card required.