How nithila-randil/importease-backend works
ImportEase is a backend API for importers and clearing agents managing Sri Lankan import clearance. The main workflow is shipment creation, tendering and bidding, agent assignment, clearance-stage updates, and shipment documents and notifications. Supporting capabilities include HS-code search and duty estimates, agency administration, agent verification, ratings, and messaging. The excerpts show Firestore-backed route behavior, Firebase token checks, and external search/rate services; several route modules are represented from the source index, so their internal behavior is not inferred.
Main entry points: main.py FastAPI application · hscode_routes.py HS-code services · notification_routes.py Notifications · auth_routes.py Accounts and profiles
Components 23
API and identity
- FastAPI application
main.py - Accounts and profiles
routes/auth_routes.py - Token and role checks
dependencies.py - Firestore client
firebase_setup.py - Firestore database
- Firebase Authentication
Clearance marketplace
- Agency directory
routes/agency_routes.py - Shipment tracking
routes/shipment_routes.py - Tender and bids
routes/tender_routes.py - Shipment documents
routes/document_routes.py - Notifications
routes/notification_routes.py - Uploaded files
routes/document_routes.py
Trade tools
- HS-code services
routes/hscode_routes.py - Duty calculation
services/duty_calculator.py - Pinecone search
- Exchange-rate service
- HS-code import
scripts/import_hscodes_from_pdf.py
Operations and oversight
- Agent ratings
routes/agent_rating_routes.py - Agent verification
routes/agent_verification_routes.py - Administration
routes/admin_routes.py - Messages
routes/message_routes.py
Other components
- Importer or agent
- Platform admin
Connections 34
- Importer or agent → FastAPI application: calls API
- Platform admin → FastAPI application: calls API
- FastAPI application → Accounts and profiles: routes to
main.py - FastAPI application → Agency directory: routes to
main.py - FastAPI application → HS-code services: routes to
main.py - FastAPI application → Shipment tracking: routes to
main.py - FastAPI application → Tender and bids: routes to
main.py - FastAPI application → Shipment documents: routes to
main.py - FastAPI application → Notifications: routes to
main.py - FastAPI application → Agent ratings: routes to
main.py - FastAPI application → Administration: routes to
main.py - FastAPI application → Agent verification: routes to
main.py - FastAPI application → Messages: routes to
main.py - Accounts and profiles → Firebase Authentication: creates users
routes/auth_routes.py - Token and role checks → Firebase Authentication: verifies tokens
dependencies.py - Accounts and profiles → Firestore database: reads and writes
routes/auth_routes.py - Agency directory → Firestore database: reads and writes
routes/agency_routes.py - Shipment tracking → Firestore database: reads and writes
routes/shipment_routes.py - Tender and bids → Firestore database: reads and writes
routes/tender_routes.py - Shipment documents → Firestore database: stores metadata
routes/document_routes.py - Shipment documents → Uploaded files: writes files
routes/document_routes.py - HS-code services → Firestore database: reads details
routes/hscode_routes.py - HS-code services → Pinecone search: searches codes
routes/hscode_routes.py - HS-code services → Exchange-rate service: fetches rates
routes/hscode_routes.py - HS-code services → Duty calculation: calculates duties
routes/hscode_routes.py - Shipment tracking → Notifications: creates alerts
routes/shipment_routes.py - Tender and bids → Notifications: creates alerts
routes/tender_routes.py - Notifications → Firestore database: reads and writes
routes/notification_routes.py - Agent ratings → Firestore database: uses database
- Agent verification → Firestore database: uses database
- Administration → Firestore database: reads and writes
routes/admin_routes.py - Messages → Firestore database: uses database
- HS-code import → Firestore database: imports catalogue
- Firestore client → Firestore database: initializes client
firebase_setup.py