Skip to content

Robust yet effective & flexible E-commerce solution (Client-side API). The platform handles complex pricing scenarios, multi-warehouse inventory, real-time delivery tracking, and direct customer-driver communication

Notifications You must be signed in to change notification settings

mikebionic/tradelane-go

Repository files navigation

🚚 Tradelane - Hybrid Marketplace & On-Demand Delivery Platform

A scalable marketplace backend enabling flexible business models through offers and requests, dynamic pricing, multi-vendor coordination, and white-label e-commerce capabilities with real-time delivery tracking and communication.

Overview

Tradelane powers modern marketplaces with a dual-model approach: traditional product catalogs alongside offer/request matching for negotiation-driven commerce. Sellers list offers, customers browse or post specific requests, and the system facilitates intelligent matching. The platform handles complex pricing scenarios, multi-warehouse inventory, real-time delivery tracking, and direct customer-driver communication - all designed for everything from boutique shops to large multi-vendor ecosystems.

Technology Stack

  • Go 1.20+
  • PostgreSQL
  • WebSockets for real-time messaging
  • Firebase Cloud Messaging for push notifications
  • GPS/mapping APIs for delivery tracking
  • JWT authentication
  • Cloud file storage

Core Features

Marketplace Model

Tradelane supports both catalog browsing and offer/request matching. Customers can search products or post specific needs (e.g., "bulk cotton suppliers"), while sellers publish offers. The system matches compatible offers with requests, enabling both self-service e-commerce and negotiation-based transactions.

Dynamic Pricing & Commerce

Handle complex pricing through warehouse-specific rates, multi-currency support, and unit-based pricing (kg, items, liters, etc.). Discounts and promotions operate with granular rules - time-based offers, category-specific deals, customer loyalty programs, and commission calculations. The financial layer supports subscription models, marketplace commissions, and custom revenue streams.

Inventory & Fulfillment

  • Multi-warehouse stock tracking with real-time allocation
  • Reservation management and cross-warehouse coordination
  • Unit-based inventory for diverse product types
  • Multi-vendor fulfillment orchestration

Catalog & Customization

Hierarchical categories, brands, and collections with flexible product relationships. Backend design configuration allows text, image, color, and CSS styling adjustments per element without code changes. Templates and branding are managed entirely through API.

Real-Time Delivery & Tracking

  • Live GPS tracking of delivery drivers
  • Order status updates visible to customers and drivers
  • Direct messaging between customers and delivery partners
  • Delivery history and completion records

Communication Layer

  • Real-time chat: customer-driver and customer-seller messaging
  • Media sharing and file attachments
  • Typing indicators and read receipts
  • Push notifications for offline messages

User & Access Control

  • Multi-role system: customers, sellers, delivery partners, admins
  • Role-based permissions and enforcement
  • Admin system configuration and moderation tools
  • Performance tracking and reporting

API Endpoints

  • Offers & Requests - Create, search, update, delete offers and requests; manage inquiries and matching.
  • Catalog - Products, categories, brands, collections; design customization; variants and search.
  • Commerce - Cart operations, checkout, order retrieval, fulfillment tracking.
  • Pricing - Multi-currency support, price calculations, discount/promotion application, unit-based pricing.
  • Inventory - Stock availability, warehouse allocation, real-time checks, reservations.
  • Delivery & Tracking - Real-time order tracking, driver assignment, status updates, delivery history.
  • Communication - Messaging, conversations, notification preferences, push delivery.
  • User Management - Authentication, profiles, addresses, admin controls.

Database Architecture

Designed for enterprise-scale flexibility:

  • Units - Measurement types (kg, items, liters, etc.)
  • Warehouses - Multi-location inventory with location-specific pricing
  • Currencies - Global operations with real-time conversion
  • Discounts & Promotions - Hierarchical rule application
  • Collections & Brands - Flexible product relationships

Cart Management

  • Adding items without quantity specified increments by 1
  • Explicit quantity replaces the current cart value
  • Removing items deletes the entire product entry

Example: If ProductID 1 has QTY 23, posting an add request with QTY 25 updates it to 25. RemoveFromCart removes the entire product from the cart.

Security

  • Secure authentication with JWT tokens
  • SQL injection prevention with prepared statements
  • File upload validation and MIME type checking
  • Role-based access control (RBAC)
  • Admin-level operation verification
  • Rate limiting against abuse
  • Encrypted sensitive data storage
  • Standard web security headers

Development Roadmap

  • Advanced offer-request matching algorithms
  • Seller and admin analytics dashboards
  • Buyer recommendation engine
  • Subscription and membership support
  • Enhanced search and filtering
  • Bulk operations
  • Automated business rule engine

About

Robust yet effective & flexible E-commerce solution (Client-side API). The platform handles complex pricing scenarios, multi-warehouse inventory, real-time delivery tracking, and direct customer-driver communication

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages