Skip to content

Commit 5833629

Browse files
authored
Update README.md (#1939)
1 parent 5568611 commit 5833629

File tree

1 file changed

+112
-56
lines changed

1 file changed

+112
-56
lines changed

README.md

Lines changed: 112 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,138 @@
1-
<p>
2-
<img width="100%" src="https://assets.solidjs.com/banner?project=Start&type=core" alt="Solid Docs">
3-
</p>
1+
[![Banner](https://assets.solidjs.com/banner?project=Start&type=core)](https://github.com/solidjs)
42

5-
# SolidStart
3+
[![Version](https://img.shields.io/npm/v/@solidjs/start.svg?style=for-the-badge&color=blue)](https://www.npmjs.com/package/@solidjs/start)
4+
[![Downloads](https://img.shields.io/npm/dm/@solidjs/start.svg?style=for-the-badge&color=green)](https://www.npmjs.com/package/@solidjs/start)
5+
[![Stars](https://img.shields.io/github/stars/solidjs/solid-start?style=for-the-badge&color=yellow)](https://github.com/solidjs/solid-start)
6+
[![Discord](https://img.shields.io/discord/722131463138705510?style=for-the-badge&color=5865F2)](https://discord.com/invite/solidjs)
7+
[![Reddit](https://img.shields.io/reddit/subreddit-subscribers/solidjs?style=for-the-badge&color=FF4500)](https://www.reddit.com/r/solidjs/)
68

7-
This is the home of the SolidStart, the Solid app framework.
9+
**SolidStart** brings fine-grained reactivity fullstack with full flexibility. Built with features like unified rendering and isomorphic code execution, SolidStart enables you to create highly performant and scalable web applications. Explore the official [documentation](https://docs.solidjs.com/solid-start) for detailed guides and examples.
810

9-
## Features
11+
## Core Features
1012

11-
- File-system based routing
12-
- Supports all rendering modes:
13-
- Server-side rendering (SSR)
14-
- Streaming SSR
15-
- Client-side rendering (CSR)
16-
- Static site generation (SSG)
17-
- Streaming
18-
- Build optimizations with code splitting, tree shaking and dead code elimination
19-
- API Routes
20-
- Built on Web standards like Fetch, Streams, and WebCrypto
21-
- Adapters for deployment to all popular platforms
22-
- CSS Modules, SASS/SCSS Support
23-
- TypeScript-first
13+
- **All Rendering Modes**:
14+
- Server-Side Rendering (SSR) with sync, async, and stream [modes](https://docs.solidjs.com/solid-start/reference/server/create-handler).
15+
- Client-Side Rendering (CSR)
16+
- Static Site Generation (SSG)
17+
- **TypeScript**: Full integration for robust, type-safe development
18+
- **File-Based Routing**: Intuitive routing based on your project’s file structure
19+
- **API Routes**: Dedicated server-side endpoints for seamless API development
20+
- **Streaming**: Efficient data rendering for faster page loads
21+
- **Build Optimizations**: Code splitting, tree shaking, and dead code elimination
22+
- **Deployment Adapters**: Easily deploy to platforms like Vercel, Netlify, Cloudflare, and more
2423

25-
### Getting started
24+
## Getting Started
2625

27-
Create a SolidStart application and run a development server using your preferred package manager:
26+
### Installation
27+
28+
Create a template project with your preferred package manager:
2829

2930
```bash
30-
mkdir my-app
31-
cd my-app
31+
# using npm
32+
npm create solid@latest -- --solidstart
3233

33-
# with npm
34-
npm init solid@latest
35-
npm install
36-
npm run dev
34+
# using pnpm
35+
pnpm create solid@latest --solidstart
3736

38-
# or with pnpm
39-
pnpm create solid@latest
40-
pnpm install
41-
pnpm dev
37+
# using bun
38+
bun create solid@latest --solidstart
39+
```
40+
41+
1. Follow the CLI prompts to set up your project.
42+
2. Navigate to your project directory and install dependencies:
43+
44+
```bash
45+
cd <project-name>
46+
npm install # or pnpm install or bun install
47+
```
48+
49+
3. Start the development server:
50+
51+
```bash
52+
npm run dev # or pnpm dev or bun dev
53+
```
4254

43-
# or with Bun
44-
bun create solid@latest
45-
bun install
46-
bun dev
55+
### Project Structure
56+
57+
- `public/`: Static assets like icons, images, and fonts
58+
- `src/`: Core application (aliased to `~/`)
59+
- `routes/`: File-based routing for pages and APIs
60+
- `app.tsx`: Root component of your application
61+
- `entry-client.tsx`: Handles client-side hydration
62+
- `entry-server.tsx`: Manages server-side request handling
63+
- **Configuration Files**: `app.config.ts`, `package.json`, and more
64+
65+
Learn more about routing in the [documentation](https://docs.solidjs.com/solid-start/building-your-application/routing).
66+
67+
## Adapters
68+
69+
Configure adapters in `app.config.ts` to deploy to platforms like Vercel, Netlify, Cloudflare, and others:
70+
71+
```ts
72+
import { defineConfig } from "@solidjs/start/config";
73+
74+
export default defineConfig({
75+
ssr: true, // false for client-side rendering
76+
server: { preset: "vercel" },
77+
});
4778
```
4879

49-
### Development
80+
Presets also include runtimes like Node.js, Bun or Deno. For example, the `node-server` preset enables hosting on your server. Learn more about [`defineConfig`](https://docs.solidjs.com/solid-start/reference/config/define-config).
5081

51-
You should use a Node.js version manager [compatible with `.node-version`](https://stackoverflow.com/a/62978089/565877) ([asdf-vm](https://asdf-vm.com/) is a great option macOS/Linux users)
82+
## Building for Production
5283

53-
The monorepo uses `pnpm` as the package manager. To install `pnpm`, run the following command in your terminal.
84+
Generate production-ready bundles:
5485

5586
```bash
56-
npm install -g pnpm
87+
npm run build # or pnpm build or bun build
88+
```
89+
90+
The output is saved to the `dist/` directory. Then, start the server:
91+
92+
```bash
93+
npm start # or pnpm start or bun start
5794
```
5895

59-
Run `pnpm install` to install all the dependencies for the packages and examples in your monorepo.
96+
## Contributing
6097

61-
Run `pnpm build` to build SolidStart project
98+
Join the SolidJS community and contribute!
99+
100+
- [Discord](https://discord.com/invite/solidjs): Ask for help and discuss ideas
101+
- [Issues](https://github.com/solidjs/solid-start/issues): Report bugs or suggest features
102+
- [Docs Issues](https://github.com/solidjs/solid-docs/issues): Report documentation issues
62103

63104
<details>
64-
<summary><h4>Monorepo & <code>project.json</code> <code>"workspace"</code> support</h4></summary>
105+
<summary><h3>Development Setup</h3></summary>
106+
107+
Use a Node.js version manager compatible with `.node-version`. We recommend [asdf-vm](https://asdf-vm.com/) for macOS and Linux users.
108+
109+
### Monorepo & Package Manager
65110

66-
If you are using SolidStart within a monorepo that takes advantage of the `package.json` `"workspaces"` property (e.g. [Yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/)) with hoisted dependencies (the default for Yarn), you must include `#solidjs/start` within the optional `"nohoist"` (for Yarn v2 or higher, see further down for instructions) workspaces property.
111+
SolidStart uses `pnpm` as the package manager. Install it globally:
67112

68-
- _In the following, "workspace root" refers to the root of your repository while "project root" refers to the root of a child package within your repository._
113+
```bash
114+
npm install -g pnpm
115+
```
116+
117+
Install dependencies for the monorepo:
118+
119+
```bash
120+
pnpm install
121+
```
69122

70-
For example, if specifying `"nohoist"` options from the workspace root (i.e. for all packages):
123+
Build the project:
124+
125+
```bash
126+
pnpm build
127+
```
128+
129+
### Monorepo & `package.json` Workspaces
130+
131+
If using a monorepo with `package.json` `"workspaces"` (e.g., [Yarn Workspaces](https://classic.yarnpkg.com/en/docs/workspaces/)), ensure `@solidjs/start` is not hoisted. Add it to the `"nohoist"` field in the workspace root or project root:
132+
133+
**Workspace Root Example**:
71134

72135
```jsonc
73-
// in workspace root
74136
{
75137
"workspaces": {
76138
"packages": [
@@ -81,32 +143,26 @@ For example, if specifying `"nohoist"` options from the workspace root (i.e. for
81143
}
82144
```
83145

84-
If specifying `"nohoist"` options for a specific package using `@solidjs/start`:
146+
**Project Root Example**:
85147

86148
```jsonc
87-
// in project root of a workspace child
88149
{
89150
"workspaces": {
90151
"nohoist": ["@solidjs/start"]
91152
}
92153
}
93154
```
94155

95-
Regardless of where you specify the `nohoist` option, you also need to include `@solidjs/start` as a `devDependency` in the child `package.json`.
96-
97-
The reason why this is necessary is because `@solidjs/start` creates an `index.html` file within your project which expects to load a script located in `/node_modules/@solidjs/start/runtime/entry.jsx` (where `/` is the path of your project root). By default, if you hoist the `@solidjs/start` dependency into the workspace root then that script will not be available within the package's `node_modules` folder.
98-
99-
**Yarn v2 or higher**
100-
101-
The `nohoist` option is no longer available in Yarn v2+. In this case, we can use the `installConfig` property in the `package.json` (either workspace package or a specific project package) to make sure our deps are not hoisted.
156+
For **Yarn v2+**, use `installConfig` to prevent hoisting:
102157

103158
```jsonc
104-
// in project root of a workspace child
105159
{
106160
"installConfig": {
107161
"hoistingLimits": "dependencies"
108162
}
109163
}
110164
```
111165

166+
**Note**: Add `@solidjs/start` as a `devDependency` in the child `package.json` to ensure the `/node_modules/@solidjs/start/runtime/entry.jsx` script is available.
167+
112168
</details>

0 commit comments

Comments
 (0)