Maritime supply chain intelligence platform. Evaluate shipping routes for geopolitical, weather, labor, and congestion risk using a multi-agent AI pipeline. Get risk scores, narratives, alternative routes, and a live disruption feed.
| Layer | Tech |
|---|---|
| Frontend | React 19, Tailwind CSS 4, Wouter, shadcn/ui |
| Backend | Node.js, Express 4, tRPC 11, Drizzle ORM |
| Database | PostgreSQL |
| AI | OpenAI-compatible API (Ollama locally, OpenAI/Anthropic in prod) |
| Auth | JWT via jose, cookie-based sessions |
| Logging | Pino (structured JSON) |
| Scheduling | node-cron (hourly Athena background scan) |
Three agents collaborate on every route evaluation:
- Athena - researcher. Fetches live intelligence from GDELT RSS, NASA EONET, USGS. Runs hourly background scan to populate the disruption feed.
- Hermes - risk modeler. Scores weather, geopolitical, labor, and congestion risk on a 0-100 scale, with per-factor breakdown.
- Apollo - route optimizer. Suggests alternative routes when overall risk is high.
Risk thresholds: Green (0-30), Amber (31-60), Red (61-100). Critical alerts (score > 75) fire a console log and optional webhook.
- Node.js 20+
- pnpm
- PostgreSQL
- Ollama for local LLM, or an OpenAI/Anthropic API key
pnpm installCreate .env at the project root:
DATABASE_URL=postgresql://user:password@localhost:5432/riskwise
JWT_SECRET=your-secret-minimum-32-characters-long
# LLM config (defaults to Ollama + Mistral)
RISKWISE_LLM_BASE_URL=http://localhost:11434/v1
RISKWISE_LLM_API_KEY=ollama
RISKWISE_LLM_MODEL=mistral
# Optional
GOOGLE_MAPS_API_KEY=
RISKWISE_ALERT_WEBHOOK_URL=pnpm db:pushpnpm dev
# http://localhost:5000Ollama (local, no API key):
ollama pull mistral && ollama serveOpenAI:
RISKWISE_LLM_BASE_URL=https://api.openai.com/v1
RISKWISE_LLM_API_KEY=sk-...
RISKWISE_LLM_MODEL=gpt-4oAnthropic (via OpenAI-compatible proxy or gateway):
RISKWISE_LLM_MODEL=claude-sonnet-4-5pnpm dev # start dev server
pnpm build # production build
pnpm start # run production build
pnpm test # vitest (17 tests)
pnpm check # TypeScript type check
pnpm format # Prettier
pnpm db:push # generate + apply DB migrationsclient/src/
pages/ RouteAnalyzer, ActiveDisruptions, RouteHistory, MapView
components/ reusable UI + shadcn/ui primitives
contexts/ ThemeContext, RouteMapContext
hooks/ custom hooks
lib/trpc.ts tRPC client binding
App.tsx routing
index.css global styles, Tailwind config, cyberpunk tokens
server/
agents.ts Athena / Hermes / Apollo orchestration
db.ts Drizzle query helpers
realtime.ts live data fetchers (GDELT, NASA EONET, USGS)
scheduledHandlers.ts hourly Athena scan via node-cron
routers.ts tRPC router assembly
routers/riskwise.ts route eval, history, disruptions, auth procedures
_core/
index.ts Express app, middleware, request ID, Maps proxy
context.ts tRPC context + JWT resolution
env.ts Zod-validated env config (fails fast on missing vars)
llm.ts OpenAI-compatible LLM client
logger.ts Pino instance
notification.ts console + optional webhook alerts
errors.ts typed HTTP error classes
shared/
const.ts cookie name, shared constants
types.ts re-exports DB types + error classes
_core/errors.ts HttpError base class
drizzle/
schema.ts PostgreSQL schema (users, risk_events, shipping_routes, route_evaluations)
0000_init.sql initial migration
17 tests in server/riskwise.test.ts covering:
- Risk score color thresholds (Green/Amber/Red boundaries)
- tRPC router procedures: events, routes, auth
- Athena scan result validation (category/severity enums)
- Critical notification threshold (score > 75)
RiskWise was initially ideated and bootstrapped using Manus AI for the Manus AI Hackathon at Boston Tech Week 2026.