Commit Graph

9 Commits

Author SHA1 Message Date
John Yeo
7caa35b069 fix: prepaid allocated tracking 2026-01-28 15:17:13 +00:00
Charlie Lamb
d1b3a281f1 chore: initial knip changes 2026-01-28 10:13:01 +00:00
amianthus
44221c50d5 feat: 🎸 better oauth 2026-01-13 16:08:14 +00: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
John Yeo
8f78c12ddd join org invitation 2025-09-05 14:23:40 -07:00
Supriyo
a4f658ea68 Update auth-relations.ts 2025-08-31 16:31:31 +05:30
John Yeo
61cf07c2f9 feat: create customer with stripe ID and exchange with org slug 2025-08-16 08:10:40 -07:00
John Yeo
b2032dd4e7 finished migration to better auth 2025-06-14 21:47:29 +01:00