Skip to content

Commit b45edb9

Browse files
Copilothotlong
andcommitted
Update documentation with serve command instructions
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent be1333f commit b45edb9

2 files changed

Lines changed: 45 additions & 6 deletions

File tree

README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,32 @@ Since this package is not yet published to NPM, here is how to play with the sou
7878

7979
## Examples
8080

81-
- [examples/crm](examples/crm) - CRM metadata app with a custom server.
82-
- [examples/kitchen-sink](examples/kitchen-sink) - Component catalog metadata app.
83-
- [examples/objectstack-server](examples/objectstack-server) - Run a metadata app with @objectstack/cli.
81+
ObjectStack examples that demonstrate different features and use cases:
82+
83+
- **[examples/crm](examples/crm)** - Full-featured CRM application with dashboards, multiple views (Grid, Kanban, Map, Gantt), and custom server implementation.
84+
- **[examples/todo](examples/todo)** - Simple task management app demonstrating basic ObjectStack configuration and field types.
85+
- **[examples/kitchen-sink](examples/kitchen-sink)** - Comprehensive component catalog showing all available field types, dashboard widgets, and view types.
86+
- **[examples/msw-todo](examples/msw-todo)** - Frontend-first development example using MSW (Mock Service Worker) to run ObjectStack in the browser.
87+
88+
### Running Examples as API Servers
89+
90+
All examples (except msw-todo) can be run as API servers using `@objectstack/cli`:
91+
92+
```bash
93+
# From the monorepo root
94+
pnpm run serve:crm # Start CRM example on http://localhost:3000
95+
pnpm run serve:todo # Start Todo example on http://localhost:3000
96+
pnpm run serve:kitchen-sink # Start Kitchen Sink example on http://localhost:3000
97+
98+
# Or from individual example directories
99+
cd examples/crm
100+
pnpm run serve
101+
```
102+
103+
Each server provides:
104+
- GraphQL API endpoint: `http://localhost:3000/graphql`
105+
- REST API endpoints based on object definitions
106+
- Sample data loaded from the configuration manifest
84107

85108
## 📦 For React Developers
86109

examples/todo/README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,33 @@ examples/todo/
4646

4747
## 💡 Usage
4848

49-
This package is part of the `examples` workspace. To build and verify:
49+
This package is part of the `examples` workspace. You can build it, run it as an API server, or just use it for reference.
50+
51+
### Running as API Server
52+
53+
```bash
54+
# From the monorepo root
55+
pnpm run serve:todo
56+
57+
# Or from this directory
58+
pnpm run serve
59+
```
60+
61+
The server will start on `http://localhost:3000` providing:
62+
- GraphQL API endpoint: `http://localhost:3000/graphql`
63+
- REST API endpoints based on the object definitions
64+
65+
### Building the Example
5066

5167
```bash
5268
# Install dependencies (from monorepo root)
5369
pnpm install
5470

5571
# Build the example
56-
pnpm --filter @objectstack/example-todo build
72+
pnpm --filter @object-ui/example-todo build
5773

5874
# Run type checking
59-
pnpm --filter @objectstack/example-todo typecheck
75+
pnpm --filter @object-ui/example-todo typecheck
6076
```
6177

6278
## 📖 Learning Path

0 commit comments

Comments
 (0)