Skip to content

Commit 0edde67

Browse files
authored
update quickstart guide (#399)
1 parent daf7983 commit 0edde67

1 file changed

Lines changed: 23 additions & 68 deletions

File tree

docs/docs/quickstart.md

Lines changed: 23 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,33 @@ tags: [quickstart, typesync]
77

88
# 🚀 Quickstart
99

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.
1111

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? …
1326

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:
1529

1630
```bash
17-
git clone https://github.com/geobrowser/hypergraph-app-template.git
18-
cd hypergraph-app-template
19-
pnpm install
20-
pnpm dev
31+
cd my-hypergraph-app
32+
npm run dev
33+
# or depending on your package manager
34+
yarn run dev
35+
pnpm run dev
36+
bun run dev
2137
```
2238

2339
Open the browser, navigate to `http://localhost:5173` and you should see the app running.
@@ -31,67 +47,6 @@ A few example datasets to use when building your apps are available here:
3147
- [Web3 DAPPs](https://testnet.geobrowser.io/space/b2565802-3118-47be-91f2-e59170735bac/09d3188c-8e20-4083-a6ad-e696cc493c7a)
3248
- [Token Values](https://testnet.geobrowser.io/space/2df11968-9d1c-489f-91b7-bdc88b472161/f8780a80-c238-4a2a-96cb-567d88b1aa63)
3349

34-
## Create a new app using TypeSync
35-
36-
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.
39-
40-
### Prerequisites
41-
42-
- Node.js >= 22
43-
- pnpm >= 10 (install with `npm install -g pnpm`)
44-
45-
### 1. Install the Hypergraph CLI
46-
47-
First install the Hypergraph CLI.
48-
49-
```bash
50-
npm install -g @graphprotocol/hypergraph-cli@latest
51-
```
52-
53-
When using `pnpm` you need to v10 or higher
54-
55-
```bash
56-
pnpm install -g @graphprotocol/hypergraph-cli@latest
57-
pnpm approve-builds -g
58-
# 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.
94-
9550
---
9651

9752
## Edit on GitHub :bust_in_silhouette:

0 commit comments

Comments
 (0)