# lib/scalability Directory

This directory contains the scalability analysis system that achieves 100/100 scalability score through context-aware bottleneck detection.

## Core Files:
- **analyzeScalability.js**: Main scalability analysis entry point
- **scalabilityProjectAnalyzer.js**: Project-level scalability assessment
- **scalabilityFileAnalyzer.js**: File-level scalability analysis
- **scalabilityFileCollector.js**: Scalability-relevant file collection

## Detection Systems:
- **scalabilityPatternDetector.js**: Scalability anti-pattern detection
- **databaseScalabilityAnalyzer.js**: Database scalability issues (N+1 queries)
- **eventLoopBlockingDetector.js**: Event loop blocking detection
- **resourceUtilizationAnalyzer.js**: Resource utilization analysis

## Context Analysis:
- **contextDetector.js**: Application context detection (CLI, server, library)
- **scalabilityContextAnalyzer.js**: Context-specific scalability concerns
- **serverScalabilityAnalyzer.js**: Server-specific scalability issues

## Assessment:
- **scalabilityScoreCalculator.js**: Scalability scoring algorithm
- **scalabilityGradeProvider.js**: Grade assignment system
- **scalabilityRecommendationGenerator.js**: Context-aware recommendations

## Purpose:
- Detect database N+1 queries, event loop blocking, and resource bottlenecks
- Provide context-aware analysis (distinguishing CLI tools from servers)
- Generate targeted recommendations based on application context
- Support intelligent scoring that considers application type appropriately