marko-kraemer
|
98e9196d41
|
refactor: simplify backend - fix naming conflicts and centralize DB dependencies
Backend improvements:
- Fixed duplicate TemplateService naming conflict:
* Renamed marketplace_service.py::TemplateService → MarketplaceService
* Eliminates confusion between two classes with same name
- Created centralized DB dependency helpers (db_helpers.py):
* get_db() - FastAPI dependency for DB connection (singleton)
* get_db_client() - Returns initialized Supabase client
* get_initialized_db() - For module-level backward compatibility
* Addresses 100+ DBConnection() instantiations across 53 files
- Applied new DB helpers to high-usage files:
* services/api_keys_api.py - Now uses get_db() dependency
* templates/services/marketplace_service.py - Uses get_initialized_db()
- Comprehensive simplification analysis document:
* Identified 9 modules with duplicate initialize() patterns
* Documented large files needing breakdown (1700-2000 lines)
* Analyzed 35 tool files for common patterns
* Prioritized recommendations for future work
Frontend cleanup:
- Removed unused template preview components and pages
|
2025-10-04 22:40:16 +02:00 |
marko-kraemer
|
8d7e85de4c
|
refactor: massive backend simplification - eliminate 450+ lines of duplicate code
- Created unified AgentLoader for all agent data operations
- Eliminated 8 manual AgentResponse constructions across codebase
- Reduced agent_runs.py complexity by 163 lines (85→35 lines in 2 functions)
- Reduced core_utils.py from 553→69 lines (-87%)
- Extracted focused utility modules:
* utils/icon_generator.py (179 lines)
* utils/limits_checker.py (245 lines)
* utils/run_management.py (145 lines)
* utils/project_helpers.py (113 lines)
* utils/mcp_helpers.py (41 lines)
- Fixed duplicate router inclusions in api.py
- Renamed template_service.py → marketplace_service.py for clarity
- Reduced template transformer from 73→17 lines (-77%)
- Inlined module-specific helpers (moved agent_run access check)
- Fixed version data false alarm warnings
- Updated AgentResponse model to support optional fields for list operations
Total impact: ~450 lines of duplicate code eliminated, dramatically improved maintainability
|
2025-10-04 22:32:51 +02:00 |
Saumya
|
4908f174d6
|
chore: research agent v1
|
2025-09-30 20:53:55 +05:30 |
marko-kraemer
|
bc6620569f
|
rm general tab, integrations tab default
|
2025-09-29 14:12:45 +02:00 |
Saumya
|
886d9f99b4
|
feat: remove agent descriptions
|
2025-09-28 00:01:17 +05:30 |
marko-kraemer
|
f73d0f5db6
|
mv around files, update imports
|
2025-09-03 22:40:25 -07:00 |