Strategic architecture, tactical design, and testable code principles (SOLID, Clean Architecture, Design Patterns, Testable Design)
97
97%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
The following interface forces multiple client types to depend on methods they never use. Split it to satisfy the Interface Segregation Principle.
// src/IDataStore.ts
export interface IDataStore {
// Used by read-only reporting services
findById(id: string): Promise<Record<string, unknown> | null>
findAll(): Promise<Record<string, unknown>[]>
findByFilter(filter: Record<string, unknown>): Promise<Record<string, unknown>[]>
// Used only by write-capable services
save(id: string, data: Record<string, unknown>): Promise<void>
delete(id: string): Promise<void>
// Used only by admin tools
truncate(): Promise<void>
exportDump(): Promise<string>
importDump(data: string): Promise<void>
}ReportingService calls only findById, findAll, and findByFilter.CrudService calls findById, findAll, save, and delete.AdminMigrationTool calls truncate, exportDump, and importDump.Produce:
IReadableStore.ts, IWritableStore.ts, IAdminStore.ts).isp-analysis.md — explain which client was forced to depend on methods it never uses, and how splitting resolves this.Rules:
IReadableStore must be referenced by ReportingService if you produce a refactored version.clean-architecture
evals
references
design-patterns
solid-principles
testable-design