A multi-package starter template for building ObjectStack applications. This monorepo demonstrates the structure and conventions for creating metadata-driven low-code applications using the ObjectStack framework, with multiple examples covering different use cases.
# Clone this repository
git clone https://github.com/objectstack-ai/objectstack-starter.git
cd objectstack-starter
# Install dependencies (installs all workspace packages)
pnpm install
# Build all packages
pnpm run buildThis template includes multiple example applications demonstrating different use cases:
# Run the basic example (core objects)
pnpm run example:basic
# Run the e-commerce example
pnpm run example:ecommerce
# Run the blog example
pnpm run example:blog
# Run the CRM example
pnpm run example:crm
# Run the comprehensive CRM example (All core modules)
pnpm run example:crm-comprehensive# Watch mode - automatically rebuild all packages on changes
pnpm run dev
# Build specific package
pnpm run build:core
pnpm run build:examples
# Type checking
pnpm run type-check
# Clean build artifacts
pnpm run cleanThis starter template is organized as a monorepo with multiple packages:
Core package with base objects and views:
Data Objects:
- Project Task - Task management with status, priority, assignments, and time tracking
- Contact - Contact management with CRM capabilities
UI Views:
- Task list view (grid)
- Task kanban board
- Contact list view (grid)
- Main app definition
Example applications demonstrating different use cases:
E-commerce:
- Product object - Product catalog management
- Order object - Order processing and tracking
- Product and order list views
Blog:
- Blog Post object - Content management
- Author object - Author management
- Blog post and author list views
CRM (Comprehensive - All Core Modules):
- Lead Management - Lead object with qualification and conversion tracking
- Account Management - Account object for business account management
- Opportunity Management - Opportunity object for sales pipeline tracking
- Contact Management - Enhanced Contact object linked to accounts
- Case/Support Management - Case object for customer support tickets
- Campaign Management - Campaign object for marketing campaigns
- Quote Management - Quote object for sales quotes and proposals
- Contract Management - Contract object for agreements and subscriptions
- Activity Management - Task, Event, and Call objects for activity tracking
- 12 Views including list and kanban boards for all objects
package.json- Workspace configurationpackages/*/tsconfig.json- TypeScript configuration per packagepackages/*/package.json- Package dependencies and scripts
objectstack-starter/ # Monorepo root
βββ packages/
β βββ core/ # @objectstack-starter/core
β β βββ src/
β β β βββ data/ # Core data objects
β β β β βββ project-task.object.ts
β β β β βββ contact.object.ts
β β β βββ ui/ # Core UI views
β β β β βββ task.view.ts
β β β β βββ contact.view.ts
β β β β βββ app.ts
β β β βββ objectstack.config.ts
β β β βββ example.ts
β β β βββ index.ts
β β βββ package.json
β β βββ tsconfig.json
β β βββ README.md
β β
β βββ examples/ # @objectstack-starter/examples
β βββ src/
β β βββ data/ # Example data objects
β β β βββ product.object.ts # E-commerce
β β β βββ order.object.ts # E-commerce
β β β βββ blog-post.object.ts # Blog
β β β βββ author.object.ts # Blog
β β β βββ account.object.ts # CRM
β β β βββ opportunity.object.ts # CRM
β β β βββ lead.object.ts # CRM
β β β βββ case.object.ts # CRM
β β β βββ campaign.object.ts # CRM
β β β βββ quote.object.ts # CRM
β β β βββ contract.object.ts # CRM
β β β βββ activity.object.ts # CRM (Task, Event, Call)
β β βββ ui/ # Example UI views
β β β βββ ecommerce.view.ts
β β β βββ blog.view.ts
β β β βββ crm.view.ts
β β β βββ crm-extended.view.ts
β β βββ basic-example.ts
β β βββ ecommerce-example.ts
β β βββ blog-example.ts
β β βββ crm-example.ts
β β βββ crm-comprehensive-example.ts
β β βββ index.ts
β βββ package.json
β βββ tsconfig.json
β βββ README.md
β
βββ package.json # Workspace root configuration
βββ README.md # This file
Define your data structures using the ObjectStack Data Protocol:
import type { Data } from '@objectstack/spec';
export const myObject: Data.ObjectDefinition = {
name: 'my_object', // snake_case for machine names
label: 'My Object',
fields: {
my_field: {
name: 'my_field',
label: 'My Field',
type: 'text',
required: true
}
},
enable: {
apiEnabled: true,
trackHistory: true
}
};Define views for your data:
import type { UI } from '@objectstack/spec';
export const myListView: UI.ListView = {
name: 'my_list',
label: 'My List',
type: 'grid',
object: 'my_object',
columns: [
{ field: 'my_field', width: 200 }
]
};Configure your application:
import type { System } from '@objectstack/spec';
export const config: System.Manifest = {
name: 'my-app',
type: 'app',
displayName: 'My Application',
navigation: [
{
type: 'object',
object: 'my_object',
label: 'My Objects'
}
]
};ObjectStack follows strict naming conventions:
- Configuration Keys (TypeScript properties):
camelCase- Example:
maxLength,defaultValue,referenceFilters
- Example:
- Machine Names (data values):
snake_case- Example:
project_task,first_name,my_object
- Example:
- ObjectStack Spec - The protocol specification
- ObjectStack Documentation - Full documentation
- ObjectStack GitHub - Source code and examples
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This repository includes comprehensive automation workflows:
- CI Workflow (
.github/workflows/ci.yml)- Runs on push to
mainanddevelopbranches - Tests on Node.js 18.x and 20.x
- Type checking with TypeScript
- Builds all packages
- Runs all example scripts to validate functionality
- Archives build artifacts
- Runs on push to
- Code Quality Workflow (
.github/workflows/code-quality.yml)- Runs on pull requests
- Type checking
- Build validation
- Package structure verification
- Example execution tests
- Release Workflow (
.github/workflows/release.yml)- Triggered on version tags (e.g.,
v1.0.0) - Automated builds
- GitHub release creation with auto-generated notes
- Attaches relevant files to releases
- Triggered on version tags (e.g.,
- Dependabot (
.github/dependabot.yml)- Automated dependency updates
- Weekly checks for npm packages and GitHub Actions
- Separate configurations for root, core, and examples packages
- Auto-assigns PRs to maintainers
- Auto-assign (
.github/workflows/auto-assign.yml) - Automatically assigns issues and PRs - Auto-label (
.github/workflows/auto-label.yml) - Labels PRs based on changed files - Stale Management (
.github/workflows/stale.yml) - Closes inactive issues and PRs - Proof HTML (
.github/workflows/proof-html.yml) - Validates HTML content
- β Monorepo structure with pnpm workspaces
- β Multiple packages: core and examples
- β TypeScript support with strict type checking
- β Based on the latest @objectstack/spec (v0.3.3)
- β Automated CI/CD workflows with GitHub Actions
- β Automated dependency updates with Dependabot
- β Code quality checks on pull requests
- β Core objects: Task and Contact management
- β E-commerce example: Product and Order management
- β Blog example: Post and Author management
- β
Comprehensive CRM example: Complete CRM system with all core modules
- Lead Management with qualification workflow
- Account & Contact Management with relationships
- Opportunity Management with sales pipeline
- Case/Support Management for customer service
- Campaign Management for marketing
- Quote & Contract Management for sales
- Activity Tracking (Tasks, Events, Calls)
- 11 CRM objects with 12 views
- β Multiple view types (grid and kanban)
- β Proper project structure and configuration
- β Ready to extend with AI, API, and System protocols
- Create a new file in
packages/core/src/data/(e.g.,account.object.ts) - Define your object following the Data Protocol
- Export it from
packages/core/src/index.ts - Add navigation for it in
packages/core/src/objectstack.config.ts
- Create a new file in
packages/core/src/ui/(e.g.,account.view.ts) - Define your view following the UI Protocol
- Export it from
packages/core/src/index.ts
- Create a new directory in
packages/(e.g.,packages/my-example) - Add
package.jsonwith dependencies - Create
src/directory with objects and views - Add example runner files
- Update workspace configuration in root
package.json
- Create new object files in
packages/examples/src/data/ - Create corresponding view files in
packages/examples/src/ui/ - Create example runner file (e.g.,
my-example.ts) - Export from
packages/examples/src/index.ts - Add script to
packages/examples/package.json
- Use the TypeScript language server for IntelliSense and type checking
- Refer to the
@objectstack/specpackage for the complete protocol reference - Follow the naming conventions strictly (camelCase for config, snake_case for data)
- Enable capabilities like
trackHistoryandapiEnabledas needed - Use the
prompts/directory in@objectstack/specfor AI context
Built with β€οΈ using ObjectStack