devintelligence 0.0.0-stage → 1.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/.env.example +14 -0
- package/LICENSE +22 -0
- package/README.md +146 -3
- package/bin/devintelligence.js +2486 -0
- package/bin/devintelligence.ts +416 -0
- package/dist/App.d.ts +3 -0
- package/dist/ai.js +366 -0
- package/dist/ai.js.map +7 -0
- package/dist/components/DeepAnalysisViews.d.ts +13 -0
- package/dist/components/MobileAndPlatformViews.d.ts +22 -0
- package/dist/components/OverviewAndExplorerViews.d.ts +20 -0
- package/dist/components/RepairAndGateViews.d.ts +25 -0
- package/dist/engine/aiEngine.d.ts +62 -0
- package/dist/engine/analyzerEngine.d.ts +19 -0
- package/dist/engine/repairEngine.d.ts +42 -0
- package/dist/engine.js +1541 -0
- package/dist/engine.js.map +7 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +2344 -0
- package/dist/index.js.map +7 -0
- package/dist/main.d.ts +1 -0
- package/dist/repair.js +2052 -0
- package/dist/repair.js.map +7 -0
- package/dist/src/App.d.ts +3 -0
- package/dist/src/components/DeepAnalysisViews.d.ts +13 -0
- package/dist/src/components/MobileAndPlatformViews.d.ts +22 -0
- package/dist/src/components/OverviewAndExplorerViews.d.ts +20 -0
- package/dist/src/components/RepairAndGateViews.d.ts +25 -0
- package/dist/src/engine/aiEngine.d.ts +62 -0
- package/dist/src/engine/analyzerEngine.d.ts +19 -0
- package/dist/src/engine/repairEngine.d.ts +42 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/types/devintelligence.d.ts +250 -0
- package/dist/types/devintelligence.d.ts +250 -0
- package/fixtures/django-analytics-service/requirements.txt +4 -0
- package/fixtures/django-analytics-service/settings.py +16 -0
- package/fixtures/express-api-gateway/package.json +14 -0
- package/fixtures/express-api-gateway/src/server.ts +16 -0
- package/fixtures/nextjs-saas-portal/package.json +21 -0
- package/fixtures/nextjs-saas-portal/src/app/dashboard/page.tsx +26 -0
- package/fixtures/rn-bare-fitness/android/build.gradle +19 -0
- package/fixtures/rn-bare-fitness/ios/Info.plist +14 -0
- package/fixtures/rn-bare-fitness/package.json +23 -0
- package/fixtures/rn-bare-fitness/src/WorkoutTracker.tsx +31 -0
- package/fixtures/rn-expo-commerce/android/app/build.gradle +20 -0
- package/fixtures/rn-expo-commerce/android/app/src/main/AndroidManifest.xml +21 -0
- package/fixtures/rn-expo-commerce/android/gradle.properties +6 -0
- package/fixtures/rn-expo-commerce/app.json +17 -0
- package/fixtures/rn-expo-commerce/babel.config.js +10 -0
- package/fixtures/rn-expo-commerce/ios/Podfile +13 -0
- package/fixtures/rn-expo-commerce/metro.config.js +7 -0
- package/fixtures/rn-expo-commerce/package.json +31 -0
- package/fixtures/rn-expo-commerce/src/components/LegacyPromoBanner.tsx +11 -0
- package/fixtures/rn-expo-commerce/src/screens/ProductFeedScreen.tsx +48 -0
- package/fixtures/rn-expo-commerce/src/services/api.ts +15 -0
- package/package.json +89 -6
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
export type ProjectEcosystem = 'react-native-expo' | 'react-native-bare' | 'nextjs' | 'react-vite' | 'node-express' | 'python-django' | 'typescript-universal';
|
|
2
|
+
export type CheckStatus = 'working' | 'incompatible' | 'misconfigured' | 'not_installed' | 'os_unsupported';
|
|
3
|
+
export type IssueSeverity = 'critical' | 'high' | 'medium' | 'low';
|
|
4
|
+
export type RepairTier = 'SAFE' | 'REVIEW_REQUIRED' | 'RISKY';
|
|
5
|
+
export type IssueDomain = 'react-native' | 'android' | 'ios' | 'code' | 'design' | 'performance' | 'security' | 'dependencies';
|
|
6
|
+
export interface EnvironmentCheckItem {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
category: 'runtime' | 'package-manager' | 'react-native' | 'android' | 'ios' | 'build-tools';
|
|
10
|
+
status: CheckStatus;
|
|
11
|
+
detectedVersion: string;
|
|
12
|
+
requiredVersion: string;
|
|
13
|
+
osPlatform: string;
|
|
14
|
+
explanation: string;
|
|
15
|
+
remediationCommand?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface DiagnosticIssue {
|
|
18
|
+
id: string;
|
|
19
|
+
projectId: string;
|
|
20
|
+
domain: IssueDomain;
|
|
21
|
+
ruleId: string;
|
|
22
|
+
title: string;
|
|
23
|
+
severity: IssueSeverity;
|
|
24
|
+
repairTier: RepairTier;
|
|
25
|
+
confidence: number;
|
|
26
|
+
filePath: string;
|
|
27
|
+
line: number;
|
|
28
|
+
rootCause: string;
|
|
29
|
+
explanation: string;
|
|
30
|
+
recommendedRepair: string;
|
|
31
|
+
terminalCommand?: string;
|
|
32
|
+
fixAvailable: boolean;
|
|
33
|
+
beforeSnippet: string;
|
|
34
|
+
afterSnippet: string;
|
|
35
|
+
unifiedDiff: string;
|
|
36
|
+
fixed?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface AndroidDiagnosticSummary {
|
|
39
|
+
present: boolean;
|
|
40
|
+
manifestPath: string | null;
|
|
41
|
+
packageName: string | null;
|
|
42
|
+
minSdkVersion: number | null;
|
|
43
|
+
compileSdkVersion: number | null;
|
|
44
|
+
targetSdkVersion: number | null;
|
|
45
|
+
agpVersion: string | null;
|
|
46
|
+
kotlinVersion: string | null;
|
|
47
|
+
ndkVersion: string | null;
|
|
48
|
+
hermesEnabled: boolean;
|
|
49
|
+
newArchEnabled: boolean;
|
|
50
|
+
jetifierEnabled: boolean;
|
|
51
|
+
gradleJvmArgs: string | null;
|
|
52
|
+
permissions: string[];
|
|
53
|
+
cleartextTrafficAllowed: boolean;
|
|
54
|
+
releaseMinifyEnabled: boolean;
|
|
55
|
+
releaseUsesDebugSigning: boolean;
|
|
56
|
+
abis: string[];
|
|
57
|
+
}
|
|
58
|
+
export interface IosDiagnosticSummary {
|
|
59
|
+
present: boolean;
|
|
60
|
+
hostCanVerifyNativeBuild: boolean;
|
|
61
|
+
hostOsNote: string;
|
|
62
|
+
podfilePath: string | null;
|
|
63
|
+
infoPlistPath: string | null;
|
|
64
|
+
deploymentTarget: string | null;
|
|
65
|
+
bundleIdentifier: string | null;
|
|
66
|
+
hermesEnabled: boolean | null;
|
|
67
|
+
flipperEnabled: boolean;
|
|
68
|
+
useFrameworks: string | null;
|
|
69
|
+
declaredPermissions: string[];
|
|
70
|
+
missingRequiredPermissions: string[];
|
|
71
|
+
}
|
|
72
|
+
export interface DependencyRecord {
|
|
73
|
+
name: string;
|
|
74
|
+
currentVersion: string;
|
|
75
|
+
recommendedVersion: string;
|
|
76
|
+
section: 'dependencies' | 'devDependencies' | 'python';
|
|
77
|
+
estimatedSizeKb: number;
|
|
78
|
+
status: 'compatible' | 'conflict' | 'heavy' | 'deprecated';
|
|
79
|
+
note: string;
|
|
80
|
+
replacementSuggestion?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface DesignSystemReport {
|
|
83
|
+
discoveredTokens: {
|
|
84
|
+
colors: string[];
|
|
85
|
+
radii: string[];
|
|
86
|
+
spacingScale: string[];
|
|
87
|
+
fontFamilies: string[];
|
|
88
|
+
};
|
|
89
|
+
hardcodedColorsCount: number;
|
|
90
|
+
inconsistentSpacingCount: number;
|
|
91
|
+
randomRadiiCount: number;
|
|
92
|
+
emojiIconsCount: number;
|
|
93
|
+
accessibilityGapsCount: number;
|
|
94
|
+
tokenComplianceScore: number;
|
|
95
|
+
}
|
|
96
|
+
export interface PerformanceReport {
|
|
97
|
+
totalSourceFiles: number;
|
|
98
|
+
totalSourceSizeKb: number;
|
|
99
|
+
estimatedBundleWeightKb: number;
|
|
100
|
+
heavyDependencies: {
|
|
101
|
+
name: string;
|
|
102
|
+
sizeKb: number;
|
|
103
|
+
reason: string;
|
|
104
|
+
}[];
|
|
105
|
+
renderBottlenecksCount: number;
|
|
106
|
+
memoryLeakRisksCount: number;
|
|
107
|
+
blockingIoCount: number;
|
|
108
|
+
unoptimizedAssets: string[];
|
|
109
|
+
performanceScore: number;
|
|
110
|
+
}
|
|
111
|
+
export interface LaunchDoctorReport {
|
|
112
|
+
frameworkName: string;
|
|
113
|
+
ecosystem: ProjectEcosystem;
|
|
114
|
+
packageManager: 'npm' | 'yarn' | 'pnpm' | 'bun' | 'pip';
|
|
115
|
+
workflowType: 'Expo Managed' | 'Expo Prebuild (CNG)' | 'Bare React Native' | 'Web / Backend Standard';
|
|
116
|
+
detectedScripts: Record<string, string>;
|
|
117
|
+
recommendedStartCommand: string;
|
|
118
|
+
secondaryCommands: {
|
|
119
|
+
label: string;
|
|
120
|
+
command: string;
|
|
121
|
+
}[];
|
|
122
|
+
metroConfigured: boolean;
|
|
123
|
+
babelConfigured: boolean;
|
|
124
|
+
typescriptConfigured: boolean;
|
|
125
|
+
androidLaunchReady: boolean;
|
|
126
|
+
iosLaunchReady: boolean;
|
|
127
|
+
readinessNotes: string[];
|
|
128
|
+
}
|
|
129
|
+
export interface QualityGateConfig {
|
|
130
|
+
minCodeQuality: number;
|
|
131
|
+
minDesignQuality: number;
|
|
132
|
+
minPerformanceScore: number;
|
|
133
|
+
maxCriticalIssues: number;
|
|
134
|
+
maxSecurityIssues: number;
|
|
135
|
+
requireBuildVerification: boolean;
|
|
136
|
+
}
|
|
137
|
+
export interface QualityGateEvaluation {
|
|
138
|
+
passed: boolean;
|
|
139
|
+
exitCode: 0 | 1;
|
|
140
|
+
evaluatedAt: string;
|
|
141
|
+
checks: {
|
|
142
|
+
name: string;
|
|
143
|
+
actual: number | string;
|
|
144
|
+
threshold: number | string;
|
|
145
|
+
passed: boolean;
|
|
146
|
+
}[];
|
|
147
|
+
githubActionsYaml: string;
|
|
148
|
+
preCommitHookScript: string;
|
|
149
|
+
}
|
|
150
|
+
export interface RepairRecord {
|
|
151
|
+
id: string;
|
|
152
|
+
projectId: string;
|
|
153
|
+
issueId: string;
|
|
154
|
+
issueTitle: string;
|
|
155
|
+
filePath: string;
|
|
156
|
+
repairTier: RepairTier;
|
|
157
|
+
appliedAt: string;
|
|
158
|
+
backupPath: string;
|
|
159
|
+
rolledBack: boolean;
|
|
160
|
+
verifiedAfterFix: boolean;
|
|
161
|
+
unifiedDiff: string;
|
|
162
|
+
}
|
|
163
|
+
export interface ScanSnapshot {
|
|
164
|
+
id: string;
|
|
165
|
+
projectId: string;
|
|
166
|
+
scannedAt: string;
|
|
167
|
+
durationMs: number;
|
|
168
|
+
totalIssues: number;
|
|
169
|
+
criticalCount: number;
|
|
170
|
+
safeFixableCount: number;
|
|
171
|
+
scores: {
|
|
172
|
+
overall: number;
|
|
173
|
+
reactNative: number;
|
|
174
|
+
codeQuality: number;
|
|
175
|
+
designQuality: number;
|
|
176
|
+
performance: number;
|
|
177
|
+
security: number;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
export interface VisualTestingReport {
|
|
181
|
+
projectId: string;
|
|
182
|
+
lastCapturedAt: string;
|
|
183
|
+
engine: string;
|
|
184
|
+
viewportsTested: {
|
|
185
|
+
label: string;
|
|
186
|
+
width: number;
|
|
187
|
+
height: number;
|
|
188
|
+
overflowDetected: boolean;
|
|
189
|
+
brokenImagesCount: number;
|
|
190
|
+
consoleErrorsCount: number;
|
|
191
|
+
networkFailuresCount: number;
|
|
192
|
+
diffPercentage: number;
|
|
193
|
+
status: 'pass' | 'warning' | 'fail';
|
|
194
|
+
}[];
|
|
195
|
+
findings: {
|
|
196
|
+
viewport: string;
|
|
197
|
+
selector: string;
|
|
198
|
+
description: string;
|
|
199
|
+
recommendation: string;
|
|
200
|
+
}[];
|
|
201
|
+
}
|
|
202
|
+
export interface ErrorDiagnosisResult {
|
|
203
|
+
id: string;
|
|
204
|
+
category: 'Metro Bundler' | 'Babel / Reanimated' | 'Android Gradle / Kotlin' | 'Android Manifest' | 'CocoaPods / iOS' | 'Native Module Linking' | 'Hermes Runtime' | 'React Render / Hook Crash' | 'Dependency Conflict';
|
|
205
|
+
severity: IssueSeverity;
|
|
206
|
+
confidence: number;
|
|
207
|
+
summary: string;
|
|
208
|
+
rootCause: string;
|
|
209
|
+
responsibleFile: string;
|
|
210
|
+
line: number | null;
|
|
211
|
+
safeRepairSteps: string[];
|
|
212
|
+
terminalCommands: string[];
|
|
213
|
+
codePatchSuggestion?: string;
|
|
214
|
+
aiPowered?: boolean;
|
|
215
|
+
aiModel?: string;
|
|
216
|
+
fallbackUsed?: boolean;
|
|
217
|
+
fallbackReason?: string;
|
|
218
|
+
}
|
|
219
|
+
export interface ProjectIntelligenceReport {
|
|
220
|
+
id: string;
|
|
221
|
+
name: string;
|
|
222
|
+
rootPath: string;
|
|
223
|
+
ecosystem: ProjectEcosystem;
|
|
224
|
+
description: string;
|
|
225
|
+
lastScannedAt: string;
|
|
226
|
+
scanDurationMs: number;
|
|
227
|
+
filesAnalyzed: string[];
|
|
228
|
+
scores: {
|
|
229
|
+
overall: number;
|
|
230
|
+
reactNative: number;
|
|
231
|
+
codeQuality: number;
|
|
232
|
+
designQuality: number;
|
|
233
|
+
performance: number;
|
|
234
|
+
security: number;
|
|
235
|
+
};
|
|
236
|
+
environmentChecks: EnvironmentCheckItem[];
|
|
237
|
+
issues: DiagnosticIssue[];
|
|
238
|
+
android: AndroidDiagnosticSummary;
|
|
239
|
+
ios: IosDiagnosticSummary;
|
|
240
|
+
dependencies: DependencyRecord[];
|
|
241
|
+
designSystem: DesignSystemReport;
|
|
242
|
+
performance: PerformanceReport;
|
|
243
|
+
launchDoctor: LaunchDoctorReport;
|
|
244
|
+
qualityGateConfig: QualityGateConfig;
|
|
245
|
+
qualityGateEvaluation: QualityGateEvaluation;
|
|
246
|
+
visualTesting: VisualTestingReport;
|
|
247
|
+
repairHistory: RepairRecord[];
|
|
248
|
+
scanHistory: ScanSnapshot[];
|
|
249
|
+
}
|
|
250
|
+
export type DashboardModuleId = 'command-center' | 'project-explorer' | 'project-health' | 'rn-doctor' | 'android-diagnostics' | 'ios-diagnostics' | 'code-intelligence' | 'design-intelligence' | 'performance-lab' | 'security-audit' | 'dependency-intelligence' | 'error-diagnostics' | 'auto-repair' | 'visual-testing' | 'quality-gate' | 'project-history' | 'environment-manager' | 'settings';
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
export type ProjectEcosystem = 'react-native-expo' | 'react-native-bare' | 'nextjs' | 'react-vite' | 'node-express' | 'python-django' | 'typescript-universal';
|
|
2
|
+
export type CheckStatus = 'working' | 'incompatible' | 'misconfigured' | 'not_installed' | 'os_unsupported';
|
|
3
|
+
export type IssueSeverity = 'critical' | 'high' | 'medium' | 'low';
|
|
4
|
+
export type RepairTier = 'SAFE' | 'REVIEW_REQUIRED' | 'RISKY';
|
|
5
|
+
export type IssueDomain = 'react-native' | 'android' | 'ios' | 'code' | 'design' | 'performance' | 'security' | 'dependencies';
|
|
6
|
+
export interface EnvironmentCheckItem {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
category: 'runtime' | 'package-manager' | 'react-native' | 'android' | 'ios' | 'build-tools';
|
|
10
|
+
status: CheckStatus;
|
|
11
|
+
detectedVersion: string;
|
|
12
|
+
requiredVersion: string;
|
|
13
|
+
osPlatform: string;
|
|
14
|
+
explanation: string;
|
|
15
|
+
remediationCommand?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface DiagnosticIssue {
|
|
18
|
+
id: string;
|
|
19
|
+
projectId: string;
|
|
20
|
+
domain: IssueDomain;
|
|
21
|
+
ruleId: string;
|
|
22
|
+
title: string;
|
|
23
|
+
severity: IssueSeverity;
|
|
24
|
+
repairTier: RepairTier;
|
|
25
|
+
confidence: number;
|
|
26
|
+
filePath: string;
|
|
27
|
+
line: number;
|
|
28
|
+
rootCause: string;
|
|
29
|
+
explanation: string;
|
|
30
|
+
recommendedRepair: string;
|
|
31
|
+
terminalCommand?: string;
|
|
32
|
+
fixAvailable: boolean;
|
|
33
|
+
beforeSnippet: string;
|
|
34
|
+
afterSnippet: string;
|
|
35
|
+
unifiedDiff: string;
|
|
36
|
+
fixed?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface AndroidDiagnosticSummary {
|
|
39
|
+
present: boolean;
|
|
40
|
+
manifestPath: string | null;
|
|
41
|
+
packageName: string | null;
|
|
42
|
+
minSdkVersion: number | null;
|
|
43
|
+
compileSdkVersion: number | null;
|
|
44
|
+
targetSdkVersion: number | null;
|
|
45
|
+
agpVersion: string | null;
|
|
46
|
+
kotlinVersion: string | null;
|
|
47
|
+
ndkVersion: string | null;
|
|
48
|
+
hermesEnabled: boolean;
|
|
49
|
+
newArchEnabled: boolean;
|
|
50
|
+
jetifierEnabled: boolean;
|
|
51
|
+
gradleJvmArgs: string | null;
|
|
52
|
+
permissions: string[];
|
|
53
|
+
cleartextTrafficAllowed: boolean;
|
|
54
|
+
releaseMinifyEnabled: boolean;
|
|
55
|
+
releaseUsesDebugSigning: boolean;
|
|
56
|
+
abis: string[];
|
|
57
|
+
}
|
|
58
|
+
export interface IosDiagnosticSummary {
|
|
59
|
+
present: boolean;
|
|
60
|
+
hostCanVerifyNativeBuild: boolean;
|
|
61
|
+
hostOsNote: string;
|
|
62
|
+
podfilePath: string | null;
|
|
63
|
+
infoPlistPath: string | null;
|
|
64
|
+
deploymentTarget: string | null;
|
|
65
|
+
bundleIdentifier: string | null;
|
|
66
|
+
hermesEnabled: boolean | null;
|
|
67
|
+
flipperEnabled: boolean;
|
|
68
|
+
useFrameworks: string | null;
|
|
69
|
+
declaredPermissions: string[];
|
|
70
|
+
missingRequiredPermissions: string[];
|
|
71
|
+
}
|
|
72
|
+
export interface DependencyRecord {
|
|
73
|
+
name: string;
|
|
74
|
+
currentVersion: string;
|
|
75
|
+
recommendedVersion: string;
|
|
76
|
+
section: 'dependencies' | 'devDependencies' | 'python';
|
|
77
|
+
estimatedSizeKb: number;
|
|
78
|
+
status: 'compatible' | 'conflict' | 'heavy' | 'deprecated';
|
|
79
|
+
note: string;
|
|
80
|
+
replacementSuggestion?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface DesignSystemReport {
|
|
83
|
+
discoveredTokens: {
|
|
84
|
+
colors: string[];
|
|
85
|
+
radii: string[];
|
|
86
|
+
spacingScale: string[];
|
|
87
|
+
fontFamilies: string[];
|
|
88
|
+
};
|
|
89
|
+
hardcodedColorsCount: number;
|
|
90
|
+
inconsistentSpacingCount: number;
|
|
91
|
+
randomRadiiCount: number;
|
|
92
|
+
emojiIconsCount: number;
|
|
93
|
+
accessibilityGapsCount: number;
|
|
94
|
+
tokenComplianceScore: number;
|
|
95
|
+
}
|
|
96
|
+
export interface PerformanceReport {
|
|
97
|
+
totalSourceFiles: number;
|
|
98
|
+
totalSourceSizeKb: number;
|
|
99
|
+
estimatedBundleWeightKb: number;
|
|
100
|
+
heavyDependencies: {
|
|
101
|
+
name: string;
|
|
102
|
+
sizeKb: number;
|
|
103
|
+
reason: string;
|
|
104
|
+
}[];
|
|
105
|
+
renderBottlenecksCount: number;
|
|
106
|
+
memoryLeakRisksCount: number;
|
|
107
|
+
blockingIoCount: number;
|
|
108
|
+
unoptimizedAssets: string[];
|
|
109
|
+
performanceScore: number;
|
|
110
|
+
}
|
|
111
|
+
export interface LaunchDoctorReport {
|
|
112
|
+
frameworkName: string;
|
|
113
|
+
ecosystem: ProjectEcosystem;
|
|
114
|
+
packageManager: 'npm' | 'yarn' | 'pnpm' | 'bun' | 'pip';
|
|
115
|
+
workflowType: 'Expo Managed' | 'Expo Prebuild (CNG)' | 'Bare React Native' | 'Web / Backend Standard';
|
|
116
|
+
detectedScripts: Record<string, string>;
|
|
117
|
+
recommendedStartCommand: string;
|
|
118
|
+
secondaryCommands: {
|
|
119
|
+
label: string;
|
|
120
|
+
command: string;
|
|
121
|
+
}[];
|
|
122
|
+
metroConfigured: boolean;
|
|
123
|
+
babelConfigured: boolean;
|
|
124
|
+
typescriptConfigured: boolean;
|
|
125
|
+
androidLaunchReady: boolean;
|
|
126
|
+
iosLaunchReady: boolean;
|
|
127
|
+
readinessNotes: string[];
|
|
128
|
+
}
|
|
129
|
+
export interface QualityGateConfig {
|
|
130
|
+
minCodeQuality: number;
|
|
131
|
+
minDesignQuality: number;
|
|
132
|
+
minPerformanceScore: number;
|
|
133
|
+
maxCriticalIssues: number;
|
|
134
|
+
maxSecurityIssues: number;
|
|
135
|
+
requireBuildVerification: boolean;
|
|
136
|
+
}
|
|
137
|
+
export interface QualityGateEvaluation {
|
|
138
|
+
passed: boolean;
|
|
139
|
+
exitCode: 0 | 1;
|
|
140
|
+
evaluatedAt: string;
|
|
141
|
+
checks: {
|
|
142
|
+
name: string;
|
|
143
|
+
actual: number | string;
|
|
144
|
+
threshold: number | string;
|
|
145
|
+
passed: boolean;
|
|
146
|
+
}[];
|
|
147
|
+
githubActionsYaml: string;
|
|
148
|
+
preCommitHookScript: string;
|
|
149
|
+
}
|
|
150
|
+
export interface RepairRecord {
|
|
151
|
+
id: string;
|
|
152
|
+
projectId: string;
|
|
153
|
+
issueId: string;
|
|
154
|
+
issueTitle: string;
|
|
155
|
+
filePath: string;
|
|
156
|
+
repairTier: RepairTier;
|
|
157
|
+
appliedAt: string;
|
|
158
|
+
backupPath: string;
|
|
159
|
+
rolledBack: boolean;
|
|
160
|
+
verifiedAfterFix: boolean;
|
|
161
|
+
unifiedDiff: string;
|
|
162
|
+
}
|
|
163
|
+
export interface ScanSnapshot {
|
|
164
|
+
id: string;
|
|
165
|
+
projectId: string;
|
|
166
|
+
scannedAt: string;
|
|
167
|
+
durationMs: number;
|
|
168
|
+
totalIssues: number;
|
|
169
|
+
criticalCount: number;
|
|
170
|
+
safeFixableCount: number;
|
|
171
|
+
scores: {
|
|
172
|
+
overall: number;
|
|
173
|
+
reactNative: number;
|
|
174
|
+
codeQuality: number;
|
|
175
|
+
designQuality: number;
|
|
176
|
+
performance: number;
|
|
177
|
+
security: number;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
export interface VisualTestingReport {
|
|
181
|
+
projectId: string;
|
|
182
|
+
lastCapturedAt: string;
|
|
183
|
+
engine: string;
|
|
184
|
+
viewportsTested: {
|
|
185
|
+
label: string;
|
|
186
|
+
width: number;
|
|
187
|
+
height: number;
|
|
188
|
+
overflowDetected: boolean;
|
|
189
|
+
brokenImagesCount: number;
|
|
190
|
+
consoleErrorsCount: number;
|
|
191
|
+
networkFailuresCount: number;
|
|
192
|
+
diffPercentage: number;
|
|
193
|
+
status: 'pass' | 'warning' | 'fail';
|
|
194
|
+
}[];
|
|
195
|
+
findings: {
|
|
196
|
+
viewport: string;
|
|
197
|
+
selector: string;
|
|
198
|
+
description: string;
|
|
199
|
+
recommendation: string;
|
|
200
|
+
}[];
|
|
201
|
+
}
|
|
202
|
+
export interface ErrorDiagnosisResult {
|
|
203
|
+
id: string;
|
|
204
|
+
category: 'Metro Bundler' | 'Babel / Reanimated' | 'Android Gradle / Kotlin' | 'Android Manifest' | 'CocoaPods / iOS' | 'Native Module Linking' | 'Hermes Runtime' | 'React Render / Hook Crash' | 'Dependency Conflict';
|
|
205
|
+
severity: IssueSeverity;
|
|
206
|
+
confidence: number;
|
|
207
|
+
summary: string;
|
|
208
|
+
rootCause: string;
|
|
209
|
+
responsibleFile: string;
|
|
210
|
+
line: number | null;
|
|
211
|
+
safeRepairSteps: string[];
|
|
212
|
+
terminalCommands: string[];
|
|
213
|
+
codePatchSuggestion?: string;
|
|
214
|
+
aiPowered?: boolean;
|
|
215
|
+
aiModel?: string;
|
|
216
|
+
fallbackUsed?: boolean;
|
|
217
|
+
fallbackReason?: string;
|
|
218
|
+
}
|
|
219
|
+
export interface ProjectIntelligenceReport {
|
|
220
|
+
id: string;
|
|
221
|
+
name: string;
|
|
222
|
+
rootPath: string;
|
|
223
|
+
ecosystem: ProjectEcosystem;
|
|
224
|
+
description: string;
|
|
225
|
+
lastScannedAt: string;
|
|
226
|
+
scanDurationMs: number;
|
|
227
|
+
filesAnalyzed: string[];
|
|
228
|
+
scores: {
|
|
229
|
+
overall: number;
|
|
230
|
+
reactNative: number;
|
|
231
|
+
codeQuality: number;
|
|
232
|
+
designQuality: number;
|
|
233
|
+
performance: number;
|
|
234
|
+
security: number;
|
|
235
|
+
};
|
|
236
|
+
environmentChecks: EnvironmentCheckItem[];
|
|
237
|
+
issues: DiagnosticIssue[];
|
|
238
|
+
android: AndroidDiagnosticSummary;
|
|
239
|
+
ios: IosDiagnosticSummary;
|
|
240
|
+
dependencies: DependencyRecord[];
|
|
241
|
+
designSystem: DesignSystemReport;
|
|
242
|
+
performance: PerformanceReport;
|
|
243
|
+
launchDoctor: LaunchDoctorReport;
|
|
244
|
+
qualityGateConfig: QualityGateConfig;
|
|
245
|
+
qualityGateEvaluation: QualityGateEvaluation;
|
|
246
|
+
visualTesting: VisualTestingReport;
|
|
247
|
+
repairHistory: RepairRecord[];
|
|
248
|
+
scanHistory: ScanSnapshot[];
|
|
249
|
+
}
|
|
250
|
+
export type DashboardModuleId = 'command-center' | 'project-explorer' | 'project-health' | 'rn-doctor' | 'android-diagnostics' | 'ios-diagnostics' | 'code-intelligence' | 'design-intelligence' | 'performance-lab' | 'security-audit' | 'dependency-intelligence' | 'error-diagnostics' | 'auto-repair' | 'visual-testing' | 'quality-gate' | 'project-history' | 'environment-manager' | 'settings';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
SECRET_KEY = "django-insecure-hardcoded-production-key-9918273645"
|
|
4
|
+
DEBUG = True
|
|
5
|
+
ALLOWED_HOSTS = ["*"]
|
|
6
|
+
|
|
7
|
+
DATABASES = {
|
|
8
|
+
"default": {
|
|
9
|
+
"ENGINE": "django.db.backends.postgresql",
|
|
10
|
+
"NAME": "analytics_prod",
|
|
11
|
+
"USER": "postgres",
|
|
12
|
+
"PASSWORD": "prod_db_password_plain_text_2026",
|
|
13
|
+
"HOST": "10.0.14.22",
|
|
14
|
+
"PORT": "5432",
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "express-api-gateway",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "tsx src/server.ts",
|
|
7
|
+
"start": "node dist/server.js"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"express": "^4.19.2",
|
|
11
|
+
"pg": "^8.11.5",
|
|
12
|
+
"jsonwebtoken": "^9.0.2"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
|
|
4
|
+
const app = express();
|
|
5
|
+
const JWT_SECRET = "super_secret_hardcoded_jwt_signing_key_2026";
|
|
6
|
+
|
|
7
|
+
app.get('/api/users/search', async (req, res) => {
|
|
8
|
+
const emailQuery = req.query.email as string;
|
|
9
|
+
// Blocking synchronous file read inside request loop
|
|
10
|
+
const auditConfig = fs.readFileSync('./config.json', 'utf8');
|
|
11
|
+
// SQL Injection vulnerability via raw string interpolation
|
|
12
|
+
const rawSql = `SELECT * FROM users WHERE email = '${emailQuery}'`;
|
|
13
|
+
res.json({ query: rawSql, configLength: auditConfig.length, signedBy: JWT_SECRET.slice(0, 4) });
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
app.listen(4000);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nextjs-saas-portal",
|
|
3
|
+
"version": "0.9.2",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev",
|
|
7
|
+
"build": "next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"lint": "next lint"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"next": "14.2.5",
|
|
13
|
+
"react": "^18.3.1",
|
|
14
|
+
"react-dom": "^18.3.1",
|
|
15
|
+
"moment": "^2.30.1",
|
|
16
|
+
"lodash": "^4.17.21"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "^5.4.5"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import moment from 'moment';
|
|
4
|
+
|
|
5
|
+
const HARDCODED_WEBHOOK_TOKEN = "whsec_live_98a7bc654321devintelligence";
|
|
6
|
+
|
|
7
|
+
export default function DashboardPage() {
|
|
8
|
+
const items = _.chunk([1, 2, 3, 4, 5, 6], 2);
|
|
9
|
+
|
|
10
|
+
async function syncWebhook() {
|
|
11
|
+
const res = await fetch('http://internal.billing.local/sync', {
|
|
12
|
+
headers: { 'X-Token': HARDCODED_WEBHOOK_TOKEN }
|
|
13
|
+
});
|
|
14
|
+
return res.json();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<main style={{ backgroundColor: '#111827', padding: '23px', borderRadius: '19px' }}>
|
|
19
|
+
<h1 style={{ color: '#F9FAFB', fontSize: '27px' }}>🚀 Billing Portal ({moment().format('YYYY-MM-DD')})</h1>
|
|
20
|
+
<img src="/hero-unoptimized-banner.bmp" width={1200} height={600} />
|
|
21
|
+
<button onClick={syncWebhook} style={{ backgroundColor: '#7C3AED', padding: '13px' }}>
|
|
22
|
+
✨ Sync Billing Now
|
|
23
|
+
</button>
|
|
24
|
+
</main>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
buildscript {
|
|
2
|
+
ext {
|
|
3
|
+
buildToolsVersion = "34.0.0"
|
|
4
|
+
minSdkVersion = 23
|
|
5
|
+
compileSdkVersion = 34
|
|
6
|
+
targetSdkVersion = 33
|
|
7
|
+
ndkVersion = "25.1.8937393"
|
|
8
|
+
kotlinVersion = "1.8.10"
|
|
9
|
+
}
|
|
10
|
+
repositories {
|
|
11
|
+
google()
|
|
12
|
+
mavenCentral()
|
|
13
|
+
}
|
|
14
|
+
dependencies {
|
|
15
|
+
classpath("com.android.tools.build:gradle:8.1.1")
|
|
16
|
+
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
17
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDisplayName</key>
|
|
6
|
+
<string>BareFitnessPro</string>
|
|
7
|
+
<key>CFBundleIdentifier</key>
|
|
8
|
+
<string>com.devintel.barefitness</string>
|
|
9
|
+
<key>CFBundleVersion</key>
|
|
10
|
+
<string>21</string>
|
|
11
|
+
<key>UILaunchStoryboardName</key>
|
|
12
|
+
<string>LaunchScreen</string>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rn-bare-fitness",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"android": "react-native run-android",
|
|
7
|
+
"ios": "react-native run-ios",
|
|
8
|
+
"start": "react-native start",
|
|
9
|
+
"test": "jest"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"react": "18.2.0",
|
|
13
|
+
"react-native": "0.74.5",
|
|
14
|
+
"react-native-reanimated": "3.10.1",
|
|
15
|
+
"react-native-vision-camera": "^4.0.0",
|
|
16
|
+
"@react-navigation/native": "^6.1.18"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@react-native/babel-preset": "0.74.85",
|
|
20
|
+
"@react-native/metro-config": "0.74.85",
|
|
21
|
+
"typescript": "5.0.4"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { View, Text, FlatList, Pressable } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export function WorkoutTracker() {
|
|
5
|
+
const [heartRate, setHeartRate] = useState(72);
|
|
6
|
+
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
setInterval(() => {
|
|
9
|
+
setHeartRate((h) => h + 1);
|
|
10
|
+
}, 1000);
|
|
11
|
+
}, []);
|
|
12
|
+
|
|
13
|
+
const sessions = [
|
|
14
|
+
{ id: '1', name: 'VO2 Max Interval', kcal: 640 },
|
|
15
|
+
{ id: '2', name: 'Threshold Tempo', kcal: 510 },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<View style={{ flex: 1, backgroundColor: '#0D0D12', padding: 19 }}>
|
|
20
|
+
<Text style={{ color: '#00FF66', fontSize: 23 }}>⚡ Live HR: {heartRate} BPM</Text>
|
|
21
|
+
<FlatList
|
|
22
|
+
data={sessions}
|
|
23
|
+
renderItem={({ item }) => (
|
|
24
|
+
<Pressable style={{ padding: 13, borderRadius: 15, backgroundColor: '#1B1B22' }}>
|
|
25
|
+
<Text style={{ color: '#FFFFFF' }}>{item.name}</Text>
|
|
26
|
+
</Pressable>
|
|
27
|
+
)}
|
|
28
|
+
/>
|
|
29
|
+
</View>
|
|
30
|
+
);
|
|
31
|
+
}
|