@plures/praxis 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FRAMEWORK.md +420 -0
- package/LICENSE +21 -0
- package/README.md +1310 -0
- package/dist/adapters/cli.d.ts +43 -0
- package/dist/adapters/cli.d.ts.map +1 -0
- package/dist/adapters/cli.js +126 -0
- package/dist/adapters/cli.js.map +1 -0
- package/dist/cli/commands/auth.d.ts +26 -0
- package/dist/cli/commands/auth.d.ts.map +1 -0
- package/dist/cli/commands/auth.js +233 -0
- package/dist/cli/commands/auth.js.map +1 -0
- package/dist/cli/commands/cloud.d.ts +27 -0
- package/dist/cli/commands/cloud.d.ts.map +1 -0
- package/dist/cli/commands/cloud.js +232 -0
- package/dist/cli/commands/cloud.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +25 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +168 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +179 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cloud/auth.d.ts +51 -0
- package/dist/cloud/auth.d.ts.map +1 -0
- package/dist/cloud/auth.js +194 -0
- package/dist/cloud/auth.js.map +1 -0
- package/dist/cloud/billing.d.ts +184 -0
- package/dist/cloud/billing.d.ts.map +1 -0
- package/dist/cloud/billing.js +179 -0
- package/dist/cloud/billing.js.map +1 -0
- package/dist/cloud/client.d.ts +39 -0
- package/dist/cloud/client.d.ts.map +1 -0
- package/dist/cloud/client.js +176 -0
- package/dist/cloud/client.js.map +1 -0
- package/dist/cloud/index.d.ts +44 -0
- package/dist/cloud/index.d.ts.map +1 -0
- package/dist/cloud/index.js +44 -0
- package/dist/cloud/index.js.map +1 -0
- package/dist/cloud/marketplace.d.ts +166 -0
- package/dist/cloud/marketplace.d.ts.map +1 -0
- package/dist/cloud/marketplace.js +159 -0
- package/dist/cloud/marketplace.js.map +1 -0
- package/dist/cloud/provisioning.d.ts +110 -0
- package/dist/cloud/provisioning.d.ts.map +1 -0
- package/dist/cloud/provisioning.js +148 -0
- package/dist/cloud/provisioning.js.map +1 -0
- package/dist/cloud/relay/endpoints.d.ts +62 -0
- package/dist/cloud/relay/endpoints.d.ts.map +1 -0
- package/dist/cloud/relay/endpoints.js +217 -0
- package/dist/cloud/relay/endpoints.js.map +1 -0
- package/dist/cloud/relay/health/index.d.ts +5 -0
- package/dist/cloud/relay/health/index.d.ts.map +1 -0
- package/dist/cloud/relay/health/index.js +9 -0
- package/dist/cloud/relay/health/index.js.map +1 -0
- package/dist/cloud/relay/stats/index.d.ts +5 -0
- package/dist/cloud/relay/stats/index.d.ts.map +1 -0
- package/dist/cloud/relay/stats/index.js +9 -0
- package/dist/cloud/relay/stats/index.js.map +1 -0
- package/dist/cloud/relay/sync/index.d.ts +5 -0
- package/dist/cloud/relay/sync/index.d.ts.map +1 -0
- package/dist/cloud/relay/sync/index.js +9 -0
- package/dist/cloud/relay/sync/index.js.map +1 -0
- package/dist/cloud/relay/usage/index.d.ts +5 -0
- package/dist/cloud/relay/usage/index.d.ts.map +1 -0
- package/dist/cloud/relay/usage/index.js +9 -0
- package/dist/cloud/relay/usage/index.js.map +1 -0
- package/dist/cloud/sponsors.d.ts +81 -0
- package/dist/cloud/sponsors.d.ts.map +1 -0
- package/dist/cloud/sponsors.js +130 -0
- package/dist/cloud/sponsors.js.map +1 -0
- package/dist/cloud/types.d.ts +169 -0
- package/dist/cloud/types.d.ts.map +1 -0
- package/dist/cloud/types.js +7 -0
- package/dist/cloud/types.js.map +1 -0
- package/dist/components/index.d.ts +43 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +17 -0
- package/dist/components/index.js.map +1 -0
- package/dist/core/actors.d.ts +95 -0
- package/dist/core/actors.d.ts.map +1 -0
- package/dist/core/actors.js +158 -0
- package/dist/core/actors.js.map +1 -0
- package/dist/core/component/generator.d.ts +122 -0
- package/dist/core/component/generator.d.ts.map +1 -0
- package/dist/core/component/generator.js +307 -0
- package/dist/core/component/generator.js.map +1 -0
- package/dist/core/engine.d.ts +92 -0
- package/dist/core/engine.d.ts.map +1 -0
- package/dist/core/engine.js +199 -0
- package/dist/core/engine.js.map +1 -0
- package/dist/core/introspection.d.ts +141 -0
- package/dist/core/introspection.d.ts.map +1 -0
- package/dist/core/introspection.js +208 -0
- package/dist/core/introspection.js.map +1 -0
- package/dist/core/logic/generator.d.ts +76 -0
- package/dist/core/logic/generator.d.ts.map +1 -0
- package/dist/core/logic/generator.js +339 -0
- package/dist/core/logic/generator.js.map +1 -0
- package/dist/core/pluresdb/generator.d.ts +58 -0
- package/dist/core/pluresdb/generator.d.ts.map +1 -0
- package/dist/core/pluresdb/generator.js +162 -0
- package/dist/core/pluresdb/generator.js.map +1 -0
- package/dist/core/protocol.d.ts +121 -0
- package/dist/core/protocol.d.ts.map +1 -0
- package/dist/core/protocol.js +46 -0
- package/dist/core/protocol.js.map +1 -0
- package/dist/core/rules.d.ts +120 -0
- package/dist/core/rules.d.ts.map +1 -0
- package/dist/core/rules.js +81 -0
- package/dist/core/rules.js.map +1 -0
- package/dist/core/schema/loader.d.ts +47 -0
- package/dist/core/schema/loader.d.ts.map +1 -0
- package/dist/core/schema/loader.js +189 -0
- package/dist/core/schema/loader.js.map +1 -0
- package/dist/core/schema/normalize.d.ts +72 -0
- package/dist/core/schema/normalize.d.ts.map +1 -0
- package/dist/core/schema/normalize.js +190 -0
- package/dist/core/schema/normalize.js.map +1 -0
- package/dist/core/schema/types.d.ts +370 -0
- package/dist/core/schema/types.d.ts.map +1 -0
- package/dist/core/schema/types.js +161 -0
- package/dist/core/schema/types.js.map +1 -0
- package/dist/dsl/index.d.ts +152 -0
- package/dist/dsl/index.d.ts.map +1 -0
- package/dist/dsl/index.js +132 -0
- package/dist/dsl/index.js.map +1 -0
- package/dist/dsl.d.ts +124 -0
- package/dist/dsl.d.ts.map +1 -0
- package/dist/dsl.js +130 -0
- package/dist/dsl.js.map +1 -0
- package/dist/examples/advanced-todo/index.d.ts +55 -0
- package/dist/examples/advanced-todo/index.d.ts.map +1 -0
- package/dist/examples/advanced-todo/index.js +222 -0
- package/dist/examples/advanced-todo/index.js.map +1 -0
- package/dist/examples/auth-basic/index.d.ts +17 -0
- package/dist/examples/auth-basic/index.d.ts.map +1 -0
- package/dist/examples/auth-basic/index.js +122 -0
- package/dist/examples/auth-basic/index.js.map +1 -0
- package/dist/examples/cart/index.d.ts +19 -0
- package/dist/examples/cart/index.d.ts.map +1 -0
- package/dist/examples/cart/index.js +202 -0
- package/dist/examples/cart/index.js.map +1 -0
- package/dist/examples/hero-ecommerce/index.d.ts +39 -0
- package/dist/examples/hero-ecommerce/index.d.ts.map +1 -0
- package/dist/examples/hero-ecommerce/index.js +506 -0
- package/dist/examples/hero-ecommerce/index.js.map +1 -0
- package/dist/examples/svelte-counter/index.d.ts +31 -0
- package/dist/examples/svelte-counter/index.d.ts.map +1 -0
- package/dist/examples/svelte-counter/index.js +123 -0
- package/dist/examples/svelte-counter/index.js.map +1 -0
- package/dist/flows.d.ts +125 -0
- package/dist/flows.d.ts.map +1 -0
- package/dist/flows.js +160 -0
- package/dist/flows.js.map +1 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/pluresdb.d.ts +56 -0
- package/dist/integrations/pluresdb.d.ts.map +1 -0
- package/dist/integrations/pluresdb.js +46 -0
- package/dist/integrations/pluresdb.js.map +1 -0
- package/dist/integrations/svelte.d.ts +306 -0
- package/dist/integrations/svelte.d.ts.map +1 -0
- package/dist/integrations/svelte.js +447 -0
- package/dist/integrations/svelte.js.map +1 -0
- package/dist/registry.d.ts +94 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +181 -0
- package/dist/registry.js.map +1 -0
- package/dist/runtime/terminal-adapter.d.ts +105 -0
- package/dist/runtime/terminal-adapter.d.ts.map +1 -0
- package/dist/runtime/terminal-adapter.js +113 -0
- package/dist/runtime/terminal-adapter.js.map +1 -0
- package/dist/step.d.ts +34 -0
- package/dist/step.d.ts.map +1 -0
- package/dist/step.js +111 -0
- package/dist/step.js.map +1 -0
- package/dist/types.d.ts +63 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/docs/MONETIZATION.md +394 -0
- package/docs/TERMINAL_NODE.md +588 -0
- package/docs/guides/canvas.md +389 -0
- package/docs/guides/getting-started.md +347 -0
- package/docs/guides/history-state-pattern.md +618 -0
- package/docs/guides/orchestration.md +617 -0
- package/docs/guides/parallel-state-pattern.md +767 -0
- package/docs/guides/svelte-integration.md +691 -0
- package/package.json +96 -0
- package/src/__tests__/actors.test.ts +270 -0
- package/src/__tests__/billing.test.ts +175 -0
- package/src/__tests__/cloud.test.ts +247 -0
- package/src/__tests__/dsl.test.ts +154 -0
- package/src/__tests__/edge-cases.test.ts +475 -0
- package/src/__tests__/engine.test.ts +137 -0
- package/src/__tests__/generators.test.ts +270 -0
- package/src/__tests__/introspection.test.ts +321 -0
- package/src/__tests__/protocol.test.ts +40 -0
- package/src/__tests__/provisioning.test.ts +162 -0
- package/src/__tests__/schema.test.ts +241 -0
- package/src/__tests__/svelte-integration.test.ts +431 -0
- package/src/__tests__/terminal-node.test.ts +352 -0
- package/src/adapters/cli.ts +175 -0
- package/src/cli/commands/auth.ts +271 -0
- package/src/cli/commands/cloud.ts +281 -0
- package/src/cli/commands/generate.ts +225 -0
- package/src/cli/index.ts +190 -0
- package/src/cloud/README.md +383 -0
- package/src/cloud/auth.ts +245 -0
- package/src/cloud/billing.ts +336 -0
- package/src/cloud/client.ts +221 -0
- package/src/cloud/index.ts +121 -0
- package/src/cloud/marketplace.ts +303 -0
- package/src/cloud/provisioning.ts +254 -0
- package/src/cloud/relay/endpoints.ts +307 -0
- package/src/cloud/relay/health/function.json +17 -0
- package/src/cloud/relay/health/index.ts +10 -0
- package/src/cloud/relay/host.json +15 -0
- package/src/cloud/relay/local.settings.json +8 -0
- package/src/cloud/relay/stats/function.json +17 -0
- package/src/cloud/relay/stats/index.ts +10 -0
- package/src/cloud/relay/sync/function.json +17 -0
- package/src/cloud/relay/sync/index.ts +10 -0
- package/src/cloud/relay/usage/function.json +17 -0
- package/src/cloud/relay/usage/index.ts +10 -0
- package/src/cloud/sponsors.ts +213 -0
- package/src/cloud/types.ts +198 -0
- package/src/components/README.md +125 -0
- package/src/components/TerminalNode.svelte +457 -0
- package/src/components/index.ts +46 -0
- package/src/core/actors.ts +205 -0
- package/src/core/component/generator.ts +432 -0
- package/src/core/engine.ts +243 -0
- package/src/core/introspection.ts +329 -0
- package/src/core/logic/generator.ts +420 -0
- package/src/core/pluresdb/generator.ts +229 -0
- package/src/core/protocol.ts +132 -0
- package/src/core/rules.ts +167 -0
- package/src/core/schema/loader.ts +247 -0
- package/src/core/schema/normalize.ts +322 -0
- package/src/core/schema/types.ts +557 -0
- package/src/dsl/index.ts +218 -0
- package/src/dsl.ts +214 -0
- package/src/examples/advanced-todo/App.svelte +506 -0
- package/src/examples/advanced-todo/README.md +371 -0
- package/src/examples/advanced-todo/index.ts +309 -0
- package/src/examples/auth-basic/index.ts +163 -0
- package/src/examples/cart/index.ts +259 -0
- package/src/examples/hero-ecommerce/index.ts +657 -0
- package/src/examples/svelte-counter/index.ts +168 -0
- package/src/flows.ts +268 -0
- package/src/index.ts +154 -0
- package/src/integrations/pluresdb.ts +93 -0
- package/src/integrations/svelte.ts +617 -0
- package/src/registry.ts +223 -0
- package/src/runtime/terminal-adapter.ts +175 -0
- package/src/step.ts +151 -0
- package/src/types.ts +70 -0
- package/templates/basic-app/README.md +147 -0
- package/templates/fullstack-app/README.md +279 -0
package/FRAMEWORK.md
ADDED
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
# Praxis Framework Architecture
|
|
2
|
+
|
|
3
|
+
Praxis is the full-stack application framework for the Plures ecosystem. This document describes the framework architecture, components, and how they integrate.
|
|
4
|
+
|
|
5
|
+
## Framework Mission
|
|
6
|
+
|
|
7
|
+
Praxis unifies the Plures ecosystem into a cohesive development platform that enables:
|
|
8
|
+
|
|
9
|
+
1. **Declarative Development**: Define schemas once, generate everything
|
|
10
|
+
2. **Local-First Applications**: Offline-capable by default with PluresDB
|
|
11
|
+
3. **Visual and Code Workflows**: Seamless transitions between Canvas and code
|
|
12
|
+
4. **Cross-Platform Delivery**: Web, desktop, and mobile from a single codebase
|
|
13
|
+
5. **Distributed Coordination**: Built-in orchestration with DSC/MCP
|
|
14
|
+
|
|
15
|
+
## Framework Structure
|
|
16
|
+
|
|
17
|
+
The Praxis framework is organized into these core areas:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/praxis
|
|
21
|
+
/core # Core framework functionality
|
|
22
|
+
/schema # Schema definition and validation
|
|
23
|
+
/logic # Logic engine (facts, events, rules, constraints)
|
|
24
|
+
/component # Component generation and templates
|
|
25
|
+
/generator # Code generation utilities
|
|
26
|
+
/runtime # Runtime environment abstractions
|
|
27
|
+
/integrations # External system integrations
|
|
28
|
+
/pluresdb # PluresDB reactive datastore
|
|
29
|
+
/unum # Unum identity and channels
|
|
30
|
+
/adp # Architectural Decision Protocol
|
|
31
|
+
/state-docs # State-Docs documentation generation
|
|
32
|
+
/canvas # CodeCanvas visual editor
|
|
33
|
+
/cli # Command-line interface
|
|
34
|
+
/commands # CLI command implementations
|
|
35
|
+
/scaffolding # Project scaffolding utilities
|
|
36
|
+
/templates # Project templates
|
|
37
|
+
/basic-app # Basic Praxis application
|
|
38
|
+
/fullstack-app # Full-stack with all integrations
|
|
39
|
+
/component # Reusable component template
|
|
40
|
+
/orchestrator # Distributed orchestration template
|
|
41
|
+
/examples # Example applications
|
|
42
|
+
/offline-chat # Offline-first chat application
|
|
43
|
+
/knowledge-canvas # Knowledge management with Canvas
|
|
44
|
+
/distributed-node # Self-orchestrating node example
|
|
45
|
+
/docs # Framework documentation
|
|
46
|
+
/guides # User guides
|
|
47
|
+
/api # API reference
|
|
48
|
+
/architecture # Architecture documentation
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Core Components
|
|
52
|
+
|
|
53
|
+
### 1. Schema System
|
|
54
|
+
|
|
55
|
+
The Praxis schema system provides a declarative way to define your application structure.
|
|
56
|
+
|
|
57
|
+
**Key Features:**
|
|
58
|
+
- Type-safe schema definitions
|
|
59
|
+
- Validation and constraints
|
|
60
|
+
- Multi-target generation (models, components, docs, orchestration)
|
|
61
|
+
- Schema composition and inheritance
|
|
62
|
+
- Version management
|
|
63
|
+
|
|
64
|
+
**Schema Format:**
|
|
65
|
+
```typescript
|
|
66
|
+
interface PraxisSchema {
|
|
67
|
+
version: string;
|
|
68
|
+
name: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
models: ModelDefinition[];
|
|
71
|
+
components: ComponentDefinition[];
|
|
72
|
+
logic: LogicDefinition[];
|
|
73
|
+
orchestration?: OrchestrationDefinition;
|
|
74
|
+
metadata?: Record<string, unknown>;
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Outputs:**
|
|
79
|
+
- PluresDB models for data storage
|
|
80
|
+
- Svelte components for UI
|
|
81
|
+
- State-Docs documentation
|
|
82
|
+
- Logic machines (facts, events, rules)
|
|
83
|
+
- Canvas metadata for visual editing
|
|
84
|
+
- DSC definitions for orchestration
|
|
85
|
+
|
|
86
|
+
### 2. Logic Engine
|
|
87
|
+
|
|
88
|
+
The logic engine provides the computational core of Praxis applications.
|
|
89
|
+
|
|
90
|
+
**Components:**
|
|
91
|
+
- **Facts**: Typed propositions about the domain
|
|
92
|
+
- **Events**: Temporally ordered facts that drive change
|
|
93
|
+
- **Rules**: Pure functions that derive new facts
|
|
94
|
+
- **Constraints**: Invariants that must always hold
|
|
95
|
+
- **Flows**: Orchestrated sequences of state transitions
|
|
96
|
+
- **Actors**: Effectful units for side effects
|
|
97
|
+
|
|
98
|
+
**Architecture:**
|
|
99
|
+
- Pure, functional core with immutable state
|
|
100
|
+
- JSON-friendly protocol for cross-language use
|
|
101
|
+
- Type-safe TypeScript implementation
|
|
102
|
+
- Introspection and visualization support
|
|
103
|
+
|
|
104
|
+
### 3. Component Factory
|
|
105
|
+
|
|
106
|
+
The component factory generates Svelte components from schemas.
|
|
107
|
+
|
|
108
|
+
**Features:**
|
|
109
|
+
- Schema-to-component transformation
|
|
110
|
+
- Data binding generation
|
|
111
|
+
- Event handler generation
|
|
112
|
+
- Styling and layout from schema
|
|
113
|
+
- Canvas-compatible output
|
|
114
|
+
|
|
115
|
+
**Generated Components Include:**
|
|
116
|
+
- Form components with validation
|
|
117
|
+
- Data display components
|
|
118
|
+
- Navigation components
|
|
119
|
+
- State visualization components
|
|
120
|
+
|
|
121
|
+
### 4. Data Layer (PluresDB Integration)
|
|
122
|
+
|
|
123
|
+
PluresDB provides the data storage and synchronization layer.
|
|
124
|
+
|
|
125
|
+
**Capabilities:**
|
|
126
|
+
- Local-first reactive datastore
|
|
127
|
+
- Automatic sync when connected
|
|
128
|
+
- Query and subscription APIs
|
|
129
|
+
- Event sourcing support
|
|
130
|
+
- Conflict resolution
|
|
131
|
+
|
|
132
|
+
**Integration Points:**
|
|
133
|
+
- Schema-driven model generation
|
|
134
|
+
- Logic engine fact/event storage
|
|
135
|
+
- Component data binding
|
|
136
|
+
- Distributed state management
|
|
137
|
+
|
|
138
|
+
### 5. Visual IDE (CodeCanvas Integration)
|
|
139
|
+
|
|
140
|
+
CodeCanvas provides visual development capabilities.
|
|
141
|
+
|
|
142
|
+
**Features:**
|
|
143
|
+
- Visual schema editor
|
|
144
|
+
- Logic flow designer
|
|
145
|
+
- Component preview
|
|
146
|
+
- Orchestrator visualization
|
|
147
|
+
- Documentation navigation
|
|
148
|
+
|
|
149
|
+
**Use Cases:**
|
|
150
|
+
- Design schemas visually
|
|
151
|
+
- Build logic flows with drag-and-drop
|
|
152
|
+
- Preview generated components
|
|
153
|
+
- Visualize distributed orchestration
|
|
154
|
+
- Navigate living documentation
|
|
155
|
+
|
|
156
|
+
### 6. Orchestration (DSC/MCP Support)
|
|
157
|
+
|
|
158
|
+
Support for distributed system coordination.
|
|
159
|
+
|
|
160
|
+
**Capabilities:**
|
|
161
|
+
- Desired State Configuration (DSC)
|
|
162
|
+
- Model Context Protocol (MCP) integration
|
|
163
|
+
- Multi-node coordination
|
|
164
|
+
- State synchronization
|
|
165
|
+
- Health monitoring
|
|
166
|
+
|
|
167
|
+
**Use Cases:**
|
|
168
|
+
- Self-healing distributed systems
|
|
169
|
+
- Automatic node onboarding
|
|
170
|
+
- Configuration management
|
|
171
|
+
- Service orchestration
|
|
172
|
+
|
|
173
|
+
## Framework CLI
|
|
174
|
+
|
|
175
|
+
The Praxis CLI provides commands for creating and managing applications.
|
|
176
|
+
|
|
177
|
+
### Commands
|
|
178
|
+
|
|
179
|
+
#### `praxis create app [name]`
|
|
180
|
+
Create a new Praxis application from a template.
|
|
181
|
+
|
|
182
|
+
Options:
|
|
183
|
+
- `--template`: Template to use (basic, fullstack, distributed)
|
|
184
|
+
- `--features`: Features to include (auth, canvas, orchestration)
|
|
185
|
+
|
|
186
|
+
#### `praxis create component [name]`
|
|
187
|
+
Create a new component from a schema.
|
|
188
|
+
|
|
189
|
+
Options:
|
|
190
|
+
- `--schema`: Path to schema file
|
|
191
|
+
- `--output`: Output directory
|
|
192
|
+
|
|
193
|
+
#### `praxis generate`
|
|
194
|
+
Generate code from schemas.
|
|
195
|
+
|
|
196
|
+
Options:
|
|
197
|
+
- `--target`: Generation target (components, models, docs, all)
|
|
198
|
+
- `--watch`: Watch for schema changes
|
|
199
|
+
|
|
200
|
+
#### `praxis canvas [schema]`
|
|
201
|
+
Open CodeCanvas for visual editing.
|
|
202
|
+
|
|
203
|
+
Options:
|
|
204
|
+
- `--port`: Port for Canvas server
|
|
205
|
+
- `--mode`: Mode (edit, view, present)
|
|
206
|
+
|
|
207
|
+
#### `praxis orchestrate`
|
|
208
|
+
Manage orchestration and distributed coordination.
|
|
209
|
+
|
|
210
|
+
Options:
|
|
211
|
+
- `--config`: Orchestration configuration file
|
|
212
|
+
- `--nodes`: Number of nodes to coordinate
|
|
213
|
+
|
|
214
|
+
## Application Templates
|
|
215
|
+
|
|
216
|
+
### Basic App Template
|
|
217
|
+
|
|
218
|
+
A minimal Praxis application with:
|
|
219
|
+
- Schema definition
|
|
220
|
+
- Logic engine setup
|
|
221
|
+
- Basic Svelte UI
|
|
222
|
+
- PluresDB storage
|
|
223
|
+
- Development scripts
|
|
224
|
+
|
|
225
|
+
### Fullstack App Template
|
|
226
|
+
|
|
227
|
+
A complete application with:
|
|
228
|
+
- All Basic App features
|
|
229
|
+
- Authentication module
|
|
230
|
+
- Component library
|
|
231
|
+
- Canvas integration
|
|
232
|
+
- State-Docs setup
|
|
233
|
+
- Orchestration ready
|
|
234
|
+
|
|
235
|
+
### Component Template
|
|
236
|
+
|
|
237
|
+
A reusable component with:
|
|
238
|
+
- Schema definition
|
|
239
|
+
- Generated Svelte component
|
|
240
|
+
- Unit tests
|
|
241
|
+
- Documentation
|
|
242
|
+
- Canvas metadata
|
|
243
|
+
|
|
244
|
+
### Orchestrator Template
|
|
245
|
+
|
|
246
|
+
A distributed application with:
|
|
247
|
+
- DSC configuration
|
|
248
|
+
- Multi-node setup
|
|
249
|
+
- State synchronization
|
|
250
|
+
- Health monitoring
|
|
251
|
+
- Auto-scaling support
|
|
252
|
+
|
|
253
|
+
## Integration Details
|
|
254
|
+
|
|
255
|
+
### PluresDB Integration
|
|
256
|
+
|
|
257
|
+
**Current Status**: Foundation in place (`src/integrations/pluresdb.ts`)
|
|
258
|
+
|
|
259
|
+
**Planned Features**:
|
|
260
|
+
- Schema-to-model transformation
|
|
261
|
+
- Reactive queries from logic engine
|
|
262
|
+
- Event sourcing from facts/events
|
|
263
|
+
- Automatic sync configuration
|
|
264
|
+
- Conflict resolution strategies
|
|
265
|
+
|
|
266
|
+
### Unum Integration
|
|
267
|
+
|
|
268
|
+
**Current Status**: Planned
|
|
269
|
+
|
|
270
|
+
**Planned Features**:
|
|
271
|
+
- Identity management
|
|
272
|
+
- Channel-based messaging
|
|
273
|
+
- Distributed actor communication
|
|
274
|
+
- Authentication integration
|
|
275
|
+
- Authorization policies
|
|
276
|
+
|
|
277
|
+
### ADP Integration
|
|
278
|
+
|
|
279
|
+
**Current Status**: Planned
|
|
280
|
+
|
|
281
|
+
**Planned Features**:
|
|
282
|
+
- Architectural guardrails
|
|
283
|
+
- Decision tracking from schemas
|
|
284
|
+
- Static analysis of logic rules
|
|
285
|
+
- Compliance checking
|
|
286
|
+
- Architecture visualization
|
|
287
|
+
|
|
288
|
+
### State-Docs Integration
|
|
289
|
+
|
|
290
|
+
**Current Status**: Planned
|
|
291
|
+
|
|
292
|
+
**Planned Features**:
|
|
293
|
+
- Automatic documentation from schemas
|
|
294
|
+
- Logic flow documentation
|
|
295
|
+
- Component documentation
|
|
296
|
+
- API reference generation
|
|
297
|
+
- Living documentation updates
|
|
298
|
+
|
|
299
|
+
### Canvas Integration
|
|
300
|
+
|
|
301
|
+
**Current Status**: Planned
|
|
302
|
+
|
|
303
|
+
**Planned Features**:
|
|
304
|
+
- Visual schema editor
|
|
305
|
+
- Logic flow designer
|
|
306
|
+
- Component preview server
|
|
307
|
+
- Real-time collaboration
|
|
308
|
+
- Export to schema files
|
|
309
|
+
|
|
310
|
+
## Example Applications
|
|
311
|
+
|
|
312
|
+
### Offline-First Chat
|
|
313
|
+
|
|
314
|
+
Demonstrates:
|
|
315
|
+
- Local-first architecture
|
|
316
|
+
- PluresDB for message storage
|
|
317
|
+
- Real-time sync when connected
|
|
318
|
+
- Unum channels for messaging
|
|
319
|
+
- Offline message queueing
|
|
320
|
+
|
|
321
|
+
### Knowledge Canvas
|
|
322
|
+
|
|
323
|
+
Demonstrates:
|
|
324
|
+
- Canvas visual editing
|
|
325
|
+
- Knowledge graph modeling
|
|
326
|
+
- Schema-driven UI generation
|
|
327
|
+
- State-Docs documentation
|
|
328
|
+
- Search and navigation
|
|
329
|
+
|
|
330
|
+
### Self-Orchestrating Node
|
|
331
|
+
|
|
332
|
+
Demonstrates:
|
|
333
|
+
- DSC orchestration
|
|
334
|
+
- Automatic node discovery
|
|
335
|
+
- Self-healing behavior
|
|
336
|
+
- State synchronization
|
|
337
|
+
- Health monitoring
|
|
338
|
+
|
|
339
|
+
## Development Workflow
|
|
340
|
+
|
|
341
|
+
### 1. Define Schema
|
|
342
|
+
```typescript
|
|
343
|
+
// app.schema.ts
|
|
344
|
+
export const schema: PraxisSchema = {
|
|
345
|
+
version: "1.0.0",
|
|
346
|
+
name: "MyApp",
|
|
347
|
+
models: [/* ... */],
|
|
348
|
+
components: [/* ... */],
|
|
349
|
+
logic: [/* ... */]
|
|
350
|
+
};
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### 2. Generate Code
|
|
354
|
+
```bash
|
|
355
|
+
praxis generate --target all
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### 3. Customize Generated Code
|
|
359
|
+
Edit generated components and logic as needed.
|
|
360
|
+
|
|
361
|
+
### 4. Visual Editing (Optional)
|
|
362
|
+
```bash
|
|
363
|
+
praxis canvas app.schema.ts
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### 5. Run Application
|
|
367
|
+
```bash
|
|
368
|
+
npm run dev
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### 6. Deploy
|
|
372
|
+
```bash
|
|
373
|
+
npm run build
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## Future Enhancements
|
|
377
|
+
|
|
378
|
+
### Short Term
|
|
379
|
+
- Complete CLI implementation
|
|
380
|
+
- Basic templates
|
|
381
|
+
- Schema validation
|
|
382
|
+
- Component generation stubs
|
|
383
|
+
- Documentation generation
|
|
384
|
+
|
|
385
|
+
### Medium Term
|
|
386
|
+
- Full Canvas integration
|
|
387
|
+
- PluresDB complete integration
|
|
388
|
+
- Unum identity support
|
|
389
|
+
- Multi-language schemas
|
|
390
|
+
- Advanced orchestration
|
|
391
|
+
|
|
392
|
+
### Long Term
|
|
393
|
+
- C# and PowerShell framework bindings
|
|
394
|
+
- Mobile-first templates
|
|
395
|
+
- Distributed tracing
|
|
396
|
+
- Performance optimization
|
|
397
|
+
- Enterprise features
|
|
398
|
+
|
|
399
|
+
## Design Principles
|
|
400
|
+
|
|
401
|
+
1. **Schema-Driven Everything**: Schemas are the source of truth
|
|
402
|
+
2. **Progressive Enhancement**: Start simple, add complexity as needed
|
|
403
|
+
3. **Visual + Code**: Support both workflows equally
|
|
404
|
+
4. **Local-First**: Offline-capable by default
|
|
405
|
+
5. **Type-Safe**: Leverage TypeScript throughout
|
|
406
|
+
6. **Composable**: Build complex systems from simple parts
|
|
407
|
+
7. **Cross-Platform**: Write once, run everywhere
|
|
408
|
+
8. **Cross-Language**: Protocol-first design for portability
|
|
409
|
+
|
|
410
|
+
## Contributing
|
|
411
|
+
|
|
412
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on contributing to the Praxis framework.
|
|
413
|
+
|
|
414
|
+
## License
|
|
415
|
+
|
|
416
|
+
MIT - See [LICENSE](./LICENSE) for details.
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
**Praxis Framework** - Because building applications should be declarative, visual, and distributed.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 plures
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|