diff --git a/README.md b/README.md index c18847a..4c181d1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ObjectStack Starter Template -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. +A multi-package starter template for building [ObjectStack](https://objectstack.ai) 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. [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/) [![ObjectStack Spec](https://img.shields.io/badge/@objectstack/spec-0.3.3-green.svg)](https://www.npmjs.com/package/@objectstack/spec) @@ -15,19 +15,41 @@ A starter template for building [ObjectStack](https://objectstack.ai) applicatio git clone https://github.com/objectstack-ai/objectstack-starter.git cd objectstack-starter -# Install dependencies +# Install dependencies (installs all workspace packages) npm install -# Build the project +# Build all packages npm run build ``` +### Running Examples + +This template includes multiple example applications demonstrating different use cases: + +```bash +# Run the basic example (core objects) +npm run example:basic + +# Run the e-commerce example +npm run example:ecommerce + +# Run the blog example +npm run example:blog + +# Run the CRM example +npm run example:crm +``` + ### Development ```bash -# Watch mode - automatically rebuild on changes +# Watch mode - automatically rebuild all packages on changes npm run dev +# Build specific package +npm run build:core +npm run build:examples + # Type checking npm run type-check @@ -35,64 +57,94 @@ npm run type-check npm run clean ``` -### Running the Example +## šŸ“¦ What's Included -The template includes an example file demonstrating how to use the defined objects and views: +This starter template is organized as a monorepo with multiple packages: -```bash -# Build the project -npm run build +### Package: @objectstack-starter/core -# Run the example -node dist/example.js -``` +Core package with base objects and views: -This will show you how to import and work with the ObjectStack definitions. +**Data Objects:** +- **Project Task** - Task management with status, priority, assignments, and time tracking +- **Contact** - Contact management with CRM capabilities -## šŸ“¦ What's Included +**UI Views:** +- Task list view (grid) +- Task kanban board +- Contact list view (grid) +- Main app definition -This starter template includes: +### Package: @objectstack-starter/examples -### Data Objects (`src/data/`) +Example applications demonstrating different use cases: -- **Project Task** (`project-task.object.ts`) - Task management with status, priority, assignments, and time tracking -- **Contact** (`contact.object.ts`) - Contact management with CRM capabilities +**E-commerce:** +- Product object - Product catalog management +- Order object - Order processing and tracking +- Product and order list views -### UI Views (`src/ui/`) +**Blog:** +- Blog Post object - Content management +- Author object - Author management +- Blog post and author list views -- **Task Views** (`task.view.ts`) - - Grid view for task lists - - Kanban board for visual task management -- **Contact Views** (`contact.view.ts`) - - Grid view for contact management -- **App Definition** (`app.ts`) - Main application structure and navigation +**CRM:** +- Account object - Business account management +- Opportunity object - Sales pipeline tracking +- Account list view, opportunity list/kanban views ### Configuration -- `objectstack.config.ts` - ObjectStack manifest with app metadata, navigation, and permissions -- `tsconfig.json` - TypeScript configuration -- `package.json` - Project dependencies and scripts +- `package.json` - Workspace configuration +- `packages/*/tsconfig.json` - TypeScript configuration per package +- `packages/*/package.json` - Package dependencies and scripts ## šŸ—ļø Project Structure ``` -objectstack-starter/ -ā”œā”€ā”€ src/ -│ ā”œā”€ā”€ data/ # Data object definitions -│ │ ā”œā”€ā”€ project-task.object.ts -│ │ └── contact.object.ts -│ ā”œā”€ā”€ ui/ # UI views and app definitions -│ │ ā”œā”€ā”€ task.view.ts -│ │ ā”œā”€ā”€ contact.view.ts -│ │ └── app.ts -│ ā”œā”€ā”€ system/ # System configurations (future) -│ ā”œā”€ā”€ ai/ # AI agents and prompts (future) -│ ā”œā”€ā”€ api/ # API definitions (future) -│ └── index.ts # Main export file -ā”œā”€ā”€ objectstack.config.ts # ObjectStack manifest -ā”œā”€ā”€ tsconfig.json # TypeScript configuration -ā”œā”€ā”€ package.json # Project configuration -└── README.md # This file +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 +│ │ ā”œā”€ā”€ ui/ # Example UI views +│ │ │ ā”œā”€ā”€ ecommerce.view.ts +│ │ │ ā”œā”€ā”€ blog.view.ts +│ │ │ └── crm.view.ts +│ │ ā”œā”€ā”€ basic-example.ts +│ │ ā”œā”€ā”€ ecommerce-example.ts +│ │ ā”œā”€ā”€ blog-example.ts +│ │ ā”œā”€ā”€ crm-example.ts +│ │ └── index.ts +│ ā”œā”€ā”€ package.json +│ ā”œā”€ā”€ tsconfig.json +│ └── README.md +│ +ā”œā”€ā”€ package.json # Workspace root configuration +└── README.md # This file ``` ## šŸ“š ObjectStack Concepts @@ -186,37 +238,48 @@ This project is licensed under the MIT License - see the LICENSE file for detail ## 🌟 Features +- āœ… Monorepo structure with npm workspaces +- āœ… Multiple packages: core and examples - āœ… TypeScript support with strict type checking - āœ… Based on the latest @objectstack/spec (v0.3.3) -- āœ… Example data objects following ObjectStack conventions -- āœ… Example UI views (grid and kanban) +- āœ… Core objects: Task and Contact management +- āœ… E-commerce example: Product and Order management +- āœ… Blog example: Post and Author management +- āœ… CRM example: Account and Opportunity tracking +- āœ… Multiple view types (grid and kanban) - āœ… Proper project structure and configuration - āœ… Ready to extend with AI, API, and System protocols ## šŸ”§ Extending This Template -### Adding a New Object +### Adding a New Object to Core Package -1. Create a new file in `src/data/` (e.g., `account.object.ts`) +1. Create a new file in `packages/core/src/data/` (e.g., `account.object.ts`) 2. Define your object following the Data Protocol -3. Export it from `src/index.ts` -4. Add navigation for it in `objectstack.config.ts` +3. Export it from `packages/core/src/index.ts` +4. Add navigation for it in `packages/core/src/objectstack.config.ts` -### Adding a New View +### Adding a New View to Core Package -1. Create a new file in `src/ui/` (e.g., `account.view.ts`) +1. Create a new file in `packages/core/src/ui/` (e.g., `account.view.ts`) 2. Define your view following the UI Protocol -3. Export it from `src/index.ts` +3. Export it from `packages/core/src/index.ts` -### Adding AI Capabilities +### Creating a New Example Package -1. Create files in `src/ai/` for agents and prompts -2. Use the AI Protocol from `@objectstack/spec/ai` +1. Create a new directory in `packages/` (e.g., `packages/my-example`) +2. Add `package.json` with dependencies +3. Create `src/` directory with objects and views +4. Add example runner files +5. Update workspace configuration in root `package.json` -### Adding API Endpoints +### Adding More Examples to Examples Package -1. Create files in `src/api/` for endpoint definitions -2. Use the API Protocol from `@objectstack/spec/api` +1. Create new object files in `packages/examples/src/data/` +2. Create corresponding view files in `packages/examples/src/ui/` +3. Create example runner file (e.g., `my-example.ts`) +4. Export from `packages/examples/src/index.ts` +5. Add script to `packages/examples/package.json` ## šŸ’” Tips diff --git a/package.json b/package.json index a07c3f1..d308136 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,23 @@ { "name": "objectstack-starter", "version": "0.1.0", - "description": "ObjectStack Starter Template - A metadata-driven low-code platform starter", + "description": "ObjectStack Starter Template - A metadata-driven low-code platform starter (Multi-package Monorepo)", "type": "module", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "private": true, + "workspaces": [ + "packages/*" + ], "scripts": { - "build": "tsc", - "dev": "tsc --watch", - "clean": "rm -rf dist", - "type-check": "tsc --noEmit" - }, - "dependencies": { - "@objectstack/spec": "^0.3.3" + "build": "npm run build --workspaces", + "build:core": "npm run build -w @objectstack-starter/core", + "build:examples": "npm run build -w @objectstack-starter/examples", + "dev": "npm run dev --workspaces --if-present", + "clean": "npm run clean --workspaces --if-present", + "type-check": "npm run type-check --workspaces", + "example:basic": "npm run example:basic -w @objectstack-starter/examples", + "example:ecommerce": "npm run example:ecommerce -w @objectstack-starter/examples", + "example:blog": "npm run example:blog -w @objectstack-starter/examples", + "example:crm": "npm run example:crm -w @objectstack-starter/examples" }, "devDependencies": { "@types/node": "^20.10.0", @@ -25,7 +30,8 @@ "objectstack", "low-code", "metadata-driven", - "starter-template" + "starter-template", + "monorepo" ], "license": "MIT" } diff --git a/packages/core/README.md b/packages/core/README.md new file mode 100644 index 0000000..ecf92de --- /dev/null +++ b/packages/core/README.md @@ -0,0 +1,83 @@ +# @objectstack-starter/core + +Core package for ObjectStack Starter - includes base objects and views for task and contact management. + +## What's Included + +### Data Objects + +- **Project Task** (`project_task`) - Task management with status, priority, assignments, and time tracking +- **Contact** (`contact`) - Contact management with CRM capabilities + +### UI Views + +- **Task Views** + - Grid view for task lists + - Kanban board for visual task management +- **Contact Views** + - Grid view for contact management +- **App Definition** - Main application structure and navigation + +## Installation + +```bash +npm install @objectstack-starter/core +``` + +## Usage + +```typescript +import { + config, + projectTaskObject, + contactObject, + taskListView, + taskKanbanView, + contactListView, + mainApp +} from '@objectstack-starter/core'; + +console.log('Task Fields:', Object.keys(projectTaskObject.fields)); +console.log('Contact Fields:', Object.keys(contactObject.fields)); +``` + +## API + +### Exports + +- `config` - ObjectStack manifest configuration +- `projectTaskObject` - Project task data object definition +- `contactObject` - Contact data object definition +- `taskListView` - Task grid view definition +- `taskKanbanView` - Task kanban view definition +- `contactListView` - Contact grid view definition +- `mainApp` - Main application definition + +### Type Exports + +Re-exports all types from `@objectstack/spec`: +- `Data` - Data Protocol types +- `UI` - UI Protocol types +- `System` - System Protocol types +- `AI` - AI Protocol types +- `API` - API Protocol types + +## Development + +```bash +# Build the package +npm run build + +# Watch mode +npm run dev + +# Type checking +npm run type-check + +# Clean build artifacts +npm run clean +``` + +## License + +MIT diff --git a/packages/core/package.json b/packages/core/package.json new file mode 100644 index 0000000..55292ec --- /dev/null +++ b/packages/core/package.json @@ -0,0 +1,31 @@ +{ + "name": "@objectstack-starter/core", + "version": "0.1.0", + "description": "ObjectStack Starter Template - Core package with base objects and views", + "type": "module", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "clean": "rm -rf dist", + "type-check": "tsc --noEmit" + }, + "dependencies": { + "@objectstack/spec": "^0.3.3" + }, + "devDependencies": { + "@types/node": "^20.10.0", + "typescript": "^5.3.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "keywords": [ + "objectstack", + "low-code", + "metadata-driven", + "core" + ], + "license": "MIT" +} diff --git a/src/data/contact.object.ts b/packages/core/src/data/contact.object.ts similarity index 100% rename from src/data/contact.object.ts rename to packages/core/src/data/contact.object.ts diff --git a/src/data/project-task.object.ts b/packages/core/src/data/project-task.object.ts similarity index 100% rename from src/data/project-task.object.ts rename to packages/core/src/data/project-task.object.ts diff --git a/src/example.ts b/packages/core/src/example.ts similarity index 100% rename from src/example.ts rename to packages/core/src/example.ts diff --git a/src/index.ts b/packages/core/src/index.ts similarity index 100% rename from src/index.ts rename to packages/core/src/index.ts diff --git a/src/objectstack.config.ts b/packages/core/src/objectstack.config.ts similarity index 100% rename from src/objectstack.config.ts rename to packages/core/src/objectstack.config.ts diff --git a/src/ui/app.ts b/packages/core/src/ui/app.ts similarity index 100% rename from src/ui/app.ts rename to packages/core/src/ui/app.ts diff --git a/src/ui/contact.view.ts b/packages/core/src/ui/contact.view.ts similarity index 100% rename from src/ui/contact.view.ts rename to packages/core/src/ui/contact.view.ts diff --git a/src/ui/task.view.ts b/packages/core/src/ui/task.view.ts similarity index 100% rename from src/ui/task.view.ts rename to packages/core/src/ui/task.view.ts diff --git a/tsconfig.json b/packages/core/tsconfig.json similarity index 100% rename from tsconfig.json rename to packages/core/tsconfig.json diff --git a/packages/examples/README.md b/packages/examples/README.md new file mode 100644 index 0000000..43c2d90 --- /dev/null +++ b/packages/examples/README.md @@ -0,0 +1,136 @@ +# @objectstack-starter/examples + +Example applications demonstrating various ObjectStack use cases. + +## What's Included + +This package contains complete example applications for different domains: + +### E-commerce Example + +**Objects:** +- `product` - Product catalog management +- `order` - Order processing and tracking + +**Views:** +- Product list view +- Order list view + +**Run:** +```bash +npm run example:ecommerce +``` + +### Blog Example + +**Objects:** +- `blog_post` - Blog post content management +- `author` - Content author management + +**Views:** +- Blog post list view +- Author list view + +**Run:** +```bash +npm run example:blog +``` + +### CRM Example + +**Objects:** +- `account` - Business account management +- `opportunity` - Sales opportunity tracking + +**Views:** +- Account list view +- Opportunity list view +- Opportunity kanban view (sales pipeline) + +**Run:** +```bash +npm run example:crm +``` + +### Basic Example + +Demonstrates the core objects from `@objectstack-starter/core`. + +**Run:** +```bash +npm run example:basic +``` + +## Installation + +```bash +npm install @objectstack-starter/examples +``` + +## Usage + +```typescript +// Import E-commerce objects +import { productObject, orderObject, productListView } from '@objectstack-starter/examples'; + +// Import Blog objects +import { blogPostObject, authorObject } from '@objectstack-starter/examples'; + +// Import CRM objects +import { accountObject, opportunityObject, opportunityKanbanView } from '@objectstack-starter/examples'; +``` + +## Available Exports + +### E-commerce +- `productObject` - Product data object +- `orderObject` - Order data object +- `productListView` - Product grid view +- `orderListView` - Order grid view + +### Blog +- `blogPostObject` - Blog post data object +- `authorObject` - Author data object +- `blogPostListView` - Blog post grid view +- `authorListView` - Author grid view + +### CRM +- `accountObject` - Account data object +- `opportunityObject` - Opportunity data object +- `accountListView` - Account grid view +- `opportunityListView` - Opportunity grid view +- `opportunityKanbanView` - Opportunity kanban view + +## Development + +```bash +# Build the package +npm run build + +# Watch mode +npm run dev + +# Type checking +npm run type-check + +# Run all examples +npm run example:basic +npm run example:ecommerce +npm run example:blog +npm run example:crm +``` + +## Use Cases + +### E-commerce +Build an online store with product catalog and order management. + +### Blog +Create a content management system with multi-author support. + +### CRM +Develop a sales management system with account and opportunity tracking. + +## License + +MIT diff --git a/packages/examples/package.json b/packages/examples/package.json new file mode 100644 index 0000000..d0141a2 --- /dev/null +++ b/packages/examples/package.json @@ -0,0 +1,35 @@ +{ + "name": "@objectstack-starter/examples", + "version": "0.1.0", + "description": "ObjectStack Starter Template - Example applications and use cases", + "type": "module", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "clean": "rm -rf dist", + "type-check": "tsc --noEmit", + "example:basic": "node dist/basic-example.js", + "example:ecommerce": "node dist/ecommerce-example.js", + "example:blog": "node dist/blog-example.js", + "example:crm": "node dist/crm-example.js" + }, + "dependencies": { + "@objectstack/spec": "^0.3.3", + "@objectstack-starter/core": "*" + }, + "devDependencies": { + "@types/node": "^20.10.0", + "typescript": "^5.3.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "keywords": [ + "objectstack", + "examples", + "starter-template" + ], + "license": "MIT" +} diff --git a/packages/examples/src/basic-example.ts b/packages/examples/src/basic-example.ts new file mode 100644 index 0000000..6f140f8 --- /dev/null +++ b/packages/examples/src/basic-example.ts @@ -0,0 +1,56 @@ +/** + * Basic Example + * Demonstrates the core objects from @objectstack-starter/core + */ + +import { + config, + projectTaskObject, + contactObject, + taskListView, + taskKanbanView, + contactListView, + mainApp +} from '@objectstack-starter/core'; + +console.log('===================================='); +console.log('Basic Example - Core Objects'); +console.log('====================================\n'); + +// Example 1: Access configuration +console.log('šŸ“‹ App Configuration:'); +console.log(` Name: ${config.name}`); +console.log(` Version: ${config.version}`); +console.log(` Type: ${config.type}\n`); + +// Example 2: Project Task Object +console.log('šŸ“ Project Task Object:'); +console.log(` Name: ${projectTaskObject.name}`); +console.log(` Label: ${projectTaskObject.label}`); +console.log(` Fields: ${Object.keys(projectTaskObject.fields).join(', ')}`); +console.log(` Searchable: ${projectTaskObject.enable?.searchable}`); +console.log(` API Enabled: ${projectTaskObject.enable?.apiEnabled}\n`); + +// Example 3: Contact Object +console.log('šŸ‘¤ Contact Object:'); +console.log(` Name: ${contactObject.name}`); +console.log(` Label: ${contactObject.label}`); +console.log(` Fields: ${Object.keys(contactObject.fields).join(', ')}\n`); + +// Example 4: Task Views +console.log('šŸŽØ Task Views:'); +console.log(` List View: ${taskListView.name} (${taskListView.type})`); +console.log(` Kanban View: ${taskKanbanView.name} (${taskKanbanView.type})\n`); + +// Example 5: Contact View +console.log('šŸŽØ Contact View:'); +console.log(` List View: ${contactListView.name} (${contactListView.type})`); +console.log(` Columns: ${contactListView.columns?.length}\n`); + +// Example 6: Main App +console.log('šŸ  Main Application:'); +console.log(` Name: ${mainApp.name}`); +console.log(` Label: ${mainApp.label}`); +console.log(` Navigation Items: ${mainApp.navigation?.length}\n`); + +console.log('āœ… Basic example completed successfully!'); diff --git a/packages/examples/src/blog-example.ts b/packages/examples/src/blog-example.ts new file mode 100644 index 0000000..73d924c --- /dev/null +++ b/packages/examples/src/blog-example.ts @@ -0,0 +1,67 @@ +/** + * Blog Example + * Demonstrates blog content management objects (Blog Post, Author) + */ + +import { blogPostObject } from './data/blog-post.object.js'; +import { authorObject } from './data/author.object.js'; +import { blogPostListView, authorListView } from './ui/blog.view.js'; + +console.log('===================================='); +console.log('Blog Example'); +console.log('====================================\n'); + +// Example 1: Blog Post Object +console.log('šŸ“ Blog Post Object:'); +console.log(` Name: ${blogPostObject.name}`); +console.log(` Label: ${blogPostObject.label}`); +console.log(` Description: ${blogPostObject.description}`); +console.log(` Fields: ${Object.keys(blogPostObject.fields).join(', ')}`); +console.log(` Searchable: ${blogPostObject.enable?.searchable}\n`); + +// Example 2: Post Status Workflow +console.log('šŸ”„ Post Status Workflow:'); +const statusField = blogPostObject.fields.status; +if (statusField.type === 'select' && statusField.options) { + statusField.options.forEach(option => { + console.log(` ${option.value === 'draft' ? 'āž”ļø' : ' '} ${option.label}`); + }); +} +console.log(); + +// Example 3: Author Object +console.log('āœļø Author Object:'); +console.log(` Name: ${authorObject.name}`); +console.log(` Label: ${authorObject.label}`); +console.log(` Description: ${authorObject.description}`); +console.log(` Fields: ${Object.keys(authorObject.fields).join(', ')}\n`); + +// Example 4: Author Social Fields +console.log('🌐 Author Social Media Integration:'); +console.log(` Twitter: ${authorObject.fields.social_twitter.label}`); +console.log(` GitHub: ${authorObject.fields.social_github.label}\n`); + +// Example 5: Blog Post List View +console.log('šŸŽØ Blog Post List View:'); +console.log(` Name: ${blogPostListView.name}`); +console.log(` Type: ${blogPostListView.type}`); +if (blogPostListView.columns && typeof blogPostListView.columns[0] === 'object') { + console.log(` Columns: ${blogPostListView.columns.map(c => typeof c === 'object' ? c.field : c).join(', ')}`); +} +console.log(); + +// Example 6: Author List View +console.log('šŸŽØ Author List View:'); +console.log(` Name: ${authorListView.name}`); +console.log(` Type: ${authorListView.type}`); +if (authorListView.columns && typeof authorListView.columns[0] === 'object') { + console.log(` Columns: ${authorListView.columns.map(c => typeof c === 'object' ? c.field : c).join(', ')}`); +} +console.log(); + +// Example 7: Content Relationships +console.log('šŸ”— Object Relationships:'); +console.log(` Blog Post -> Author: ${blogPostObject.fields.author.type} (${blogPostObject.fields.author.reference})\n`); + +console.log('āœ… Blog example completed successfully!'); +console.log('\nšŸ’” Use Case: Build a content management system with multi-author support'); diff --git a/packages/examples/src/crm-example.ts b/packages/examples/src/crm-example.ts new file mode 100644 index 0000000..3050dcb --- /dev/null +++ b/packages/examples/src/crm-example.ts @@ -0,0 +1,103 @@ +/** + * CRM Example + * Demonstrates CRM objects (Account, Opportunity) + */ + +import { accountObject } from './data/account.object.js'; +import { opportunityObject } from './data/opportunity.object.js'; +import { accountListView, opportunityListView, opportunityKanbanView } from './ui/crm.view.js'; + +console.log('===================================='); +console.log('CRM Example'); +console.log('====================================\n'); + +// Example 1: Account Object +console.log('šŸ¢ Account Object:'); +console.log(` Name: ${accountObject.name}`); +console.log(` Label: ${accountObject.label}`); +console.log(` Description: ${accountObject.description}`); +console.log(` Fields: ${Object.keys(accountObject.fields).join(', ')}`); +console.log(` Track History: ${accountObject.enable?.trackHistory}\n`); + +// Example 2: Account Industries +console.log('šŸ­ Industries:'); +const industryField = accountObject.fields.industry; +if (industryField.type === 'select' && industryField.options) { + industryField.options.forEach(option => { + console.log(` - ${option.label}`); + }); +} +console.log(); + +// Example 3: Account Types +console.log('šŸ“Š Account Types:'); +const typeField = accountObject.fields.type; +if (typeField.type === 'select' && typeField.options) { + typeField.options.forEach(option => { + console.log(` - ${option.label} (${option.value})`); + }); +} +console.log(); + +// Example 4: Opportunity Object +console.log('šŸ’° Opportunity Object:'); +console.log(` Name: ${opportunityObject.name}`); +console.log(` Label: ${opportunityObject.label}`); +console.log(` Description: ${opportunityObject.description}`); +console.log(` Fields: ${Object.keys(opportunityObject.fields).join(', ')}\n`); + +// Example 5: Sales Pipeline Stages +console.log('šŸ”„ Sales Pipeline Stages:'); +const stageField = opportunityObject.fields.stage; +if (stageField.type === 'select' && stageField.options) { + stageField.options.forEach((option, index) => { + const arrow = index < stageField.options!.length - 1 ? 'āž”ļø' : ''; + console.log(` ${option.label} ${arrow}`); + }); +} +console.log(); + +// Example 6: Lead Sources +console.log('šŸ“¢ Lead Sources:'); +const leadSourceField = opportunityObject.fields.lead_source; +if (leadSourceField.type === 'select' && leadSourceField.options) { + leadSourceField.options.forEach(option => { + console.log(` - ${option.label}`); + }); +} +console.log(); + +// Example 7: Account List View +console.log('šŸŽØ Account List View:'); +console.log(` Name: ${accountListView.name}`); +console.log(` Type: ${accountListView.type}`); +if (accountListView.columns && typeof accountListView.columns[0] === 'object') { + console.log(` Columns: ${accountListView.columns.map(c => typeof c === 'object' ? c.field : c).join(', ')}`); +} +console.log(); + +// Example 8: Opportunity List View +console.log('šŸŽØ Opportunity List View:'); +console.log(` Name: ${opportunityListView.name}`); +console.log(` Type: ${opportunityListView.type}`); +if (opportunityListView.columns && typeof opportunityListView.columns[0] === 'object') { + console.log(` Columns: ${opportunityListView.columns.map(c => typeof c === 'object' ? c.field : c).join(', ')}`); +} +console.log(); + +// Example 9: Opportunity Kanban View +console.log('šŸŽØ Opportunity Kanban View (Sales Pipeline):'); +console.log(` Name: ${opportunityKanbanView.name}`); +console.log(` Type: ${opportunityKanbanView.type}`); +if (opportunityKanbanView.columns && typeof opportunityKanbanView.columns[0] === 'string') { + console.log(` Card Fields: ${opportunityKanbanView.columns.join(', ')}`); +} +console.log(); + +// Example 10: Object Relationships +console.log('šŸ”— Object Relationships:'); +console.log(` Opportunity -> Account: ${opportunityObject.fields.account.type} (${opportunityObject.fields.account.reference})`); +console.log(` Opportunity -> Owner: ${opportunityObject.fields.owner.type} (${opportunityObject.fields.owner.reference})\n`); + +console.log('āœ… CRM example completed successfully!'); +console.log('\nšŸ’” Use Case: Build a sales management system with account and opportunity tracking'); diff --git a/packages/examples/src/data/account.object.ts b/packages/examples/src/data/account.object.ts new file mode 100644 index 0000000..e4a5eef --- /dev/null +++ b/packages/examples/src/data/account.object.ts @@ -0,0 +1,109 @@ +import type { Data } from '@objectstack/spec'; + +/** + * Account Object + * CRM account/company management + */ +export const accountObject = { + name: 'account', + label: 'Account', + pluralLabel: 'Accounts', + description: 'Business account management', + active: true, + isSystem: false, + abstract: false, + datasource: 'default', + + fields: { + name: { + name: 'name', + label: 'Account Name', + type: 'text', + required: true + }, + + account_number: { + name: 'account_number', + label: 'Account Number', + type: 'text', + unique: true + }, + + industry: { + name: 'industry', + label: 'Industry', + type: 'select', + options: [ + { label: 'Technology', value: 'technology' }, + { label: 'Finance', value: 'finance' }, + { label: 'Healthcare', value: 'healthcare' }, + { label: 'Manufacturing', value: 'manufacturing' }, + { label: 'Retail', value: 'retail' }, + { label: 'Education', value: 'education' }, + { label: 'Other', value: 'other' } + ] + }, + + type: { + name: 'type', + label: 'Account Type', + type: 'select', + options: [ + { label: 'Customer', value: 'customer' }, + { label: 'Prospect', value: 'prospect' }, + { label: 'Partner', value: 'partner' }, + { label: 'Competitor', value: 'competitor' } + ] + }, + + annual_revenue: { + name: 'annual_revenue', + label: 'Annual Revenue', + type: 'decimal' + }, + + employee_count: { + name: 'employee_count', + label: 'Number of Employees', + type: 'number' + }, + + website: { + name: 'website', + label: 'Website', + type: 'url' + }, + + phone: { + name: 'phone', + label: 'Phone', + type: 'text' + }, + + billing_address: { + name: 'billing_address', + label: 'Billing Address', + type: 'textarea' + }, + + shipping_address: { + name: 'shipping_address', + label: 'Shipping Address', + type: 'textarea' + }, + + description: { + name: 'description', + label: 'Description', + type: 'textarea' + } + }, + + enable: { + apiEnabled: true, + trackHistory: true, + searchable: true + } +} as unknown as Data.ServiceObject; + +export default accountObject; diff --git a/packages/examples/src/data/author.object.ts b/packages/examples/src/data/author.object.ts new file mode 100644 index 0000000..a3de256 --- /dev/null +++ b/packages/examples/src/data/author.object.ts @@ -0,0 +1,85 @@ +import type { Data } from '@objectstack/spec'; + +/** + * Author Object + * Blog author/content creator management + */ +export const authorObject = { + name: 'author', + label: 'Author', + pluralLabel: 'Authors', + description: 'Content author management', + active: true, + isSystem: false, + abstract: false, + datasource: 'default', + + fields: { + name: { + name: 'name', + label: 'Full Name', + type: 'text', + required: true + }, + + email: { + name: 'email', + label: 'Email', + type: 'email', + required: true, + unique: true + }, + + bio: { + name: 'bio', + label: 'Biography', + type: 'textarea' + }, + + avatar_url: { + name: 'avatar_url', + label: 'Avatar URL', + type: 'url' + }, + + website: { + name: 'website', + label: 'Website', + type: 'url' + }, + + social_twitter: { + name: 'social_twitter', + label: 'Twitter Handle', + type: 'text' + }, + + social_github: { + name: 'social_github', + label: 'GitHub Username', + type: 'text' + }, + + is_active: { + name: 'is_active', + label: 'Active', + type: 'boolean', + defaultValue: true + }, + + joined_date: { + name: 'joined_date', + label: 'Joined Date', + type: 'date', + required: true + } + }, + + enable: { + apiEnabled: true, + trackHistory: true, + searchable: true + } +} as unknown as Data.ServiceObject; + +export default authorObject; diff --git a/packages/examples/src/data/blog-post.object.ts b/packages/examples/src/data/blog-post.object.ts new file mode 100644 index 0000000..1df5dfd --- /dev/null +++ b/packages/examples/src/data/blog-post.object.ts @@ -0,0 +1,105 @@ +import type { Data } from '@objectstack/spec'; + +/** + * Blog Post Object + * Blog post content management + */ +export const blogPostObject = { + name: 'blog_post', + label: 'Blog Post', + pluralLabel: 'Blog Posts', + description: 'Blog content management', + active: true, + isSystem: false, + abstract: false, + datasource: 'default', + + fields: { + title: { + name: 'title', + label: 'Title', + type: 'text', + required: true + }, + + slug: { + name: 'slug', + label: 'URL Slug', + type: 'text', + required: true, + unique: true + }, + + content: { + name: 'content', + label: 'Content', + type: 'textarea', + required: true + }, + + excerpt: { + name: 'excerpt', + label: 'Excerpt', + type: 'textarea' + }, + + author: { + name: 'author', + label: 'Author', + type: 'lookup', + reference: 'author' + }, + + status: { + name: 'status', + label: 'Status', + type: 'select', + required: true, + defaultValue: 'draft', + options: [ + { label: 'Draft', value: 'draft' }, + { label: 'Published', value: 'published' }, + { label: 'Archived', value: 'archived' } + ] + }, + + published_date: { + name: 'published_date', + label: 'Published Date', + type: 'datetime' + }, + + featured_image: { + name: 'featured_image', + label: 'Featured Image', + type: 'url' + }, + + categories: { + name: 'categories', + label: 'Categories', + type: 'text' + }, + + tags: { + name: 'tags', + label: 'Tags', + type: 'text' + }, + + view_count: { + name: 'view_count', + label: 'View Count', + type: 'number', + defaultValue: 0 + } + }, + + enable: { + apiEnabled: true, + trackHistory: true, + searchable: true + } +} as unknown as Data.ServiceObject; + +export default blogPostObject; diff --git a/packages/examples/src/data/opportunity.object.ts b/packages/examples/src/data/opportunity.object.ts new file mode 100644 index 0000000..9afc4c8 --- /dev/null +++ b/packages/examples/src/data/opportunity.object.ts @@ -0,0 +1,116 @@ +import type { Data } from '@objectstack/spec'; + +/** + * Opportunity Object + * CRM sales opportunity management + */ +export const opportunityObject = { + name: 'opportunity', + label: 'Opportunity', + pluralLabel: 'Opportunities', + description: 'Sales opportunity tracking', + active: true, + isSystem: false, + abstract: false, + datasource: 'default', + + fields: { + name: { + name: 'name', + label: 'Opportunity Name', + type: 'text', + required: true + }, + + account: { + name: 'account', + label: 'Account', + type: 'lookup', + reference: 'account', + required: true + }, + + stage: { + name: 'stage', + label: 'Stage', + type: 'select', + required: true, + defaultValue: 'prospecting', + options: [ + { label: 'Prospecting', value: 'prospecting' }, + { label: 'Qualification', value: 'qualification' }, + { label: 'Proposal', value: 'proposal' }, + { label: 'Negotiation', value: 'negotiation' }, + { label: 'Closed Won', value: 'closed_won' }, + { label: 'Closed Lost', value: 'closed_lost' } + ] + }, + + amount: { + name: 'amount', + label: 'Amount', + type: 'decimal', + required: true + }, + + probability: { + name: 'probability', + label: 'Probability (%)', + type: 'number', + defaultValue: 50 + }, + + expected_close_date: { + name: 'expected_close_date', + label: 'Expected Close Date', + type: 'date', + required: true + }, + + actual_close_date: { + name: 'actual_close_date', + label: 'Actual Close Date', + type: 'date' + }, + + lead_source: { + name: 'lead_source', + label: 'Lead Source', + type: 'select', + options: [ + { label: 'Web', value: 'web' }, + { label: 'Referral', value: 'referral' }, + { label: 'Cold Call', value: 'cold_call' }, + { label: 'Partner', value: 'partner' }, + { label: 'Event', value: 'event' } + ] + }, + + owner: { + name: 'owner', + label: 'Owner', + type: 'lookup', + reference: 'user' + }, + + description: { + name: 'description', + label: 'Description', + type: 'textarea' + }, + + next_step: { + name: 'next_step', + label: 'Next Step', + type: 'text' + } + }, + + enable: { + apiEnabled: true, + trackHistory: true, + searchable: true + } +} as unknown as Data.ServiceObject; + +export default opportunityObject; diff --git a/packages/examples/src/data/order.object.ts b/packages/examples/src/data/order.object.ts new file mode 100644 index 0000000..755e426 --- /dev/null +++ b/packages/examples/src/data/order.object.ts @@ -0,0 +1,107 @@ +import type { Data } from '@objectstack/spec'; + +/** + * Order Object + * E-commerce order management + */ +export const orderObject = { + name: 'order', + label: 'Order', + pluralLabel: 'Orders', + description: 'Customer order management', + active: true, + isSystem: false, + abstract: false, + datasource: 'default', + + fields: { + order_number: { + name: 'order_number', + label: 'Order Number', + type: 'text', + required: true, + unique: true + }, + + customer_name: { + name: 'customer_name', + label: 'Customer Name', + type: 'text', + required: true + }, + + customer_email: { + name: 'customer_email', + label: 'Customer Email', + type: 'email', + required: true + }, + + status: { + name: 'status', + label: 'Status', + type: 'select', + required: true, + defaultValue: 'pending', + options: [ + { label: 'Pending', value: 'pending' }, + { label: 'Processing', value: 'processing' }, + { label: 'Shipped', value: 'shipped' }, + { label: 'Delivered', value: 'delivered' }, + { label: 'Cancelled', value: 'cancelled' } + ] + }, + + total_amount: { + name: 'total_amount', + label: 'Total Amount', + type: 'decimal', + required: true + }, + + shipping_address: { + name: 'shipping_address', + label: 'Shipping Address', + type: 'textarea' + }, + + order_date: { + name: 'order_date', + label: 'Order Date', + type: 'datetime', + required: true + }, + + shipped_date: { + name: 'shipped_date', + label: 'Shipped Date', + type: 'datetime' + }, + + payment_method: { + name: 'payment_method', + label: 'Payment Method', + type: 'select', + options: [ + { label: 'Credit Card', value: 'credit_card' }, + { label: 'PayPal', value: 'paypal' }, + { label: 'Bank Transfer', value: 'bank_transfer' }, + { label: 'Cash on Delivery', value: 'cod' } + ] + }, + + notes: { + name: 'notes', + label: 'Notes', + type: 'textarea' + } + }, + + enable: { + apiEnabled: true, + trackHistory: true, + searchable: true + } +} as unknown as Data.ServiceObject; + +export default orderObject; diff --git a/packages/examples/src/data/product.object.ts b/packages/examples/src/data/product.object.ts new file mode 100644 index 0000000..ea3b1b8 --- /dev/null +++ b/packages/examples/src/data/product.object.ts @@ -0,0 +1,93 @@ +import type { Data } from '@objectstack/spec'; + +/** + * Product Object + * E-commerce product catalog management + */ +export const productObject = { + name: 'product', + label: 'Product', + pluralLabel: 'Products', + description: 'E-commerce product catalog', + active: true, + isSystem: false, + abstract: false, + datasource: 'default', + + fields: { + name: { + name: 'name', + label: 'Product Name', + type: 'text', + required: true + }, + + sku: { + name: 'sku', + label: 'SKU', + type: 'text', + required: true, + unique: true + }, + + description: { + name: 'description', + label: 'Description', + type: 'textarea' + }, + + price: { + name: 'price', + label: 'Price', + type: 'decimal', + required: true + }, + + category: { + name: 'category', + label: 'Category', + type: 'select', + options: [ + { label: 'Electronics', value: 'electronics' }, + { label: 'Clothing', value: 'clothing' }, + { label: 'Books', value: 'books' }, + { label: 'Home & Garden', value: 'home_garden' }, + { label: 'Sports', value: 'sports' } + ] + }, + + stock_quantity: { + name: 'stock_quantity', + label: 'Stock Quantity', + type: 'number', + defaultValue: 0 + }, + + image_url: { + name: 'image_url', + label: 'Image URL', + type: 'url' + }, + + is_active: { + name: 'is_active', + label: 'Active', + type: 'boolean', + defaultValue: true + }, + + tags: { + name: 'tags', + label: 'Tags', + type: 'text' + } + }, + + enable: { + apiEnabled: true, + trackHistory: true, + searchable: true + } +} as unknown as Data.ServiceObject; + +export default productObject; diff --git a/packages/examples/src/ecommerce-example.ts b/packages/examples/src/ecommerce-example.ts new file mode 100644 index 0000000..cff327f --- /dev/null +++ b/packages/examples/src/ecommerce-example.ts @@ -0,0 +1,78 @@ +/** + * E-commerce Example + * Demonstrates e-commerce objects (Product, Order) + */ + +import { productObject } from './data/product.object.js'; +import { orderObject } from './data/order.object.js'; +import { productListView, orderListView } from './ui/ecommerce.view.js'; + +console.log('===================================='); +console.log('E-commerce Example'); +console.log('====================================\n'); + +// Example 1: Product Object +console.log('šŸ›ļø Product Object:'); +console.log(` Name: ${productObject.name}`); +console.log(` Label: ${productObject.label}`); +console.log(` Description: ${productObject.description}`); +console.log(` Fields: ${Object.keys(productObject.fields).join(', ')}`); +console.log(` API Enabled: ${productObject.enable?.apiEnabled}\n`); + +// Example 2: Product Categories +console.log('šŸ“¦ Product Categories:'); +const categoryField = productObject.fields.category; +if (categoryField.type === 'select' && categoryField.options) { + categoryField.options.forEach(option => { + console.log(` - ${option.label} (${option.value})`); + }); +} +console.log(); + +// Example 3: Order Object +console.log('šŸ“‹ Order Object:'); +console.log(` Name: ${orderObject.name}`); +console.log(` Label: ${orderObject.label}`); +console.log(` Description: ${orderObject.description}`); +console.log(` Fields: ${Object.keys(orderObject.fields).join(', ')}\n`); + +// Example 4: Order Status Flow +console.log('šŸ”„ Order Status Flow:'); +const statusField = orderObject.fields.status; +if (statusField.type === 'select' && statusField.options) { + statusField.options.forEach(option => { + console.log(` ${option.value === 'pending' ? 'āž”ļø' : ' '} ${option.label}`); + }); +} +console.log(); + +// Example 5: Payment Methods +console.log('šŸ’³ Payment Methods:'); +const paymentField = orderObject.fields.payment_method; +if (paymentField.type === 'select' && paymentField.options) { + paymentField.options.forEach(option => { + console.log(` - ${option.label}`); + }); +} +console.log(); + +// Example 6: Product List View +console.log('šŸŽØ Product List View:'); +console.log(` Name: ${productListView.name}`); +console.log(` Type: ${productListView.type}`); +if (productListView.columns && typeof productListView.columns[0] === 'object') { + console.log(` Columns: ${productListView.columns.map(c => typeof c === 'object' ? c.field : c).join(', ')}`); +} +console.log(); + +// Example 7: Order List View +console.log('šŸŽØ Order List View:'); +console.log(` Name: ${orderListView.name}`); +console.log(` Type: ${orderListView.type}`); +if (orderListView.columns && typeof orderListView.columns[0] === 'object') { + console.log(` Columns: ${orderListView.columns.map(c => typeof c === 'object' ? c.field : c).join(', ')}`); +} +console.log(); + +console.log('āœ… E-commerce example completed successfully!'); +console.log('\nšŸ’” Use Case: Build an online store with product catalog and order management'); diff --git a/packages/examples/src/index.ts b/packages/examples/src/index.ts new file mode 100644 index 0000000..e255ac5 --- /dev/null +++ b/packages/examples/src/index.ts @@ -0,0 +1,33 @@ +/** + * ObjectStack Examples Package + * + * This package contains example applications demonstrating + * different use cases for ObjectStack: + * - E-commerce (Product, Order) + * - Blog (Post, Author) + * - CRM (Account, Opportunity) + */ + +// Export E-commerce objects +export { productObject } from './data/product.object.js'; +export { orderObject } from './data/order.object.js'; + +// Export Blog objects +export { blogPostObject } from './data/blog-post.object.js'; +export { authorObject } from './data/author.object.js'; + +// Export CRM objects +export { accountObject } from './data/account.object.js'; +export { opportunityObject } from './data/opportunity.object.js'; + +// Export E-commerce views +export { productListView, orderListView } from './ui/ecommerce.view.js'; + +// Export Blog views +export { blogPostListView, authorListView } from './ui/blog.view.js'; + +// Export CRM views +export { accountListView, opportunityListView, opportunityKanbanView } from './ui/crm.view.js'; + +// Re-export types from @objectstack/spec for convenience +export type { Data, UI, System, AI, API } from '@objectstack/spec'; diff --git a/packages/examples/src/ui/blog.view.ts b/packages/examples/src/ui/blog.view.ts new file mode 100644 index 0000000..3486008 --- /dev/null +++ b/packages/examples/src/ui/blog.view.ts @@ -0,0 +1,45 @@ +import type { UI } from '@objectstack/spec'; + +/** + * Blog Post List View + * Grid view for managing blog posts + */ +export const blogPostListView: UI.ListView = { + name: 'blog_post_list', + label: 'Blog Posts', + type: 'grid', + data: { + provider: 'object', + object: 'blog_post' + }, + columns: [ + { field: 'title', width: 300 }, + { field: 'author', width: 150 }, + { field: 'status', width: 120 }, + { field: 'published_date', width: 150 }, + { field: 'view_count', width: 100 } + ] +}; + +/** + * Author List View + * Grid view for managing authors + */ +export const authorListView: UI.ListView = { + name: 'author_list', + label: 'Authors', + type: 'grid', + data: { + provider: 'object', + object: 'author' + }, + columns: [ + { field: 'name', width: 200 }, + { field: 'email', width: 200 }, + { field: 'website', width: 200 }, + { field: 'is_active', width: 80 }, + { field: 'joined_date', width: 120 } + ] +}; + +export default { blogPostListView, authorListView }; diff --git a/packages/examples/src/ui/crm.view.ts b/packages/examples/src/ui/crm.view.ts new file mode 100644 index 0000000..5ec06f1 --- /dev/null +++ b/packages/examples/src/ui/crm.view.ts @@ -0,0 +1,67 @@ +import type { UI } from '@objectstack/spec'; + +/** + * Account List View + * Grid view for managing accounts + */ +export const accountListView: UI.ListView = { + name: 'account_list', + label: 'Accounts', + type: 'grid', + data: { + provider: 'object', + object: 'account' + }, + columns: [ + { field: 'name', width: 250 }, + { field: 'industry', width: 150 }, + { field: 'type', width: 120 }, + { field: 'annual_revenue', width: 150 }, + { field: 'employee_count', width: 120 }, + { field: 'phone', width: 150 } + ] +}; + +/** + * Opportunity List View + * Grid view for managing opportunities + */ +export const opportunityListView: UI.ListView = { + name: 'opportunity_list', + label: 'Opportunities', + type: 'grid', + data: { + provider: 'object', + object: 'opportunity' + }, + columns: [ + { field: 'name', width: 250 }, + { field: 'account', width: 200 }, + { field: 'stage', width: 150 }, + { field: 'amount', width: 120 }, + { field: 'probability', width: 100 }, + { field: 'expected_close_date', width: 150 } + ] +}; + +/** + * Opportunity Kanban View + * Kanban board for visual opportunity pipeline management + */ +export const opportunityKanbanView: UI.ListView = { + name: 'opportunity_kanban', + label: 'Sales Pipeline', + type: 'kanban', + data: { + provider: 'object', + object: 'opportunity' + }, + columns: [ + 'name', + 'amount', + 'probability', + 'expected_close_date' + ] +}; + +export default { accountListView, opportunityListView, opportunityKanbanView }; diff --git a/packages/examples/src/ui/ecommerce.view.ts b/packages/examples/src/ui/ecommerce.view.ts new file mode 100644 index 0000000..6b022b7 --- /dev/null +++ b/packages/examples/src/ui/ecommerce.view.ts @@ -0,0 +1,47 @@ +import type { UI } from '@objectstack/spec'; + +/** + * Product List View + * Grid view for managing products + */ +export const productListView: UI.ListView = { + name: 'product_list', + label: 'Products', + type: 'grid', + data: { + provider: 'object', + object: 'product' + }, + columns: [ + { field: 'name', width: 200 }, + { field: 'sku', width: 120 }, + { field: 'price', width: 100 }, + { field: 'category', width: 150 }, + { field: 'stock_quantity', width: 120 }, + { field: 'is_active', width: 80 } + ] +}; + +/** + * Order List View + * Grid view for managing orders + */ +export const orderListView: UI.ListView = { + name: 'order_list', + label: 'Orders', + type: 'grid', + data: { + provider: 'object', + object: 'order' + }, + columns: [ + { field: 'order_number', width: 150 }, + { field: 'customer_name', width: 200 }, + { field: 'status', width: 120 }, + { field: 'total_amount', width: 120 }, + { field: 'order_date', width: 150 }, + { field: 'payment_method', width: 150 } + ] +}; + +export default { productListView, orderListView }; diff --git a/packages/examples/tsconfig.json b/packages/examples/tsconfig.json new file mode 100644 index 0000000..0af1795 --- /dev/null +++ b/packages/examples/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "lib": ["ES2022"], + "moduleResolution": "bundler", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./dist", + "rootDir": "./src", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +}