Skip to content

X/auth page#54

Merged
cherman23 merged 1 commit into
mainfrom
x/auth-page
Oct 19, 2025
Merged

X/auth page#54
cherman23 merged 1 commit into
mainfrom
x/auth-page

Conversation

@cherman23
Copy link
Copy Markdown
Collaborator

@cherman23 cherman23 commented Oct 17, 2025

[CRM Frontend] - Auth pages

Changes

Creates a login and signup page along with server actions to handle these functions. Adds endpoints for auth to the backend

Notes

Does not include text for resetting password.

Screenshots

Place screenshots here

image image

Checklist

Please go through all items before requesting reviewers:

  • All commits are tagged with the ticket number
  • No linting errors / newline warnings
  • All code follows repository-configured formatting
  • No merge conflicts
  • All checks passing
  • Screenshots included for UI changes
  • Remove non-applicable sections of this template
  • PR assigned to yourself
  • Reviewers requested & Slack ping sent
  • PR linked to the issue (fill in 'Closes #')
  • If design-related, notify the designer in Slack

Closes

Closes #

@cherman23 cherman23 requested review from bderbs30 and Copilot October 17, 2025 13:22
Copy link
Copy Markdown
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 implements authentication functionality for a CRM frontend application, adding login and signup pages with server actions and backend auth endpoints.

  • Creates comprehensive authentication flow with login/signup pages and form validation
  • Implements server actions for handling authentication with proper error handling and redirects
  • Updates user schemas and controllers to support new authentication requirements

Reviewed Changes

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

Show a summary per file
File Description
src/middleware.ts Adds blank line for code formatting
src/lib/schemas/user.schema.ts Updates user schema to support login/signup with new password field and validation
src/lib/controllers/user.controller.ts Modifies user creation to properly map password field to hashedPassword
src/lib/auth/auth-service.ts Implements signup and loginAction server functions with form validation
src/lib/auth/auth-client.tsx Creates placeholder file for future React context implementation
src/app/layout.tsx Updates app metadata with proper title and description
src/app/globals.css Implements custom styling with Inter font and Sarge brand colors
src/app/(web)/dashboard/page.tsx Removes old dashboard implementation
src/app/(web)/(user)/dashboard/page.tsx Creates new authenticated dashboard showing user name
src/app/(web)/(auth)/signup/page.tsx Implements complete signup form with validation and error handling
src/app/(web)/(auth)/login/page.tsx Implements complete login form with validation and error handling

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

Comment on lines +18 to +22
data: {
name: validatedUser.name,
email: validatedUser.email,
hashedPassword: validatedUser.password,
},
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

The password is being stored directly as hashedPassword without hashing. This should hash the password using bcrypt before storing it in the database.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

erm

Comment thread src/app/(web)/(auth)/signup/page.tsx
Comment thread src/app/(web)/(auth)/login/page.tsx
Comment thread src/app/(web)/(auth)/signup/page.tsx
Comment on lines +26 to +28
if (state && !state.success && Object.keys(state.errors).length === 0 && state.message) {
alert(state.message);
}
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Using alert() for error messages provides poor user experience. Consider using a toast notification or inline error display instead.

Copilot uses AI. Check for mistakes.
@cherman23 cherman23 self-assigned this Oct 19, 2025
Copy link
Copy Markdown
Collaborator

@bderbs30 bderbs30 left a comment

Choose a reason for hiding this comment

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

lgtm (lets get this moon) gru approved

@cherman23 cherman23 merged commit 8f2f87f into main Oct 19, 2025
2 checks passed
@bderbs30 bderbs30 deleted the x/auth-page branch November 5, 2025 03:21
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.

3 participants