Creating a New Web Project
tip
You can also start from existing Web projects
Modern Web Project Essentials
To build a brand-new WebSpatial project from scratch, first create a modern Web project (currently React-only) that meets the following requirements:
- Use HTML APIs (for example, JSX) through a UI framework such as React
- Use CSS APIs through the same UI framework (supports PostCSS, TailwindCSS, CSS-in-JS, and other approaches)
- Manage project dependencies with npm or any npm-compatible package manager (like pnpm)
- Compile and build HTML and static web assets (JS, CSS, images, etc.) that run directly in desktop / mobile browsers
- Run a Web server that exposes URLs accessible from desktop / mobile browsers
Project Templates for Getting Started
Below are several options for creating a modern Web project that satisfies the requirements above. Any of these can serve as the starting point before you add the WebSpatial SDK.
note
Ensure Node.js is installed first. See the official Node.js site for installation instructions.
-
React + Vite
- npm
- pnpm
- Yarn
npx create-vite --template reactpnpm dlx create-vite --template reactyarn dlx create-vite --template react -
React + Vite + TypeScript
- npm
- pnpm
- Yarn
npx create-vite --template react-tspnpm dlx create-vite --template react-tsyarn dlx create-vite --template react-ts -
React + Next.js
- npm
- pnpm
- Yarn
npx create-next-app --jspnpm dlx create-next-app --jsyarn dlx create-next-app --js -
React + Next.js + TypeScript
- npm
- pnpm
- Yarn
npx create-next-app --tspnpm dlx create-next-app --tsyarn dlx create-next-app --ts -
React + Rsbuild
- npm
- pnpm
- Yarn
npx create-rsbuild --template reactpnpm dlx create-rsbuild --template reactyarn dlx create-rsbuild --template react -
React + Rsbuild + TypeScript
- npm
- pnpm
- Yarn
npx create-rsbuild --template react-tspnpm dlx create-rsbuild --template react-tsyarn dlx create-rsbuild --template react-ts -
React + Rspack
- npm
- pnpm
- Yarn
npx create-rspack --template reactpnpm dlx create-rspack --template reactyarn dlx create-rspack --template react -
React + Rspack + TypeScript
- npm
- pnpm
- Yarn
npx create-rspack --template react-tspnpm dlx create-rspack --template react-tsyarn dlx create-rspack --template react-ts