@tamyla/clodo-framework 2.0.0 → 2.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamyla/clodo-framework",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Reusable framework for Clodo-style software architecture on Cloudflare Workers + D1",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -56,11 +56,9 @@
56
56
  "bin/service-management",
57
57
  "bin/security",
58
58
  "docs/README.md",
59
- "docs/FRAMEWORK-ARCHITECTURE-OVERVIEW.md",
60
- "docs/INTEGRATION_GUIDE.md",
61
59
  "docs/overview.md",
62
60
  "docs/SECURITY.md",
63
- "docs/deployment/deployment-guide.md",
61
+ "docs/api-reference.md",
64
62
  "README.md",
65
63
  "CHANGELOG.md",
66
64
  "LICENSE"
@@ -1,206 +0,0 @@
1
- # CLODO Framework Architecture Overview
2
-
3
- ## Framework Philosophy
4
-
5
- The CLODO Framework implements a sophisticated **component-based architecture** where reusable "Clodo bricks" can be snapped together to build complex enterprise applications. Each component handles one concern perfectly, enabling rapid development of autonomous, domain-specific services.
6
-
7
- ## Core Architecture
8
-
9
- ### Three-Layer Design
10
-
11
- #### 🎯 **Framework Core (Published Package)**
12
- The main library that downstream applications import and use:
13
-
14
- ```javascript
15
- import {
16
- GenericDataService,
17
- SchemaManager,
18
- CrossDomainCoordinator,
19
- ConfigurationCacheManager
20
- } from '@tamyla/clodo-framework';
21
- ```
22
-
23
- **Key Components:**
24
- - **Data Management**: GenericDataService, SchemaManager, DatabaseOrchestrator
25
- - **Request Handling**: EnhancedRouter, GenericRouteHandler
26
- - **Configuration**: Domain configs, feature flags, customer management
27
- - **Orchestration**: Cross-domain coordination, deployment automation
28
- - **Security**: Configuration validation, secret management
29
-
30
- #### 🛠️ **CLI Tools (Development Interface)**
31
- Command-line tools for development, administration, and deployment:
32
-
33
- ```bash
34
- # Interactive deployment
35
- node bin/deployment/enterprise-deploy.js deploy --interactive
36
-
37
- # Database management
38
- node bin/database/enterprise-db-manager.js migrate api.example.com
39
-
40
- # Portfolio operations
41
- node bin/portfolio/portfolio-manager.js deploy
42
- ```
43
-
44
- **Available Tools:**
45
- - **Deployment CLI**: Interactive and automated deployment workflows
46
- - **Database CLI**: Migration, backup, health monitoring, optimization
47
- - **Portfolio CLI**: Multi-domain portfolio management and analytics
48
- - **Service Management**: Automated service initialization and templates
49
-
50
- #### 🔧 **Shared Utilities (Internal Implementation)**
51
- Internal utilities that power the CLI tools and framework components.
52
-
53
- ## Intelligent Execution Model
54
-
55
- ### Smart Component Resolution
56
-
57
- The framework uses **intelligent dependency resolution** to automatically:
58
- - **Discover services** through domain-based configuration
59
- - **Cache frequently used data** (schemas, queries, configurations)
60
- - **Pool database connections** with automatic health monitoring
61
- - **Validate configurations** progressively (syntax → semantic → integration)
62
-
63
- ### Auto-Discovery & Orchestration
64
-
65
- Services automatically find and coordinate with each other through:
66
- - **Cloudflare API integration** for domain discovery
67
- - **Configuration inheritance** (global → customer → domain → service)
68
- - **Dependency graph analysis** for safe deployment ordering
69
- - **Cross-domain coordination** with failure isolation
70
-
71
- ## Usage Patterns
72
-
73
- ### Library Usage (Programmatic)
74
- **Best for**: Building custom services, integrating with existing codebases
75
-
76
- ```javascript
77
- // Direct component usage
78
- import { GenericDataService, SchemaManager } from '@tamyla/clodo-framework';
79
-
80
- const service = new GenericDataService(d1Client, 'users');
81
- const users = await service.findAll({ limit: 10 });
82
- ```
83
-
84
- ### CLI Usage (Command Line)
85
- **Best for**: Development workflows, administration, one-off operations
86
-
87
- ```bash
88
- # Deploy a service
89
- node bin/deployment/enterprise-deploy.js deploy api.example.com
90
-
91
- # Manage database
92
- node bin/database/enterprise-db-manager.js health api.example.com
93
- ```
94
-
95
- ### Hybrid Approach
96
- Most teams use both: CLI tools for development/administration, library components for service implementation.
97
-
98
- ## Key Features
99
-
100
- ### 🔒 **Security by Default**
101
- - Automatic security validation on all deployments
102
- - Environment-specific security requirements
103
- - Cryptographic key generation and management
104
- - Prevention of insecure configurations reaching production
105
-
106
- ### ⚡ **Performance Optimized**
107
- - Multi-layer caching (schemas, queries, configurations)
108
- - Connection pooling with health monitoring
109
- - Lazy component initialization
110
- - Query optimization and result caching
111
-
112
- ### 🛡️ **Enterprise Reliable**
113
- - Circuit breaker patterns for external services
114
- - Exponential backoff for retries
115
- - Graceful degradation on failures
116
- - Comprehensive error recovery
117
-
118
- ### 📊 **Observable**
119
- - Built-in performance monitoring
120
- - Deployment auditing and logging
121
- - Health checks and alerting
122
- - Comprehensive telemetry
123
-
124
- ## Design Principles
125
-
126
- ### 🎪 **Clodo Architecture**
127
- - **Single Responsibility**: Each component has one clear purpose
128
- - **Composability**: Components combine in any configuration
129
- - **Reusability**: Components work across different contexts
130
- - **Testability**: Isolated testing of individual components with modular testing capabilities
131
- - **Modular Testing**: Individual test modules (API, Auth, Database, Performance) for granular control
132
- - **Observability**: Every operation is logged and monitored
133
-
134
- ### 🏗️ **Convention over Configuration**
135
- - Standard patterns reduce decision complexity
136
- - Sensible defaults with override capabilities
137
- - Consistent naming and structure
138
- - Predictable behavior across components
139
-
140
- ### 🔧 **Modular Extensibility**
141
- - Service types can be added without core changes
142
- - Custom validators and adapters can be plugged in
143
- - Database backends can be swapped
144
- - Deployment strategies are configurable
145
-
146
- ## Getting Started
147
-
148
- ### For Service Developers
149
- 1. **Install**: `npm install @tamyla/clodo-framework`
150
- 2. **Import components** you need for your service
151
- 3. **Configure** domains, features, and database connections
152
- 4. **Deploy** using CLI tools or embed deployment logic
153
-
154
- ### For Platform Administrators
155
- 1. **Use CLI tools** for deployment and management
156
- 2. **Monitor** services through built-in telemetry
157
- 3. **Configure** multi-tenant environments
158
- 4. **Scale** by adding more domains and services
159
-
160
- ## Architecture Benefits
161
-
162
- ### For Small Businesses
163
- - **Cost Effective**: Generic components = affordable custom software
164
- - **Fast Time-to-Market**: Configuration over custom development
165
- - **Scalable**: Start simple, add complexity as you grow
166
- - **Maintainable**: Framework handles infrastructure complexity
167
-
168
- ### For Enterprise Teams
169
- - **Consistency**: Standardized patterns across services
170
- - **Reliability**: Battle-tested components with enterprise features
171
- - **Developer Productivity**: Focus on business logic, not infrastructure
172
- - **Operational Excellence**: Built-in monitoring, security, and automation
173
-
174
- ## Integration Examples
175
-
176
- ### Basic CRUD Service
177
- ```javascript
178
- import { GenericDataService, SchemaManager } from '@tamyla/clodo-framework';
179
-
180
- export default {
181
- async fetch(request, env) {
182
- const service = new GenericDataService(env.DB, 'products');
183
- const products = await service.findAll();
184
- return Response.json(products);
185
- }
186
- };
187
- ```
188
-
189
- ### Multi-Domain Orchestration
190
- ```javascript
191
- import { CrossDomainCoordinator } from '@tamyla/clodo-framework';
192
-
193
- const coordinator = new CrossDomainCoordinator({
194
- domains: ['api.example.com', 'auth.example.com'],
195
- enableMonitoring: true
196
- });
197
-
198
- await coordinator.deployAll();
199
- ```
200
-
201
- ## Conclusion
202
-
203
- The CLODO Framework provides a sophisticated yet approachable way to build enterprise-grade applications. By combining reusable components with intelligent orchestration, it enables both rapid development and enterprise reliability. The dual interface (library + CLI) serves different user needs while maintaining architectural integrity.
204
-
205
- Whether you're building a simple CRUD service or a complex multi-domain enterprise application, the framework provides the components and intelligence to get you there efficiently and reliably.</content>
206
- <parameter name="filePath">c:\Users\Admin\Documents\coding\tamyla\clodo-framework\docs\FRAMEWORK-ARCHITECTURE-OVERVIEW.md