Commit Graph

7 Commits

Author SHA1 Message Date
John Yeo
5d759eba8d feat: new connect flow 2025-10-18 18:10:57 +01:00
John Yeo
98ba9f9841 feat: Add CTE utilities and enhance platform users endpoint
## CTE Utils System
- Created comprehensive CTE (Common Table Expression) builder utilities
- Supports declarative query building with automatic relation handling
- Smart strategy selection between JOIN+GROUP BY and subquery patterns
- Handles nested relations with automatic optimization
- Type-safe query construction with Drizzle ORM

## Platform Users Enhancements
- Refactored to use new CTE utils for cleaner query building
- Added analytics middleware to Hono pipeline
- Improved query param handling with queryStringArray helper
- Changed timestamps from ISO strings to milliseconds for consistency
- Extracted cleanOrgSlug utility function

## Other Improvements
- Added analytics middleware for Hono routes
- Enhanced base middleware with better context handling
- Fixed template literal linting in initHono.ts
- Updated logger for better structured logging
- Added test files for CTE development

## File Changes
- New: server/src/db/cteUtils/ - Complete CTE builder system
- New: server/src/honoMiddlewares/analyticsMiddleware.ts
- Modified: handleListPlatformUsers.ts - Refactored with CTE utils
- Modified: platformModels.ts - Updated types and validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 17:48:10 +01:00
John Yeo
da2693567c chore: ran biome format 2025-09-22 14:45:25 +01:00
Supriyo
d0a3b1eb00 Update orgRelations.ts 2025-08-31 16:31:08 +05:30
John Yeo
b2032dd4e7 finished migration to better auth 2025-06-14 21:47:29 +01:00
John Yeo
e449771158 migrated customer, entity and api key queries to drizzle 2025-05-26 17:09:06 +01:00
John Yeo
f4cb1b2a4c added chatResult handling and updated onboarding flow 2025-05-23 16:14:50 +01:00