Skip to content

Commit bbd96cb

Browse files
Copilothotlong
andcommitted
Initialize as ObjectStack starter template with @objectstack/spec v0.3.3
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 753bfe2 commit bbd96cb

File tree

12 files changed

+673
-8
lines changed

12 files changed

+673
-8
lines changed

.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
pnpm-debug.log*
7+
package-lock.json
8+
9+
# Build outputs
10+
dist/
11+
build/
12+
*.tsbuildinfo
13+
*.d.ts
14+
*.d.ts.map
15+
*.js
16+
*.js.map
17+
18+
# Keep specific config files
19+
!*.config.js
20+
21+
# Environment files
22+
.env
23+
.env.local
24+
.env.*.local
25+
26+
# IDE
27+
.vscode/
28+
.idea/
29+
*.swp
30+
*.swo
31+
*~
32+
33+
# OS
34+
.DS_Store
35+
Thumbs.db
36+
37+
# Logs
38+
logs/
39+
*.log
40+
41+
# Test coverage
42+
coverage/
43+
.nyc_output/
44+
45+
# Temporary files
46+
tmp/
47+
temp/
48+
*.tmp

README.md

Lines changed: 217 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,218 @@
1-
# Welcome to your organization's demo respository
2-
This code repository (or "repo") is designed to demonstrate the best GitHub has to offer with the least amount of noise.
1+
# ObjectStack Starter Template
2+
3+
A starter template for building [ObjectStack](https://objectstack.ai) applications. This template demonstrates the basic structure and conventions for creating metadata-driven low-code applications using the ObjectStack framework.
4+
5+
[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/)
6+
[![ObjectStack Spec](https://img.shields.io/badge/@objectstack/spec-0.3.3-green.svg)](https://www.npmjs.com/package/@objectstack/spec)
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8+
9+
## 🚀 Quick Start
10+
11+
### Installation
12+
13+
```bash
14+
# Clone this repository
15+
git clone https://github.com/objectstack-ai/objectstack-starter.git
16+
cd objectstack-starter
17+
18+
# Install dependencies
19+
npm install
20+
21+
# Build the project
22+
npm run build
23+
```
24+
25+
### Development
26+
27+
```bash
28+
# Watch mode - automatically rebuild on changes
29+
npm run dev
30+
31+
# Type checking
32+
npm run type-check
33+
34+
# Clean build artifacts
35+
npm run clean
36+
```
37+
38+
## 📦 What's Included
39+
40+
This starter template includes:
41+
42+
### Data Objects (`src/data/`)
43+
44+
- **Project Task** (`project-task.object.ts`) - Task management with status, priority, assignments, and time tracking
45+
- **Contact** (`contact.object.ts`) - Contact management with CRM capabilities
46+
47+
### UI Views (`src/ui/`)
48+
49+
- **Task Views** (`task.view.ts`)
50+
- Grid view for task lists
51+
- Kanban board for visual task management
52+
- **Contact Views** (`contact.view.ts`)
53+
- Grid view for contact management
54+
- **App Definition** (`app.ts`) - Main application structure and navigation
55+
56+
### Configuration
57+
58+
- `objectstack.config.ts` - ObjectStack manifest with app metadata, navigation, and permissions
59+
- `tsconfig.json` - TypeScript configuration
60+
- `package.json` - Project dependencies and scripts
61+
62+
## 🏗️ Project Structure
63+
64+
```
65+
objectstack-starter/
66+
├── src/
67+
│ ├── data/ # Data object definitions
68+
│ │ ├── project-task.object.ts
69+
│ │ └── contact.object.ts
70+
│ ├── ui/ # UI views and app definitions
71+
│ │ ├── task.view.ts
72+
│ │ ├── contact.view.ts
73+
│ │ └── app.ts
74+
│ ├── system/ # System configurations (future)
75+
│ ├── ai/ # AI agents and prompts (future)
76+
│ ├── api/ # API definitions (future)
77+
│ └── index.ts # Main export file
78+
├── objectstack.config.ts # ObjectStack manifest
79+
├── tsconfig.json # TypeScript configuration
80+
├── package.json # Project configuration
81+
└── README.md # This file
82+
```
83+
84+
## 📚 ObjectStack Concepts
85+
86+
### Data Protocol (ObjectQL)
87+
88+
Define your data structures using the ObjectStack Data Protocol:
89+
90+
```typescript
91+
import type { Data } from '@objectstack/spec';
92+
93+
export const myObject: Data.ObjectDefinition = {
94+
name: 'my_object', // snake_case for machine names
95+
label: 'My Object',
96+
fields: {
97+
my_field: {
98+
name: 'my_field',
99+
label: 'My Field',
100+
type: 'text',
101+
required: true
102+
}
103+
},
104+
enable: {
105+
apiEnabled: true,
106+
trackHistory: true
107+
}
108+
};
109+
```
110+
111+
### UI Protocol (ObjectUI)
112+
113+
Define views for your data:
114+
115+
```typescript
116+
import type { UI } from '@objectstack/spec';
117+
118+
export const myListView: UI.ListView = {
119+
name: 'my_list',
120+
label: 'My List',
121+
type: 'grid',
122+
object: 'my_object',
123+
columns: [
124+
{ field: 'my_field', width: 200 }
125+
]
126+
};
127+
```
128+
129+
### System Protocol (ObjectOS)
130+
131+
Configure your application:
132+
133+
```typescript
134+
import type { System } from '@objectstack/spec';
135+
136+
export const config: System.Manifest = {
137+
name: 'my-app',
138+
type: 'app',
139+
displayName: 'My Application',
140+
navigation: [
141+
{
142+
type: 'object',
143+
object: 'my_object',
144+
label: 'My Objects'
145+
}
146+
]
147+
};
148+
```
149+
150+
## 🎯 Naming Conventions
151+
152+
ObjectStack follows strict naming conventions:
153+
154+
- **Configuration Keys** (TypeScript properties): `camelCase`
155+
- Example: `maxLength`, `defaultValue`, `referenceFilters`
156+
- **Machine Names** (data values): `snake_case`
157+
- Example: `project_task`, `first_name`, `my_object`
158+
159+
## 📖 Learn More
160+
161+
- [ObjectStack Spec](https://www.npmjs.com/package/@objectstack/spec) - The protocol specification
162+
- [ObjectStack Documentation](https://objectstack.ai) - Full documentation
163+
- [ObjectStack GitHub](https://github.com/objectstack-ai) - Source code and examples
164+
165+
## 🤝 Contributing
166+
167+
Contributions are welcome! Please feel free to submit a Pull Request.
168+
169+
## 📄 License
170+
171+
This project is licensed under the MIT License - see the LICENSE file for details.
172+
173+
## 🌟 Features
174+
175+
- ✅ TypeScript support with strict type checking
176+
- ✅ Based on the latest @objectstack/spec (v0.3.3)
177+
- ✅ Example data objects following ObjectStack conventions
178+
- ✅ Example UI views (grid and kanban)
179+
- ✅ Proper project structure and configuration
180+
- ✅ Ready to extend with AI, API, and System protocols
181+
182+
## 🔧 Extending This Template
183+
184+
### Adding a New Object
185+
186+
1. Create a new file in `src/data/` (e.g., `account.object.ts`)
187+
2. Define your object following the Data Protocol
188+
3. Export it from `src/index.ts`
189+
4. Add navigation for it in `objectstack.config.ts`
190+
191+
### Adding a New View
192+
193+
1. Create a new file in `src/ui/` (e.g., `account.view.ts`)
194+
2. Define your view following the UI Protocol
195+
3. Export it from `src/index.ts`
196+
197+
### Adding AI Capabilities
198+
199+
1. Create files in `src/ai/` for agents and prompts
200+
2. Use the AI Protocol from `@objectstack/spec/ai`
201+
202+
### Adding API Endpoints
203+
204+
1. Create files in `src/api/` for endpoint definitions
205+
2. Use the API Protocol from `@objectstack/spec/api`
206+
207+
## 💡 Tips
208+
209+
- Use the TypeScript language server for IntelliSense and type checking
210+
- Refer to the `@objectstack/spec` package for the complete protocol reference
211+
- Follow the naming conventions strictly (camelCase for config, snake_case for data)
212+
- Enable capabilities like `trackHistory` and `apiEnabled` as needed
213+
- Use the `prompts/` directory in `@objectstack/spec` for AI context
214+
215+
---
216+
217+
Built with ❤️ using [ObjectStack](https://objectstack.ai)
3218

4-
The repo includes an `index.html` file (so it can render a web page), two GitHub Actions workflows, and a CSS stylesheet dependency.

index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
{
2-
"name": "demo-repo",
3-
"version": "0.2.0",
4-
"description": "A sample package.json",
2+
"name": "objectstack-starter",
3+
"version": "0.1.0",
4+
"description": "ObjectStack Starter Template - A metadata-driven low-code platform starter",
5+
"type": "module",
6+
"main": "dist/index.js",
7+
"types": "dist/index.d.ts",
8+
"scripts": {
9+
"build": "tsc",
10+
"dev": "tsc --watch",
11+
"clean": "rm -rf dist",
12+
"type-check": "tsc --noEmit"
13+
},
514
"dependencies": {
6-
"@primer/css": "17.0.1"
15+
"@objectstack/spec": "^0.3.3"
16+
},
17+
"devDependencies": {
18+
"@types/node": "^20.10.0",
19+
"typescript": "^5.3.0"
20+
},
21+
"engines": {
22+
"node": ">=18.0.0"
723
},
24+
"keywords": [
25+
"objectstack",
26+
"low-code",
27+
"metadata-driven",
28+
"starter-template"
29+
],
830
"license": "MIT"
931
}

0 commit comments

Comments
 (0)