Skip to content

Refactor auth, calendar, and nango API crates#3728

Merged
yujonglee merged 1 commit intomainfrom
refactor/api-auth-calendar-separation
Feb 8, 2026
Merged

Refactor auth, calendar, and nango API crates#3728
yujonglee merged 1 commit intomainfrom
refactor/api-auth-calendar-separation

Conversation

@yujonglee
Copy link
Contributor

@yujonglee yujonglee commented Feb 8, 2026

Summary

  • Extract shared SupabaseEnv and NangoEnv config types into new api-env crate
  • Add AuthContext (token + claims) to api-auth middleware, remove all duplicated extract_token helpers from api-nango and api-subscription
  • Move calendar routes and nango_http from api-nango into api-calendar
  • Add list_calendars and create_event endpoints to api-calendar
  • Replace hardcoded NangoIntegration enum with fluent client.integration("...").connection("...") API
  • Simplify config constructors across crates to accept env structs directly instead of individual strings + builder chains
  • Add GoogleCalendar, CreateEventBody, CreateEventRequest types to google-calendar crate

Made with Cursor


Open with Devin

- Extract shared env config types (SupabaseEnv, NangoEnv) into new api-env crate
- Introduce AuthContext in api-auth middleware, removing duplicated extract_token helpers across crates
- Move calendar routes and nango_http from api-nango to api-calendar where they belong
- Add list_calendars and create_event endpoints to api-calendar
- Replace hardcoded NangoIntegration enum with fluent client.integration().connection() API
- Simplify config constructors to accept env structs directly

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify
Copy link

netlify bot commented Feb 8, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 1951e73
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/698830a37a7dc70008ab82cc

@netlify
Copy link

netlify bot commented Feb 8, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 1951e73
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/698830a5c6881b0008da587f

@yujonglee
Copy link
Contributor Author

Contains lot of learnings from #3665

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

View 6 additional findings in Devin Review.

Open in Devin Review

@yujonglee yujonglee merged commit 2a39f7e into main Feb 8, 2026
23 checks passed
@yujonglee yujonglee deleted the refactor/api-auth-calendar-separation branch February 8, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant