Building A Supply Chain Risk Management Platform
I recently built a supply chain risk management platform. It started as a simple idea: what if companies could get real-time alerts about hurricanes affecting their suppliers? But it evolved into something bigger.
What It Does
It monitors multiple risk factors that can disrupt supply chains:
- Hurricane tracking - Integrates with NOAA's API to track active hurricanes and calculate risk scores based on how close they are to your suppliers
- Port congestion - Monitors 80+ global ports for delays and congestion that could impact shipments
- Currency fluctuations - Tracks exchange rates for supplier currencies to identify financial risks
- Weather monitoring - Keeps tabs on weather conditions at supplier locations and shipping routes
The platform automatically filters this data based on each client's actual supply chain. So if you only have suppliers in Asia and ship through LA/Long Beach, you won't see alerts about European ports or Atlantic hurricanes.
The Technical Build
I used Next.js 14 with TypeScript for the frontend and API routes. The UI is built with Tailwind CSS and shadcn/ui components, which gave me a clean, professional look without spending weeks on design.
For the backend, I went with Supabase (PostgreSQL) for the database. It handles multi-tenant data isolation well with Row Level Security, which was important since different clients need to see different data.
The interesting part was integrating multiple data sources:
- NOAA Weather API for real hurricane data
- Mock data for port congestion (real APIs were too expensive for a side project)
- Currency exchange rates from various free tier APIs
Key Features
Intelligent Filtering: The system has three data scope modes - broad (see everything), narrow (only your direct suppliers), and intelligent (AI-filtered relevance). This prevents information overload.
Risk Scoring: Each threat gets scored on a 1-10 scale based on proximity, intensity, and potential impact. The scoring algorithm considers distance to suppliers, hurricane category, timing, and the client's vulnerability factors.
Export System: Users can generate PDF reports, Excel workbooks, or CSV exports of their risk data. Useful for executive presentations or further analysis.
Multi-Client Support: Built with a proper multi-tenant architecture so multiple companies could use the same instance while keeping their data separate.
Challenges
The biggest challenge was dealing with API rate limits and costs. NOAA's free API has limits, and real-time port data APIs are expensive. I ended up using a caching strategy and fallback mock data to keep it functional.
Another interesting problem was making the data relevant. Nobody wants to see alerts about all 80 ports when they only use 5. So I built an intelligent filtering system that learns which ports and routes are relevant to each client's supply chain.
Current Status
The platform is currently offline, running multiple real-time APIs got expensive for a side project. But all the code is open source and available if anyone wants to spin up their own instance or learn from it.
The codebase includes:
- Complete Next.js application with TypeScript
- Database schemas and migrations
- API integration examples
- Risk scoring algorithms
- Export generation system
- Multi-tenant architecture patterns
It was a fun project that taught me a lot about supply chain complexities, real-time data processing, and building SaaS platforms. Even though it's not running anymore, I'm glad I built it.
Check out the code on GitHub: https://github.com/rashidazarang/predicting-supply