{"id":51224804,"url":"https://github.com/saagpatel/sovereign","last_synced_at":"2026-06-28T10:03:12.859Z","repository":{"id":346564212,"uuid":"1190543835","full_name":"saagpatel/sovereign","owner":"saagpatel","description":"Browser-based geopolitical simulator — apply policy levers to 18 countries and watch cascading effects over 60 months","archived":false,"fork":false,"pushed_at":"2026-06-19T12:58:38.000Z","size":618,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T14:29:36.740Z","etag":null,"topics":["d3","data-visualization","geopolitics","monte-carlo","nextjs","simulation","typescript","web-worker"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saagpatel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-24T11:41:32.000Z","updated_at":"2026-06-19T12:55:16.000Z","dependencies_parsed_at":"2026-03-25T15:04:11.758Z","dependency_job_id":null,"html_url":"https://github.com/saagpatel/sovereign","commit_stats":null,"previous_names":["saagpatel/sovereign"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saagpatel/sovereign","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fsovereign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fsovereign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fsovereign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fsovereign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saagpatel","download_url":"https://codeload.github.com/saagpatel/sovereign/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fsovereign/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34884278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["d3","data-visualization","geopolitics","monte-carlo","nextjs","simulation","typescript","web-worker"],"created_at":"2026-06-28T10:03:11.946Z","updated_at":"2026-06-28T10:03:12.851Z","avatar_url":"https://github.com/saagpatel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sovereign\n\n[![TypeScript](https://img.shields.io/badge/TypeScript-3178c6?style=flat-square\u0026logo=typescript)](#) [![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](#)\n\n\u003e What happens to the global economy if one country raises tariffs by 20%?\n\nSovereign is a browser-based geopolitical simulation tool. Apply a policy lever — trade tariff, military spending shift, immigration change, or currency devaluation — to any of 18 countries and blocs, then watch cascading effects ripple across the world over a 60-month horizon. Up to 50 Monte Carlo passes with configurable noise produce p10/p50/p90 confidence bands for 10 macroeconomic variables per country.\n\n## Features\n\n- **18 countries and blocs** — US, EU, China, Russia, UK, India, Japan, Brazil, and more, each with calibrated baseline economic parameters\n- **6 policy domains** — trade, energy, military, immigration, monetary, and technology\n- **Monte Carlo engine** — up to 50 simulation passes in a Web Worker via Comlink; no UI blocking\n- **Confidence bands** — p10/p50/p90 bands across GDP growth, inflation, trade openness, debt-to-GDP, foreign reserves, and 5 other variables\n- **Interactive world map** — D3-geo + TopoJSON globe with country selection and hover tooltips\n- **Timeline scrubber** — step through any of the 60 months to see the state at that moment\n- **Causal chain view** — top-10 ranked causal links explaining how your policy propagated\n\n## Quick Start\n\n### Prerequisites\n- Node.js 18+\n\n### Installation\n```bash\npnpm install\n```\n\n### Usage\n```bash\n# Development server\npnpm dev\n\n# Run tests\npnpm test\n\n# Type-check\npnpm typecheck\n```\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|------------|\n| Framework | Next.js 15 (App Router) |\n| Language | TypeScript 5.7 |\n| Simulation | Web Worker via Comlink |\n| State | Zustand |\n| Geo visualization | D3-geo + TopoJSON |\n| Charts | Recharts |\n| Styling | Tailwind CSS 3 |\n| Testing | Vitest + Testing Library |\n\n## Architecture\n\nThe simulation engine runs entirely in a Web Worker, keeping the UI responsive during heavy Monte Carlo passes. Comlink provides a transparent async proxy so the React layer calls `await worker.simulate(params)` like a regular function. Results — p10/p50/p90 bands for all 10 variables across all 18 entities — are streamed back to Zustand stores that drive the D3 map and Recharts panels simultaneously.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaagpatel%2Fsovereign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaagpatel%2Fsovereign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaagpatel%2Fsovereign/lists"}