BorderBrief AI
Know the Rules. Know the Cost. Ship with Confidence..
An AI-powered export preparation platform for small Indian businesses shipping to the United States
Inspiration
BorderBrief AI was inspired by the difficulties that small Indian businesses, independent exporters, handicraft artisans, and micro-manufacturers face when trying to enter international markets. Exporting goods to the United States can involve complex customs regulations, tariff classification codes, import duties, shipping costs, and commercial documentation. For smaller businesses, understanding these requirements can be intimidating, time-consuming, and expensive.
We wanted to make export preparation easier to understand by bringing important steps into one guided platform. Our goal is to help exporters make more informed decisions about product classification, estimated import costs, and the documents they may need before shipping.
What We Built
BorderBrief AI is a cloud-first export preparation platform focused on the India-to-USA trade corridor. It guides users through a five-step workflow:
- Product Intake: Users enter the product name, description, materials, intended use, selling price, and freight details. They can also upload a product photograph.
- AI Product Analysis: Google Gemini analyses the supplied description and image to extract relevant product attributes. Users can review and confirm the extracted information.
- Customs Classification: The platform identifies potential Harmonized Tariff Schedule (HTS) classifications using product attributes, tariff data, and classification rules.
- Landed-Cost Estimation: A deterministic calculation engine estimates applicable duties and relevant fees using the available tariff and shipment information.
- Invoice and Payment Workflow: The platform prepares a draft commercial invoice, generates a downloadable PDF, and supports a PayPal Sandbox checkout and payment-verification workflow.
The platform also includes an invoice dashboard for viewing saved invoices and payment receipts. A deterministic fallback mode with predefined Indian product profiles keeps the core demonstration workflow usable when external AI credentials are unavailable.
How We Built It
We built BorderBrief AI using Next.js and TypeScript, with Tailwind CSS for the user interface. The application uses the Next.js App Router to organise its pages and backend API routes.
The main technical components include:
- AI integration: The official Google Gen AI SDK connects the application to Gemini for product-attribute extraction.
- Tariff and cost engine: Custom TypeScript modules separate AI-assisted product understanding from deterministic classification support and landed-cost calculations. This separation helps prevent an AI response from directly determining financial calculations.
- Data persistence: SQLite stores invoice and payment-related records for the prototype.
- Invoice generation: A JavaScript PDF generator creates downloadable commercial-invoice drafts.
- Payment integration: PayPal Orders API v2 is integrated in Sandbox mode, with server-side capture verification and webhook-signature validation.
- Security and reliability: Image uploads are validated and sanitised, draft form data can be recovered within the active browser tab, and deterministic fallback data supports demonstrations without external API credentials.
We also used automated tests, TypeScript checks, linting, and production builds as quality gates during development.
Challenges We Faced
One of our biggest challenges was translating complicated international trade concepts into a workflow that a first-time exporter could understand. Product classification is not just a keyword-matching task: materials, construction, and intended use can all affect the appropriate tariff classification. We therefore designed the workflow to collect product attributes, present classification candidates, and keep the result subject to human review.
Another challenge was ensuring that cost calculations were consistent. We addressed this by keeping the financial calculation engine deterministic and separate from the generative AI component. We also had to handle external-service failures, payment verification, image validation, PDF generation, and the persistence of invoices and payment records.
A further challenge was understanding the limits of a prototype intended for a regulated domain. The current application is an unauthenticated, single-user prototype and uses local SQLite persistence. It is not ready for public multi-user deployment without authentication, tenant isolation, and additional security controls.
What We Learned
Building BorderBrief AI helped us strengthen our skills in full-stack development, AI integration, API design, database management, payment workflows, automated testing, and application security.
More importantly, we learned that AI in a regulated domain should support decision-making rather than replace authoritative data, deterministic calculations, or expert review. A useful product must communicate uncertainty, explain its assumptions, and make its limitations clear.
BorderBrief AI is a trade-preparation and decision-support prototype, not a customs broker or legal adviser. Its tariff classifications and landed-cost figures are estimates that must be independently verified with the relevant authorities or a qualified customs professional before a real shipment is made.
BorderBrief AI — Simplifying export preparation for small Indian businesses.
Built With
- next.js
- node.js
- react
- tailwindcss
- typescript