Skip to content

Conversation

@joshuasilva414
Copy link
Collaborator

@linear
Copy link

linear bot commented Oct 17, 2025

LRN-10

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the authentication and authorization setup by migrating from NextAuth to better-auth, switching the database provider from PostgreSQL to SQLite, and reorganizing the safe action client implementation with improved type safety.

  • Migrated authentication system from NextAuth to better-auth
  • Restructured database schema with separate auth tables and user data tables
  • Implemented role-based authorization with admin and protected action clients

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/lib/types.ts Defines role types used across authentication and authorization
src/lib/safe-action.ts Replaces ActionClient.ts with improved safe action client implementation using better-auth
src/lib/auth.ts Updates auth configuration to use better-auth with SQLite adapter
src/lib/auth-client.ts Updates client configuration to use environment variable for base URL
src/lib/ActionClient.ts Removed file - replaced by safe-action.ts
src/db/schema.ts Refactors schema to define user_data table with foreign key to auth users table
src/db/index.ts Updates database client to include auth-schema in the schema configuration
src/db/auth-schema.ts Adds better-auth required tables (users, sessions, accounts, verifications)
src/app/admin/courses/create/page.tsx Adds placeholder page component for course creation
package.json Adds Drizzle Kit database management scripts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

joshuasilva414 and others added 4 commits October 17, 2025 13:25
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@joshuasilva414 joshuasilva414 merged commit 45d98da into main Oct 20, 2025
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.

2 participants