Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

ObjectStack Todo Example

A minimal example demonstrating the ObjectStack Protocol with a simple Task management application.

🎯 Purpose

This example serves as a quick-start reference for learning ObjectStack basics. It demonstrates:

  • Simple object definition with essential field types
  • Basic configuration using objectstack.config.ts
  • Minimal setup to get started quickly

For a comprehensive example with advanced features (workflows, validations, multiple views, dashboards), see the CRM Example.

📂 Structure

examples/todo/
├── src/
│   ├── domains/
│   │   └── todo/
│   │       └── task.object.ts       # Task object definition
│   └── client-test.ts               # Client SDK usage example
├── objectstack.config.ts            # Application manifest
└── README.md                        # This file

📋 Features Demonstrated

Object Definition

  • Task Object (todo_task) with essential and advanced field types

Field Types Covered

  • Text (subject) - Task title (required field)
  • Date (due_date) - Due date tracking
  • Boolean (is_completed) - Completion status with default value
  • Rating (priority) - 3-star priority rating system
  • Color (category_color) - Color picker with HEX format and preset colors
  • Code (code_snippet) - JavaScript code editor with line numbers
  • Rich Text (notes) - Formatted text with full editor capabilities

Configuration Features

  • Object capabilities: apiEnabled, trackHistory
  • Custom icon (check-square)
  • Name field configuration
  • Commented action example showing future extensibility

💡 Usage

This package is part of the examples workspace. You can build it, run it as an API server, or just use it for reference.

Running as API Server

# From the monorepo root
pnpm run serve:todo

# Or from this directory
pnpm run serve

The server will start on http://localhost:3000 providing:

  • GraphQL API endpoint: http://localhost:3000/graphql
  • REST API endpoints based on the object definitions

Building the Example

# Install dependencies (from monorepo root)
pnpm install

# Build the example
pnpm --filter @object-ui/example-todo build

# Run type checking
pnpm --filter @object-ui/example-todo typecheck

📖 Learning Path

  1. Start Here - Simple task object, basic configuration
  2. Learn Protocols - Basic Examples - Protocol examples and patterns
  3. Next Step - CRM Example - Advanced features, workflows, validations, UI components
  4. Then - Official Documentation - Complete protocol reference

🔗 Related Resources

📝 License

MIT