bare plus the app floors most projects want: @solidjs/router with file-system routes, per-page titles via @solidjs/meta, and a vitest test suite.
Deployment contract: still zero server dependencies — vite build emits a purely static site; deploy dist/client to any static host. There is no server and no start script: on platforms that build and then run npm start in a Node container (Firebase App Hosting, most buildpacks), pick the static product instead (on Firebase, that is Hosting), or flip on SSR (below) to get a real server.
There is no index.html and no mount file. @solidjs/vite-plugin's turnkey mode (start: true in vite.config.ts) generates the entries around two conventions:
src/App.tsx— the app, router included. The<Router>wraps a shared nav and a<Loading>boundary; its routes come from the file system (below).src/Document.tsx— the document shell, the newindex.html. Site-wide head tags go here; it is compiled only into the prerendered static shell and adds zero client-side JS. Per-page head tags (<Title>from@solidjs/meta) live in the route modules.
The fileRoutes() plugin (from filesystem-routing/vite) scans src/routes and exposes the result as the virtual:file-routes module, which @solidjs/router/fs turns into router routes inside src/App.tsx. You edit files under src/routes; the route table follows:
index.tsxis/,users/index.tsxis/users,users/[id].tsxis/users/:id,[...404].tsxcatches everything else.- Pairing
users.tsxwith theusers/directory makes it a layout wrapping every page inside;users/index.tsxis what the layout shows at/usersitself. - A module is a page when it has a default export (a file without one is not a route), and may export a
routeconfig object —src/routes/users/[id].tsxusespreloadto start its data load as navigation begins.
Every route is code-split automatically; navigating loads only that page's module.
src/routes/users/[id].tsx shows the data pattern: an async query() (from @solidjs/router) read through a memo. The surrounding <Loading> boundary in App.tsx shows its fallback until the promise settles, and query() caches by key so preload and render share one request. The data is a local JSON module (src/data/users.json); swap the query body for any API call. Two things to keep in mind once SSR is on: use absolute URLs, and don't fetch your own origin from the server — behind a proxy (most PaaS hosts) the incoming Host header rarely routes back to the container. Data that lives with the app belongs in a server function (the fullstack template shows this).
vitest runs component tests in jsdom via @solidjs/testing-library — add *.test.tsx files next to what they test. See src/components/Counter.test.tsx for the pattern; note Solid 2.0 batches DOM updates, so tests call flush() after firing events before asserting on the DOM.
Those templates dependencies are maintained via pnpm via pnpm up -Lri.
This is the reason you see a pnpm-lock.yaml. That being said, any package manager will work. This file can be safely be removed once you clone a template.
$ npm install # or pnpm install or yarn installLearn more on the Solid Website and come chat with us on our Discord
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
Builds the static production site to dist/client, routes code-split.
Serves the production build locally.
Runs the test suite.
Streaming SSR is one boolean: add ssr: true next to start: true in vite.config.ts. src/App.tsx, src/Document.tsx, and the routes carry over unchanged — <HydrationScript /> is already in place in the Document (in client mode it is stripped from the static shell). The build then emits a request handler to dist/server; to run it on Node, use start: { node: true } so the build also emits a ready-to-run dist/server/node.js (fullstack's README covers deployment).
- A server (data loading via server functions, mutations, sessions, API routes) is the
fullstacktemplate — same structure, more floors. - Want less? The
baretemplate is the same shape without the router.