| name | j-scaffold-web |
| description | Scaffold a new frontend web project with Vite, Tailwind CSS, and standard configuration. Supports React, Svelte, and Vue frameworks. |
/j-scaffold-web
Scaffold a new frontend web project with Vite and standard configuration.
Arguments
name (required): Project name
--framework: react (default), svelte, or vue
Instructions
-
Create the project using Vite:
pnpm create vite <name> --template <framework>-ts
-
Change into the project directory and install dependencies:
cd <name> && pnpm install
-
Add and configure Tailwind CSS:
pnpm add -D tailwindcss postcss autoprefixer
pnpm tailwindcss init -p
-
Configure the dev server to bind to 0.0.0.0 and use $PORT:
server: {
host: "0.0.0.0",
port: Number(process.env.PORT ?? 4000),
}
-
Set up Tailwind in the main CSS file with the standard directives.
-
Update package.json scripts:
dev: runs the dev server on $PORT
build: builds for production
preview: uses 0.0.0.0
-
Create a basic folder structure:
src/
components/
styles/
Use hooks/ for React, lib/ for Svelte or Vue if needed.
-
Replace the starter screen with a minimal page that proves Tailwind is wired correctly.
-
If the project uses this repo's devcontainer conventions, ensure:
just dev is the default development entrypoint
- browser verification uses
http://localhost:$PORT
- generated instructions prefer
pnpm over npm
-
Initialize git if not already in a repo.
Example Usage
/j-scaffold-web myapp
/j-scaffold-web dashboard --framework svelte