Interactive tool for exploring estimates of China's industrial policy spending.
This project uses SvelteKit and Svelte 5.
- Node.js 20
- npm
Clone the repository and install dependencies:
npm installStart the local development server:
npm run devRun the following checks locally:
npm run check
npm run lint
npm run buildAll three should pass before opening a pull request.
Development should happen on feature branches rather than directly on main.
Create a branch from an up-to-date main:
git checkout main
git pull
git checkout -b <branch-name>Push the branch to GitHub and open a pull request into main.
The main branch is deployed to Netlify.
The application keeps three types of data separate:
- Source data — loaded and normalized by
src/lib/data/loadData.js - Calculator state — the user's assumptions and chart settings
- Calculated data — resolved by
src/lib/data/calculateEstimate.js
Components should consume shared calculator state and resolved estimate data rather than interpreting raw spreadsheet fields themselves.
The application uses Svelte 5 runes. New Svelte code should use current Svelte 5 patterns rather than legacy Svelte APIs.
Keep feature branches short-lived and scoped to a single work package. Start new branches from the latest main. When work depends on another feature, merge the prerequisite into main before beginning dependent work rather than developing against another feature branch.
See architecture-notes.md for detailed application architecture and implementation decisions.