Files
crdc-demo/package.json
T
jared 88b09a5d2e feat: add duckdb-wasm singleton for client-side parquet queries
Adds src/utils/duckdbClient.js, a lazy-initialized getDb() singleton
wrapping the AsyncDuckDB MVP (single-threaded) wasm bundle. Pins
@duckdb/duckdb-wasm to ^1.32.0 (npm's latest dist-tag currently points
at a -dev prerelease). Excludes the package from Vite's dev-server
dependency pre-bundling so its worker/wasm ?url imports resolve
correctly.

Verified live in the browser under the /crdc-demo/ base path: wasm and
worker assets load with 200, and a SELECT 42 query round-trips
correctly through the singleton, confirming the risk flagged in the
design spec (duckdb-wasm loading correctly from a subpath-served Vite
dev server) does not materialize.
2026-08-11 08:49:05 -04:00

31 lines
820 B
JSON

{
"name": "crdc-arrests-demo",
"version": "0.1.0",
"description": "CRDC School Arrest Rate API demonstration app — shows Bayesian model comparisons for school-based arrest rates across U.S. districts.",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"lint": "eslint src/ --ext .js,.jsx,.ts,.tsx",
"format": "prettier --write \"src/**/*.{js,jsx,css}\""
},
"keywords": [
"crdc",
"school-arrests",
"api-demo",
"civilytics"
],
"author": "Civilytics Consulting LLC",
"license": "MIT",
"devDependencies": {
"@duckdb/duckdb-wasm": "^1.32.0",
"@vitejs/plugin-react-swc": "^4.3.3",
"eslint": "^8.57.1",
"prettier": "^3.9.6",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"vite": "^8.2.1"
},
"type": "module"
}