You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(backend): add snowflake data warehouse integration (#129)
* feat(backend): add snowflake data warehouse integration (LFXV2-671)
- Add SnowflakeService with connection pooling, query execution, and caching
- Implement LockManager for distributed operations and resource coordination
- Add Snowflake-related interfaces, enums, and constants to shared package
- Add comprehensive architecture documentation for Snowflake integration
- Configure environment variables for Snowflake connection
- Add @snowflake-sdk/client dependency
This integration enables server-side data warehouse queries with proper
connection management, query optimization, and distributed locking.
Signed-off-by: Asitha de Silva <[email protected]>
* feat(analytics): implement snowflake integration with error handling
- Add AnalyticsController with three endpoints:
* GET /api/analytics/active-weeks-streak (52 weeks of activity data)
* GET /api/analytics/pull-requests-merged (last 30 days)
* GET /api/analytics/code-commits (last 30 days)
- Implement proper error handling:
* AuthenticationError (401) for missing user email
* ResourceNotFoundError (404) for no analytics data
* Consistent error propagation via next(error)
- Use SQL window functions for accurate aggregations:
* SUM(DAILY_COUNT) OVER () for totals across filtered results
* DATEADD(DAY, -30, CURRENT_DATE()) for 30-day filtering
- Add analytics data interfaces to shared package:
* ActiveWeeksStreakRow/Response
* UserPullRequestsRow/Response
* UserCodeCommitsRow/Response
- Update frontend dashboard with Chart.js visualizations:
* Interactive tooltips with formatted dates and counts
* Real-time data from Snowflake via analytics service
- Update Snowflake integration documentation:
* Focus on service architecture and best practices
* Add examples for parameterized queries and lazy initialization
* Document error handling patterns for callers
- Update .env.example with analytics endpoint usage comments
LFXV2-671
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Asitha de Silva <[email protected]>
* feat(auth): add authelia support and refactor profile to use nats
- Add Authelia OIDC claims middleware for Auth0 compatibility
- Transform standard OIDC claims to Auth0 format
- Only activates for non-Auth0 users (issuer check)
- Maps preferred_username, splits name into given/family
- Modifies user object in-place (not replaceable)
- Refactor profile controller to use NATS exclusively
- Remove Supabase dependency for user profile data
- Construct UserProfile from OIDC token claims
- Use NATS as sole authoritative source for metadata
- Email management methods still use Supabase
- Change user metadata field from 'title' to 'job_title'
- Update UserMetadata interface
- Update frontend components (profile edit, layout, header)
- Update backend validation logic
- Ensure consistent field naming across all layers
- Clean up debug logging
- Remove console.log statement from server.ts
- Simplify authelia userinfo fetch logic
- Minor improvements
- Remove unused 'open' dependency from angular.json
- Fix header component formatting
- Optimize auth-helper to use OIDC data directly
Generated with [Claude Code](https://claude.ai/code)
Signed-off-by: Asitha de Silva <[email protected]>
* build: configure snowflake sdk logging and add to gitignore
- Set Snowflake SDK log level to ERROR by default
- Add SNOWFLAKE_LOG_LEVEL environment variable support
- Prevent snowflake.log from being committed to repository
Signed-off-by: Asitha de Silva <[email protected]>
* fix(server): remove middleware
Signed-off-by: Asitha de Silva <[email protected]>
---------
Signed-off-by: Asitha de Silva <[email protected]>
Co-authored-by: Claude <[email protected]>
0 commit comments