This PR introduces Clerk for user authentication, including Google Calendar OAuth, and significantly enhances application performance by optimizing navigation and routing. **Problem/Issue/Goal:**
•**Navigation Performance:** State-based navigation led to full page redraws and poor performance, especially for the sidebar.
•**Authentication:** Lacked a robust and secure user authentication system with OAuth capabilities (e.g., Google Calendar).
•**Clerk Integration Issues:** Initial Clerk setup faced problems like blocking loading states, incorrect redirect handling, and infinite loading loops.
**Fix/Solution:**
•**Optimized Navigation:** Converted sidebar to URL-based routing and implemented scoped view transitions to prevent full page redraws, resulting in smoother navigation.
•**Clerk Authentication:** Integrated Clerk for user authentication, including `ClerkProvider`, middleware, and server actions for Google Calendar OAuth.
•**Improved Auth Flow:** Refined Clerk's authentication flow by removing blocking loading states, utilizing Clerk's built-in components, and configuring dedicated sign-in/sign-up pages with correct redirect URLs.
+ 2 more lines...