@syntropysoft/syntropyfront 0.2.3 โ†’ 0.2.4

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/README.md CHANGED
@@ -16,6 +16,8 @@
16
16
  <a href="#"><img src="https://img.shields.io/badge/status-ready%20for%20production-brightgreen.svg" alt="Ready for Production"></a>
17
17
  <a href="#"><img src="https://github.com/Syntropysoft/syntropyfront/workflows/CodeQL/badge.svg" alt="CodeQL"></a>
18
18
  <a href="#"><img src="https://img.shields.io/badge/dependabot-enabled-brightgreen.svg" alt="Dependabot"></a>
19
+ <a href="#"><img src="https://img.shields.io/badge/mutation%20score-75.94%25-brightgreen.svg" alt="Mutation Score"></a>
20
+ <a href="#"><img src="https://img.shields.io/badge/test%20coverage-91%2B%25-brightgreen.svg" alt="Test Coverage"></a>
19
21
  </p>
20
22
 
21
23
  ---
@@ -401,6 +403,89 @@ window.addEventListener('load', () => {
401
403
  });
402
404
  ```
403
405
 
406
+ ## ๐Ÿ—๏ธ Architecture & Code Quality
407
+
408
+ SyntropyFront follows SOLID principles and maintains high code quality through:
409
+
410
+ ### Modular Architecture
411
+
412
+ The codebase is organized into focused modules with single responsibilities:
413
+
414
+ ```
415
+ src/core/
416
+ โ”œโ”€โ”€ agent/ # Core Agent components
417
+ โ”‚ โ”œโ”€โ”€ Agent.js # Main coordinator
418
+ โ”‚ โ”œโ”€โ”€ ConfigurationManager.js # Configuration handling
419
+ โ”‚ โ”œโ”€โ”€ QueueManager.js # Batching and queuing
420
+ โ”‚ โ””โ”€โ”€ HttpTransport.js # HTTP communication
421
+ โ”œโ”€โ”€ database/ # IndexedDB management
422
+ โ”‚ โ”œโ”€โ”€ DatabaseManager.js # Database coordinator
423
+ โ”‚ โ”œโ”€โ”€ DatabaseConfigManager.js # Configuration
424
+ โ”‚ โ”œโ”€โ”€ DatabaseConnectionManager.js # Connection handling
425
+ โ”‚ โ”œโ”€โ”€ DatabaseTransactionManager.js # Transaction management
426
+ โ”‚ โ”œโ”€โ”€ StorageManager.js # CRUD operations
427
+ โ”‚ โ””โ”€โ”€ SerializationManager.js # Data serialization
428
+ โ”œโ”€โ”€ retry/ # Retry system
429
+ โ”‚ โ”œโ”€โ”€ RetryManager.js # Retry coordination
430
+ โ”‚ โ””โ”€โ”€ RetryLogicManager.js # Retry logic
431
+ โ”œโ”€โ”€ persistent/ # Persistent buffer
432
+ โ”‚ โ””โ”€โ”€ PersistentBufferManager.js # Buffer management
433
+ โ”œโ”€โ”€ breadcrumbs/ # Event tracking
434
+ โ”‚ โ”œโ”€โ”€ BreadcrumbManager.js # Breadcrumb coordination
435
+ โ”‚ โ””โ”€โ”€ BreadcrumbStore.js # Breadcrumb storage
436
+ โ”œโ”€โ”€ context/ # Context collection
437
+ โ”‚ โ””โ”€โ”€ ContextCollector.js # Context gathering
438
+ โ””โ”€โ”€ utils/ # Utilities
439
+ โ”œโ”€โ”€ Logger.js # Logging utilities
440
+ โ””โ”€โ”€ ErrorManager.js # Error handling
441
+ ```
442
+
443
+ ### Design Principles
444
+
445
+ - **Single Responsibility Principle (SRP)**: Each class has one clear purpose
446
+ - **Dependency Injection**: Components receive dependencies through constructors
447
+ - **Declarative Error Handling**: Structured error responses with fallbacks
448
+ - **Comprehensive Testing**: 484 tests with 77.60% mutation score
449
+ - **Optimized Performance**: Timeouts optimized for faster execution
450
+
451
+ ## ๐Ÿงช Testing & Quality
452
+
453
+ SyntropyFront maintains high code quality through comprehensive testing:
454
+
455
+ ### Test Coverage & Mutation Testing
456
+
457
+ - **Mutation Score**: 77.60% - Our tests effectively detect code changes
458
+ - **Test Coverage**: 92.22% - Comprehensive unit test coverage
459
+ - **Key Components Performance**:
460
+ - `Agent.js`: 87.23% mutation score
461
+ - `ConfigurationManager.js`: 100% mutation score
462
+ - `QueueManager.js`: 97.37% mutation score
463
+ - `HttpTransport.js`: 86.96% mutation score
464
+ - `BreadcrumbManager.js`: 100% mutation score
465
+ - `BreadcrumbStore.js`: 95.00% mutation score
466
+ - `SerializationManager.js`: 100% mutation score
467
+ - `DatabaseTransactionManager.js`: 100% mutation score
468
+
469
+ ### Testing Stack
470
+
471
+ - **Jest**: Unit testing framework
472
+ - **Stryker**: Mutation testing for test quality validation
473
+ - **IndexedDB Mocking**: Browser storage testing
474
+ - **Fetch Mocking**: HTTP request testing
475
+
476
+ ### Running Tests
477
+
478
+ ```bash
479
+ # Run all tests
480
+ npm test
481
+
482
+ # Run with coverage
483
+ npm run test:coverage
484
+
485
+ # Run mutation testing
486
+ npm run test:mutation
487
+ ```
488
+
404
489
  ## ๐Ÿ” Debugging
405
490
 
406
491
  SyntropyFront logs helpful information to the console: