You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/quickstart.md
+23-68Lines changed: 23 additions & 68 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,17 +7,33 @@ tags: [quickstart, typesync]
7
7
8
8
# 🚀 Quickstart
9
9
10
-
If you just want to get started and get a feel for how Hypergraph works, we have created an example app that you can clone and use as a starting point.
10
+
The quickest way to create a new Hypergraph application you can use the `create-hypergraph` CLI command. Make sure you have Node.js >= 22 installed.
11
11
12
-
## Explore the Example app
12
+
```bash
13
+
npx create-hypergraph@latest
14
+
# or
15
+
pnpm create hypergraph@latest
16
+
bunx create-hypergraph@latest
17
+
yarn create hypergraph@latest
18
+
```
19
+
20
+
During installation, you'll see the following prompts to choose your app name, template, and package manager.
21
+
22
+
23
+
1. What is your app named? …
24
+
2. Choose your template …
25
+
3. What package manager do you want to use? …
13
26
14
-
In order to get started as fast as possible we have created an example app that you can clone and use as a starting point.
27
+
28
+
After the prompts, you'll have a new Hypergraph application ready to use and can start exploring the app. To run it use the following command:
In case you want build an app with your own data types you can follow the guide below.
37
-
38
-
It will walk you through creating a new, fully-functional React application powered by Hypergraph using our scaffolding tool, **TypeSync**. In just a few minutes, you'll have a local development environment up and running.
# select @tailwindcss/oxide, better-sqlite3, and esbuild
59
-
```
60
-
61
-
### 2. Launch TypeSync
62
-
63
-
TypeSync is a visual tool that helps you define your data schema and then generates a complete starter application based on your design. Launch it with
64
-
65
-
```bash
66
-
hg typesync --open
67
-
```
68
-
69
-
This will start the TypeSync server. You can now access the **TypeSync** app in your browser at `http://localhost:3000`.
70
-
71
-
### 3. Scaffold Your Application
72
-
73
-
In the TypeSync Studio:
74
-
75
-
1. Give your new application a name and a short description.
76
-
2. Use the visual editor to define your data models (we call them "types"). Pick the type "Academic Field".
77
-
3. Then click "Generate App".
78
-
79
-
TypeSync will create a new directory for your application (e.g., `./my-awesome-app`) containing all the files and dependencies you need.
80
-
81
-
### 4. Run Your New App
82
-
83
-
Once your app is generated, open a **new terminal tab**. Navigate into the newly created app directory, install its dependencies, and start the local development server.
84
-
85
-
```bash
86
-
cd ./my-awesome-app # Adjust the path to match your app's name
87
-
pnpm install
88
-
pnpm dev
89
-
```
90
-
91
-
Your new Hypergraph-powered React application will now be running, typically at `http://localhost:5173`.
92
-
93
-
You're all set! You can now start building your application by editing the files in the `src` directory. The generated `src/schema.ts` file contains the Hypergraph schema you defined in TypeSync.
0 commit comments