Skip to content

feat: login restyle, passkey login, assoc members#19

Merged
lorenzocorallo merged 11 commits intomainfrom
restyle
Apr 9, 2026
Merged

feat: login restyle, passkey login, assoc members#19
lorenzocorallo merged 11 commits intomainfrom
restyle

Conversation

@lorenzocorallo
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 4, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b3ef6f1f-8ce7-4dac-99b9-a4a5c847b387

📥 Commits

Reviewing files that changed from the base of the PR and between cbaa56c and e93118c.

⛔ Files ignored due to path filters (7)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • src/assets/logo.png is excluded by !**/*.png
  • src/assets/logo.svg is excluded by !**/*.svg
  • src/assets/svg/shapes/big-blue.svg is excluded by !**/*.svg
  • src/assets/svg/shapes/big-teal.svg is excluded by !**/*.svg
  • src/assets/svg/shapes/looper.svg is excluded by !**/*.svg
  • src/assets/svg/shapes/small-blue.svg is excluded by !**/*.svg
📒 Files selected for processing (59)
  • .gitignore
  • package.json
  • src/app/(auth)/layout.tsx
  • src/app/(auth)/login/can-i-access.tsx
  • src/app/(auth)/login/login-button.tsx
  • src/app/(auth)/login/login-form.tsx
  • src/app/(auth)/login/page.tsx
  • src/app/(auth)/login/what-is.tsx
  • src/app/(auth)/onboarding/_layout.tsx
  • src/app/(auth)/onboarding/link/logout.tsx
  • src/app/(auth)/onboarding/link/page.tsx
  • src/app/(auth)/onboarding/link/telegram.tsx
  • src/app/(auth)/onboarding/no-role/page.tsx
  • src/app/dashboard/(active)/account/delete-passkey.tsx
  • src/app/dashboard/(active)/account/page.tsx
  • src/app/dashboard/(active)/account/passkey-button.tsx
  • src/app/dashboard/(active)/assoc/_components/set-assoc-number-dialog.tsx
  • src/app/dashboard/(active)/assoc/columns.tsx
  • src/app/dashboard/(active)/assoc/page.tsx
  • src/app/dashboard/(active)/assoc/table.tsx
  • src/app/dashboard/layout.tsx
  • src/app/layout.tsx
  • src/app/login/login-form.tsx
  • src/app/login/page.tsx
  • src/app/page.tsx
  • src/components/create-assoc-member.tsx
  • src/components/create-tg-user.tsx
  • src/components/data-table.tsx
  • src/components/header-login-button.tsx
  • src/components/header.tsx
  • src/components/logo.tsx
  • src/components/select-users.tsx
  • src/components/shapes.tsx
  • src/components/sidebar/admin-sidebar.tsx
  • src/components/theme-button.tsx
  • src/components/ui/alert-dialog.tsx
  • src/components/ui/avatar.tsx
  • src/components/ui/badge.tsx
  • src/components/ui/breadcrumb.tsx
  • src/components/ui/button.tsx
  • src/components/ui/collapsible.tsx
  • src/components/ui/command.tsx
  • src/components/ui/dialog.tsx
  • src/components/ui/dropdown-menu.tsx
  • src/components/ui/field.tsx
  • src/components/ui/form.tsx
  • src/components/ui/label.tsx
  • src/components/ui/popover.tsx
  • src/components/ui/progress.tsx
  • src/components/ui/select.tsx
  • src/components/ui/separator.tsx
  • src/components/ui/sheet.tsx
  • src/components/ui/sidebar.tsx
  • src/components/ui/tooltip.tsx
  • src/index.css
  • src/lib/auth.ts
  • src/lib/trpc/server.tsx
  • src/lib/trpc/types.tsx
  • src/server/actions/auth.ts

Walkthrough

This PR restructures authentication by moving the login page to an auth route group, adds better-auth passkey support with dedicated management UI, consolidates Radix UI dependencies into a single package, and introduces new components for association member management and field-based form layouts.

Changes

Cohort / File(s) Summary
Auth Routes and Login Flow
src/app/(auth)/layout.tsx, src/app/(auth)/login/page.tsx, src/app/(auth)/login/login-form.tsx, src/app/(auth)/onboarding/...
Added new auth route group with layout wrapper, moved login page and form to (auth) group with email OTP and passkey authentication, updated onboarding file imports.
Dependency Updates
package.json
Updated better-auth to ^1.5.5, added @better-auth/passkey, consolidated Radix UI packages (@radix-ui/react-*) into umbrella radix-ui (^1.4.3), added react-error-boundary, changed @polinetwork/backend to local file reference.
Radix UI Component Migrations
src/components/ui/alert-dialog.tsx, src/components/ui/avatar.tsx, src/components/ui/breadcrumb.tsx, src/components/ui/button.tsx, src/components/ui/collapsible.tsx, src/components/ui/command.tsx, src/components/ui/dialog.tsx, src/components/ui/dropdown-menu.tsx, src/components/ui/form.tsx, src/components/ui/label.tsx, src/components/ui/popover.tsx, src/components/ui/progress.tsx, src/components/ui/select.tsx, src/components/ui/separator.tsx, src/components/ui/sheet.tsx, src/components/ui/sidebar.tsx, src/components/ui/tooltip.tsx
Updated all Radix UI component imports from individual scoped packages to consolidated radix-ui entrypoint; refactored alert-dialog with new size prop and button variant integration.
New UI Components
src/components/ui/field.tsx, src/components/ui/badge.tsx, src/components/shapes.tsx, src/components/logo.tsx
Added reusable field component system with error handling, Badge component with variants, Shape component for decorative SVG backgrounds, and Logo component for branding.
Passkey Management
src/app/dashboard/(active)/account/delete-passkey.tsx, src/app/dashboard/(active)/account/passkey-button.tsx, src/app/dashboard/(active)/account/page.tsx
Added passkey listing and management UI on account page with delete and create passkey functionality, displaying passkey names, creation dates, and action controls.
Association Member Management
src/app/dashboard/(active)/assoc/page.tsx, src/app/dashboard/(active)/assoc/table.tsx, src/app/dashboard/(active)/assoc/columns.tsx, src/app/dashboard/(active)/assoc/_components/set-assoc-number-dialog.tsx, src/components/create-assoc-member.tsx
Added new assoc management page with table display, columns for employee ID/name/email/licenses, member/non-member filtering, sorting, and dialogs for setting association numbers and creating new members.
Layout and Header Updates
src/app/layout.tsx, src/app/dashboard/layout.tsx, src/app/page.tsx, src/components/header.tsx, src/components/header-login-button.tsx
Updated root layout to use Poppins font, dark theme by default, and HydrateClient wrapper; dashboard layout reads sidebar state from cookies; header redesigned with Logo component and responsive layout; added HeaderLoginButton for auth state display.
Authentication Configuration
src/lib/auth.ts, src/server/actions/auth.ts, src/lib/trpc/server.tsx, src/lib/trpc/types.tsx
Added passkey client plugin to auth configuration, created email check server action with error handling, added server-side tRPC hydration utilities and type inference exports.
Removed Features
.gitignore, src/app/login/..., src/components/create-tg-user.tsx, src/components/select-users.tsx
Removed old /login route, CreateTgUser and SelectUsers components; updated gitignore to exclude certificates directory, removed Header from root layout and replaced with HydrateClient.
Miscellaneous Updates
src/components/data-table.tsx, src/components/theme-button.tsx, src/index.css, src/components/sidebar/admin-sidebar.tsx
Updated DataTable generic constraints, disabled ThemeButton with TODO comment, adjusted dark mode background color, added Assoc navigation item to sidebar.

Sequence Diagram

sequenceDiagram
    actor User
    participant Client as Client<br/>(Browser)
    participant Server as Server<br/>(Next.js)
    participant Auth as Auth<br/>(better-auth)
    participant DB as Database

    User->>Client: Navigate to /login
    Client->>Server: GET /login
    Server->>Auth: Check session
    Auth->>DB: Query user session
    DB-->>Auth: No session
    Auth-->>Server: Session null
    Server-->>Client: Render login page

    alt Email OTP Flow
        User->>Client: Enter email
        Client->>Server: Call emailOtp.sendVerificationOtp
        Server->>Auth: Send OTP email
        Auth->>DB: Store OTP
        DB-->>Auth: OTP stored
        Auth-->>Server: Success
        Server-->>Client: Show OTP input

        User->>Client: Enter OTP
        Client->>Server: Call signIn.emailOtp
        Server->>Auth: Verify OTP
        Auth->>DB: Check OTP validity
        DB-->>Auth: OTP valid
        Auth-->>Server: Session created
        Server-->>Client: Success
        Client->>Client: Redirect to /dashboard
    else Passkey Flow
        User->>Client: Click "Login with Passkey"
        Client->>Server: Call signIn.passkey
        Server->>Auth: Passkey authentication
        Auth->>DB: Verify passkey
        DB-->>Auth: Passkey valid
        Auth-->>Server: Session created
        Server-->>Client: Success
        Client->>Client: Redirect to /dashboard
    end

    Client-->>User: Show dashboard
Loading

Possibly related PRs

  • feat: move to OTP Login #17: Modifies the app's login/auth flow by adding/replacing login UI components and updating auth plugin configuration in src/lib/auth.ts.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lorenzocorallo lorenzocorallo marked this pull request as ready for review April 9, 2026 09:30
@lorenzocorallo lorenzocorallo changed the title feat: restyle and other features (TBD) feat: login restyle, passkey login, assoc members Apr 9, 2026
@lorenzocorallo lorenzocorallo merged commit 5041eb2 into main Apr 9, 2026
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