-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Issue Summary
While implementing the new PR for Gemeni, I discovered multiple code duplications that need refactoring to improve maintainability. These duplications became apparent when adding new Services.
Areas Requiring Refactoring
-
Environment and Configuration Files
- Consolidate to one general workflow per service in
.env, Dockerfile, and docker-compose
- Consolidate to one general workflow per service in
-
API Route Handlers
- Remove multiple references to
/webhook/dataengineering-commoninsrc/app/api/n8n/health/[type]/route.ts - All references should point to a single n8n service for the first service
- Remove multiple references to
-
Availability Checking Functions
- The
check***Availabilityfunctions follow nearly identical patterns and should be refactored into a common implementation
- The
-
Additional Route Handler Duplications
- Apply same refactoring to
src/app/api/n8n/workflows/[type]/route.ts - Apply same refactoring to
src/services/n8nService.ts
- Apply same refactoring to
-
Connection Handling
- In
src/components/ConnectionSelector.tsx, thehasKeyfunction can be standardized across all services - In
src/services/connectionValidator.ts, thevalidatefunction can be unified with parameters for API URL or using a switch statement
- In
Next Steps
Consolidate duplicate code into shared utility functions and standardize service handling approaches.
peekknuf
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request