Skip to content

About

A comprehensive supply chain risk assessment platform that provides real-time monitoring and analysis across multiple risk dimensions including weather, port congestion, foreign exchange rates, and supplier reliability.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PredictiveSupply - Multi-Dimensional Supply Chain Risk Platform

A comprehensive supply chain risk assessment platform that provides real-time monitoring and analysis across multiple risk dimensions including weather, port congestion, foreign exchange rates, and supplier reliability.

πŸš€ Features

Core Functionality

  • Real-time Risk Assessment: Multi-dimensional scoring across weather, ports, FX, and supplier reliability
  • Hurricane Tracking: Live hurricane monitoring with supply chain impact analysis
  • Port Congestion Monitoring: Global port status tracking with business impact assessment
  • Weather Intelligence: Location-based weather risk analysis for business operations
  • Currency Risk Management: Foreign exchange rate monitoring and volatility analysis
  • Multi-tenant Architecture: Support for multiple clients with intelligent data filtering
  • πŸ†• Professional Export System: Executive PDF reports, Excel workbooks, and CSV exports with AI insights

Admin Dashboard

  • Executive Overview: Comprehensive system health and risk metrics
  • Client Management: Admin panel with client selection and data filtering
  • System Monitoring: Real-time API health checks and system status
  • Data Analytics: Advanced reporting and insights across all risk dimensions
  • πŸ†• Export Capabilities: One-click generation of professional reports with AI insights

πŸ› οΈ Technology Stack

  • Frontend: Next.js 14, React, TypeScript, Tailwind CSS
  • UI Components: shadcn/ui component library
  • Backend: Next.js API routes, Node.js
  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth with multi-tenant support
  • External APIs: Weather.gov, Hurricane tracking, FX rates, Port data
  • Deployment: Vercel-ready, Docker support

πŸ“‹ Prerequisites

  • Node.js 18+ and npm
  • Supabase account and project
  • Git for version control

πŸ”§ Installation & Setup

1. Clone the Repository

git clone https://github.com/yourusername/predicting-supply.git
cd predicting-supply

2. Install Dependencies

npm install

3. Environment Configuration

# Copy the environment example file
cp .env.example .env.local

# Edit .env.local with your actual values
# Get Supabase credentials from: https://supabase.com/dashboard

4. Database Setup

Run the following SQL migrations in your Supabase SQL editor:

  1. Basic Schema: learning-infrastructure-v04.sql
  2. Multi-dimensional Risk: phase-0-5-multi-dimensional-risk.sql
  3. Client Settings: enhanced-client-settings-v2.sql
  4. Sample Data: sample-data.sql (optional)

5. Run Development Server

npm run dev

The application will be available at http://localhost:3000

🌐 Deployment

Deploy to Vercel

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Add environment variables in Vercel dashboard
  4. Deploy automatically on push

Deploy to Other Platforms

The application is containerized and can be deployed to:

  • AWS ECS/Fargate
  • Google Cloud Run
  • Azure Container Instances
  • Any Docker-compatible platform

πŸ“„ Export System

Professional Document Generation

The platform includes a comprehensive export system for generating executive-ready reports:

Export Types

  • Admin Dashboard Export: System health, performance metrics, strategic insights
  • Hurricane Report Export: Storm tracking, supply chain risk, business impact analysis
  • Currency Risk Export: FX analysis, hedging recommendations, procurement impact

Export Formats

  • PDF Executive Reports (Recommended): Professional branding, AI insights, charts
  • Excel Workbooks: Multi-sheet analysis with pivot tables
  • CSV Data Export: Raw data for external analysis

Features

  • Real-time data integration
  • AI-generated insights and recommendations
  • Professional PredictingSupply branding
  • GDPR/SOX compliance metadata
  • Smart caching for optimal performance

Quick Start

// Generate an admin dashboard export
const response = await fetch('/api/exports', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    exportType: 'admin',
    config: {
      format: 'pdf',
      content: 'executive',
      timeRange: 'realtime',
      options: { includeAiInsights: true }
    }
  })
})

See EXPORT_SYSTEM_DOCS.md for complete documentation.

πŸ“Š API Endpoints

Core APIs

  • /api/weather - Weather risk assessment
  • /api/hurricanes - Hurricane tracking data
  • /api/port-congestion - Port status monitoring
  • /api/fx-rates - Foreign exchange rates
  • /api/risk-assessments - Multi-dimensional risk scores
  • /api/exports - Professional document generation system

Admin APIs

  • /api/clients - Client management
  • /api/suppliers - Supplier data management
  • /api/admin/auth - Admin authentication

πŸ”’ Security Features

  • Multi-tenant Architecture: Secure client data isolation
  • Environment Variables: Sensitive data protection
  • Authentication: Supabase Auth integration
  • Admin Access Control: Separate admin authentication flow
  • Data Filtering: Client-specific data access controls

πŸ“ˆ Client Filtering System

The platform supports intelligent client filtering across all data:

  • Weather Data: Filters from 13 global locations to business-relevant locations
  • Port Data: Reduces from 81 global ports to supplier-specific ports
  • FX Rates: Shows relevant currency pairs based on client operations
  • Risk Assessments: Client-specific risk evaluations

πŸ§ͺ Testing

# Run tests
npm test

# Run API tests
npm run test:api

# Run client filtering tests
node test-client-filtering.js

πŸ“ Project Structure

predicting-supply-main/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                 # Next.js app directory
β”‚   β”‚   β”œβ”€β”€ admin/          # Admin dashboard
β”‚   β”‚   β”œβ”€β”€ api/            # API endpoints
β”‚   β”‚   β”œβ”€β”€ dashboard/      # Main dashboard
β”‚   β”‚   └── ...             # Feature pages
β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”‚   β”œβ”€β”€ layout/         # Layout components
β”‚   β”‚   β”œβ”€β”€ navigation/     # Navigation components
β”‚   β”‚   └── ui/             # UI components
β”‚   └── lib/                # Utilities and contexts
β”œβ”€β”€ docs/                   # Documentation
β”œβ”€β”€ public/                 # Static assets
└── sql/                    # Database migrations

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

For support and questions:

  • Create an issue on GitHub
  • Check the documentation in /docs
  • Review the implementation status in docs/V.2/PHASE_0_5_IMPLEMENTATION_STATUS.md

🎯 Roadmap

  • Enhanced AI-powered risk predictions
  • Mobile application
  • Advanced analytics dashboard
  • Integration with more data sources
  • Automated alert system
  • Custom risk model configuration

Built with ❀️ for supply chain professionals worldwide

About

A comprehensive supply chain risk assessment platform that provides real-time monitoring and analysis across multiple risk dimensions including weather, port congestion, foreign exchange rates, and supplier reliability.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages