Skip to content

Conversation

@PinJinx
Copy link
Contributor

@PinJinx PinJinx commented Sep 8, 2025

Closes #115

📝 Description

This PR introduces a basic authentication system for the frontend, leveraging Supabase’s built-in email authentication.

🔧 Changes Made

  • Added a new Signup page that allows users to register using an email, password, and username.
  • Updated the Login page to integrate with the same authentication system.
  • Modified App.tsx to automatically log in users once they are successfully authenticated.

📷 Screenshots or Visual Changes (if applicable)

Login Screen

image

SignUp Screen

image

Post-Signup Screen

image

🤝 Collaboration

nil

✅ Checklist

  • I have read the contributing guidelines.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if applicable).
  • Any dependent changes have been merged and published in downstream modules.

Summary by CodeRabbit

  • New Features

    • Supabase-backed auth: sign up, sign in, sign out, session persistence, and auth-aware routing.
    • Password recovery: forgot-password and reset-password flows with validation, feedback, and inbox/confirmation screens.
    • Protected layout and UX: sidebar, toasts, animations, and landing → dashboard navigation.
  • Documentation

    • Added frontend .env example with Supabase placeholders.
  • Chores

    • Added Supabase client dependency and editor config (.vimrc).

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 8, 2025

Walkthrough

Implements Supabase email/password authentication: adds a Supabase client and env placeholders, integrates session handling and auth listeners in App, adds signup/login/forgot/reset pages and routing, updates LandingPage navigation, and includes a small editor config file.

Changes

Cohort / File(s) Summary
Supabase client & env config
frontend/src/lib/supabaseClient.ts, frontend/.env example, frontend/package.json
Adds supabase client initialization, environment placeholders (VITE_SUPABASE_URL, VITE_SUPABASE_KEY, VITE_BASE_URL), and @supabase/supabase-js dependency.
App auth integration & routing
frontend/src/App.tsx
Replaces localStorage auth with Supabase session handling, subscribes to auth state changes, wires Toaster/AnimatePresence, introduces ProtectedLayout and new auth routes.
Auth pages
frontend/src/components/pages/LoginPage.tsx, frontend/src/components/pages/SignUpPage.tsx, frontend/src/components/pages/ForgotPasswrdPage.tsx, frontend/src/components/pages/ResetPasswordPage.tsx
Adds real email/password flows (signInWithPassword, signUp, resetPasswordForEmail, setSession/exchangeCodeForSession, updateUser), client-side validation, loading states, toasts, and navigation.
Landing flow
frontend/src/components/landing/LandingPage.tsx
Switches from parent callback navigation to React Router navigate, removes setActivePage prop, preserves repo fetch and setRepoData.
Profile page minor edit
frontend/src/components/pages/ProfilePage.tsx
Adds an unused DoorClosed import and a whitespace change.
Repo editor config
.vimrc
Adds a single vim configuration line (syntax-highlighting=True).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant App
  participant Supabase
  participant Backend

  rect rgba(225,245,254,0.5)
  note over App: Init - check session & subscribe
  App->>Supabase: auth.getSession()
  Supabase-->>App: session|null
  App->>App: set isAuthenticated
  App->>Supabase: auth.onAuthStateChange(cb)
  end

  rect rgba(232,245,233,0.5)
  note over User,App: Login
  User->>App: submit email/password
  App->>Supabase: signInWithPassword(credentials)
  alt success
    Supabase-->>App: session
    App-->>User: toast success, navigate("/")
  else error
    Supabase-->>App: error
    App-->>User: toast error
  end
  end

  rect rgba(252,228,236,0.5)
  note over User,App: Signup
  User->>App: submit signup form
  App->>Supabase: signUp({email,password},{emailRedirectTo})
  alt success
    Supabase-->>App: confirmation
    App-->>User: show "check inbox"
  else error
    Supabase-->>App: error
    App-->>User: toast error
  end
  end

  rect rgba(255,249,196,0.5)
  note over User,App: Forgot / Reset password
  User->>App: request reset (email)
  App->>Supabase: resetPasswordForEmail(email,{redirectTo})
  Supabase-->>App: ack/error
  App-->>User: confirmation or error

  User->>App: open magic link (tokens/code)
  App->>Supabase: setSession / exchangeCodeForSession
  alt valid
    Supabase-->>App: session set
    User->>App: submit new password
    App->>Supabase: updateUser({password})
    Supabase-->>App: ack/error
    App-->>User: toast + navigate
  else invalid
    App-->>User: toast error, navigate /login
  end
  end

  rect rgba(224,242,241,0.5)
  note over User,Backend: Landing -> Repo fetch
  User->>App: submit repo query
  App->>Backend: POST /api/repo-stats
  Backend-->>App: repo data
  App-->>User: setRepoData, toast, navigate("/dashboard")
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Assessment against linked issues

Objective Addressed Explanation
Implement Supabase email/password signup and login (#115)
Maintain user sessions client-side via Supabase auth (#115)
Redirect users appropriately based on auth status (protected routes) (#115)
Basic error handling for auth flows (invalid login, existing email, etc.) (#115)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Add vim configuration line (.vimrc) (.vimrc) Editor configuration unrelated to authentication objectives in #115.
Unused icon import DoorClosed added (frontend/src/components/pages/ProfilePage.tsx) Cosmetic/unused import not related to auth feature requirements.

Possibly related PRs

Suggested reviewers

  • smokeyScraper

Poem

I thump with glee on login lanes,
New keys from Supabase unlock the plains.
Hop, sign up, and burrow in —
Sessions snug like carrot skin.
Reset the trail, the dashboard waits — I sprint! 🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (21)
.vimrc (2)

1-1: Invalid Vim setting; use standard directive or drop file

syntax-highlighting=True isn’t a valid Vim command. If you need editor config in-repo, prefer syntax on; otherwise remove this file to avoid noise in the root.

Apply:

-syntax-highlighting=True
+syntax on

3-3: Stray character in file

The lone 3 looks accidental. Remove it.

-3
+
frontend/.env example (1)

1-3: Fix .env example formatting and placeholders; consider standard filename

  • Remove spaces around =.
  • Use realistic, copy-pastable values without spaces (or quote them).
  • Consider renaming file to .env.example (convention).
-VITE_SUPABASE_URL=YOUR SUPABASE URL
-VITE_BASE_URL = http://localhost:5173/
-VITE_SUPABASE_KEY=YOUR SUPABASE ANON KEY
+VITE_SUPABASE_URL=https://YOUR-PROJECT.supabase.co
+VITE_BASE_URL=http://localhost:5173
+VITE_SUPABASE_KEY=YOUR-ANON-KEY
frontend/src/lib/supabaseClient.ts (2)

7-9: Throwing at import time can break builds

Throwing during module eval will crash the app immediately (including static builds/tests). Prefer failing fast during app bootstrap or surfacing a user-facing error without crashing the entire bundle.

-if (!supabaseUrl || !supabaseAnonKey) {
-  throw new Error('Missing Supabase configuration. Please set VITE_SUPABASE_URL and VITE_SUPABASE_KEY environment variables.');
-}
+if (!supabaseUrl || !supabaseAnonKey) {
+  // In dev, crash loudly; in production, log and render a friendly screen upstream.
+  if (import.meta.env.DEV) {
+    throw new Error('Missing Supabase configuration. Set VITE_SUPABASE_URL and VITE_SUPABASE_KEY.');
+  } else {
+    // eslint-disable-next-line no-console
+    console.error('Missing Supabase configuration. Auth features will not work.');
+  }
+}

12-12: Add typed client for safer queries

If you generate Supabase types, pass them to createClient for end-to-end type safety.

-export const supabase = createClient(supabaseUrl, supabaseAnonKey)
+// import type { Database } from '../../types/supabase'; // generated via supabase CLI
+export const supabase = createClient/*<Database>*/(supabaseUrl, supabaseAnonKey);

I can add a types generation step and wire it up if desired.

frontend/src/components/landing/LandingPage.tsx (1)

23-27: Avoid hard-coded backend URL; validate input URL

  • Replace http://localhost:8000 with an env-driven base URL.
  • Add basic URL validation before calling the API.
-      const response = await axios.post('http://localhost:8000/api/repo-stats', { repo_url: repoUrl });
+      try { new URL(repoUrl) } catch { toast.error('Enter a valid GitHub repository URL.'); return; }
+      const apiBase = import.meta.env.VITE_API_URL || '/api';
+      const response = await axios.post(`${apiBase}/repo-stats`, { repo_url: repoUrl });

I can add VITE_API_URL to the env example and centralize an axios instance.

frontend/src/components/pages/LoginPage.tsx (3)

1-1: Import React types explicitly to avoid “Cannot find namespace 'React'”

Use named type imports instead of React.* type references without a namespace import.

-import { useState, ReactNode, FormEvent } from "react";
+import { useState } from "react";
+import type { ElementType, InputHTMLAttributes, ReactNode, FormEvent } from "react";

And update the interfaces:

-interface InputFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
-  icon: React.ElementType;
+interface InputFieldProps extends InputHTMLAttributes<HTMLInputElement> {
+  icon: ElementType;
}

54-74: Harden auth call and fix user-facing typo

Wrap Supabase call in try/catch and correct “occured” → “occurred”.

-  const handleLogin = async (e: FormEvent<HTMLFormElement>) => {
+  const handleLogin = async (e: FormEvent<HTMLFormElement>) => {
     e.preventDefault();
     const formData = new FormData(e.currentTarget);
     const email = formData.get('email') as string;
     const password = formData.get('password') as string;
     setIsLoading(true);
-    const {data,error} = await supabase.auth.signInWithPassword({
-      email: email,
-      password: password,
-    });
-    setIsLoading(false);
-    if(data && !error){
-      toast.success('Successfully logged in!');
-      onLogin(); 
-      navigate('/');
-    }
-    else
-    {
-        toast.error(error?.message ||"An Unknown error occured!");
-    }
+    try {
+      const { data, error } = await supabase.auth.signInWithPassword({ email, password });
+      if (error) {
+        toast.error(error.message || 'An unknown error occurred!');
+        return;
+      }
+      toast.success('Successfully logged in!');
+      onLogin();
+      navigate('/');
+    } catch (err) {
+      toast.error('Network error. Please try again.');
+    } finally {
+      setIsLoading(false);
+    }
   };

106-118: “Remember me” is currently a no-op

Supabase persists sessions by default; either wire this to a behavior (e.g., toggle persist) or remove it to reduce confusion.

frontend/src/components/pages/ForgotPasswrdPage.tsx (2)

1-1: Import React types explicitly

Avoid React.* type references without an import.

-import { useState, ReactNode, FormEvent } from "react";
+import { useState } from "react";
+import type { ElementType, InputHTMLAttributes, ReactNode, FormEvent } from "react";

And adjust:

-interface InputFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
-  icon: React.ElementType;
+interface InputFieldProps extends InputHTMLAttributes<HTMLInputElement> {
+  icon: ElementType;
}

49-49: Typo in component/file name

Consider renaming to ForgotPasswordPage for consistency and discoverability.

Please confirm route and import paths if you rename the file and component.

frontend/src/components/pages/ResetPasswordPage.tsx (4)

98-101: Grammar: fix mismatch message

Small UX polish.

-      toast.error("Passwords doesn't match. Try Again");
+      toast.error("Passwords don't match. Try again.");

150-166: Add accessibility and autofill hints on password fields

Improve UX and a11y for password managers and screen readers.

             <InputField
               icon={Key}
               type="password"
               name="password-1"
-              className="mb-7"
+              className="mb-7"
+              autoComplete="new-password"
+              aria-label="New password"
               placeholder="New Password"
               required
             />
             <InputField
               icon={Key}
               type="password"
               name="password-2"
               className="mb-7"
+              autoComplete="new-password"
+              aria-label="Re-enter new password"
               placeholder="Reenter Password"
               required
             />

122-136: Success redirect: confirm desired post-reset behavior

Currently you keep the session and navigate to "/". If security policy requires re-authentication after password change, sign out and redirect to "/login" instead.

Proposed variant:

-      toast.success("Password updated successfully.");
-      navigate("/");
+      toast.success("Password updated successfully.");
+      // If you prefer re-login after reset:
+      // await supabase.auth.signOut();
+      // navigate("/login", { replace: true });
+      navigate("/", { replace: true });

5-5: Nit: import spacing

Consistent formatting with other files.

-import { toast} from "react-hot-toast";
+import { toast } from "react-hot-toast";
frontend/src/components/pages/SignUpPage.tsx (3)

64-67: Grammar: fix mismatch message + spacing

Polish the toast copy.

-      toast.error("Passwords doesn't match.Try Again");
+      toast.error("Passwords don't match. Try again.");

126-154: Add accessibility and autofill hints

Improve UX and a11y.

                 <InputField
                   icon={User}
                   name="name"
+                  autoComplete="username"
+                  aria-label="Username"
                   placeholder="Username"
                   required
                 />
                 <InputField
                   icon={Mail}
                   type="email"
                   name="email"
+                  autoComplete="email"
+                  aria-label="Email address"
                   placeholder="Email address"
                   required
                 />
                 <InputField
                   icon={Lock}
                   type="password"
                   name="password-1"
+                  autoComplete="new-password"
+                  aria-label="Password"
                   placeholder="Password"
                   required
                 />
                 <InputField
                   icon={Lock}
                   type="password"
                   name="password-2"
+                  autoComplete="new-password"
+                  aria-label="Re-enter password"
                   placeholder="Reenter Password"
                   required
                 />

96-97: Ensure VITE_BASE_URL is whitelisted and add a fallback

  • Confirm import.meta.env.VITE_BASE_URL is listed under Supabase Auth → Redirect URLs.
  • (Optional) Mirror the fallback used in ForgotPasswrdPage.tsx:
    frontend/src/components/pages/SignUpPage.tsx:96-97
    - emailRedirectTo: import.meta.env.VITE_BASE_URL,
    + emailRedirectTo: import.meta.env.VITE_BASE_URL || window.location.origin,
frontend/src/App.tsx (3)

38-69: Tighten subscription handling; simplify cleanup

Use the canonical destructuring to avoid double “subscription.subscription”.

-    const { data: subscription } = supabase.auth.onAuthStateChange(
+    const { data: { subscription } } = supabase.auth.onAuthStateChange(
       (event, session) => {
         console.log("Auth event:", event, session);
         switch (event) {
           case "SIGNED_IN":
             setIsAuthenticated(true);
             toast.success("Signed in!");
             break;
@@
         }
       }
     );
 
-    return () => {
-      subscription.subscription.unsubscribe();
-    };
+    return () => subscription.unsubscribe();

29-37: Optional: avoid initial auth flicker

Consider an “authReady” state to prevent momentary redirects before getSession resolves.

High-level idea:

  • const [authReady, setAuthReady] = useState(false);
  • After getSession(), setAuthReady(true);
  • Gate routes on authReady to avoid flashing Login.

114-121: Optional: drop onLogin prop and rely on Supabase events

Since auth state is driven by Supabase, passing onLogin can mask failed logins if misused by the page. Prefer relying solely on SIGNED_IN event.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f31ba33 and 1d3ff52.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (11)
  • .vimrc (1 hunks)
  • frontend/.env example (1 hunks)
  • frontend/package.json (1 hunks)
  • frontend/src/App.tsx (3 hunks)
  • frontend/src/components/landing/LandingPage.tsx (2 hunks)
  • frontend/src/components/pages/ForgotPasswrdPage.tsx (1 hunks)
  • frontend/src/components/pages/LoginPage.tsx (4 hunks)
  • frontend/src/components/pages/ProfilePage.tsx (1 hunks)
  • frontend/src/components/pages/ResetPasswordPage.tsx (1 hunks)
  • frontend/src/components/pages/SignUpPage.tsx (1 hunks)
  • frontend/src/lib/supabaseClient.ts (1 hunks)
🔇 Additional comments (4)
frontend/package.json (2)

21-21: Confirm React Router v7 APIs are fully adopted
Ensure your app uses v7 data‐router patterns:

  • Define routes with createBrowserRouter/RouterProvider
  • Migrate loaders/actions to return response helpers (json(), redirect())
  • Replace useHistory with useNavigate and adopt new hooks (useNavigation, useFetcher, etc.)
  • Import core APIs from react-router (not react-router-dom) and opt into any needed “future” flags

13-13: Confirm compatibility with supabase-js updates
Using ^2.53.0 will install up through v2.57.0, which adds realtime runtime fixes (v2.55.0), enhanced typings, stricter return types, and renames e.g. Gotrue auth methods and storage.signedUrl. Ensure these changes don’t break your code—or pin to 2.53.x / explicitly bump to ^2.57.0 if you’ve already accounted for them.

frontend/src/components/pages/ProfilePage.tsx (1)

4-4: No action needed on this import change

Nothing functionally changed here; skipping review for this line.

frontend/src/components/pages/ForgotPasswrdPage.tsx (1)

64-66: Env var choice for redirect

import.meta.env.VITE_BASE_URL is non-standard and easy to misconfigure. Using window.location.origin ensures an absolute, allowed URL (assuming it’s whitelisted in Supabase auth settings).

Confirm that your Supabase Auth redirect URLs include the deployed origin (e.g., production domain and localhost).

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
frontend/src/components/pages/ResetPasswordPage.tsx (2)

35-43: Resolved: InputField now merges caller className correctly.

The earlier issue about losing caller styles is fixed by extracting and merging className. Nice.


55-106: Resolved: Handles both hash tokens and PKCE code flow.

Good addition of exchangeCodeForSession(code) with URL cleanup; this unblocks password reset across projects.

🧹 Nitpick comments (3)
frontend/src/components/pages/ResetPasswordPage.tsx (3)

50-53: Gate form submission until session is established.

Small race: users could submit before setSession/exchangeCodeForSession completes, making updateUser fail with “No session”. Disable submit until the session is ready.

   const [isLoading, setIsLoading] = useState<boolean>(false);
+  const [isSessionReady, setIsSessionReady] = useState<boolean>(false);
@@
       (async () => {
         try {
           const { error } = await supabase.auth.setSession({
             access_token: accessToken,
             refresh_token: refreshToken,
           });
           if (error) {
             toast.error("Error setting session: " + error.message);
             navigate('/login', { replace: true });
+          } else {
+            setIsSessionReady(true);
           }
@@
       (async () => {
         try {
           const { error } = await supabase.auth.exchangeCodeForSession(code);
           if (error) {
             toast.error("Error exchanging code: " + error.message);
             navigate('/login', { replace: true });
+          } else {
+            setIsSessionReady(true);
           }
@@
-              disabled={isLoading}
+              disabled={isLoading || !isSessionReady}

Also applies to: 68-101, 187-189


115-118: Grammar + strict equality.

Use strict compare and correct the message.

-    if (password != repassword) {
-      toast.error("Passwords doesn't match. Try Again");
+    if (password !== repassword) {
+      toast.error("Passwords don't match. Try again.");
       return;
     }

167-174: Improve UX/a11y: autocomplete, minlength, and aria-labels for password fields.

Helps password managers, native validation, and screen readers.

             <InputField
               icon={Key}
               type="password"
               name="password-1"
               className="mb-7"
               placeholder="New Password"
+              autoComplete="new-password"
+              minLength={8}
+              aria-label="New password"
               required
             />
             <InputField
               icon={Key}
               type="password"
               name="password-2"
               className="mb-7"
               placeholder="Reenter Password"
+              autoComplete="new-password"
+              minLength={8}
+              aria-label="Confirm new password"
               required
             />

Also applies to: 175-182

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d3ff52 and 5dada81.

📒 Files selected for processing (3)
  • frontend/src/components/pages/ForgotPasswrdPage.tsx (1 hunks)
  • frontend/src/components/pages/ResetPasswordPage.tsx (1 hunks)
  • frontend/src/components/pages/SignUpPage.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • frontend/src/components/pages/ForgotPasswrdPage.tsx
  • frontend/src/components/pages/SignUpPage.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/src/components/pages/ResetPasswordPage.tsx (1)
frontend/src/lib/supabaseClient.ts (1)
  • supabase (12-12)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
frontend/src/components/pages/ForgotPasswrdPage.tsx (1)

64-73: Good: success state only on successful API call; errors surfaced

🧹 Nitpick comments (9)
frontend/src/components/pages/ForgotPasswrdPage.tsx (5)

36-46: InputField ignores caller className; add containerClassName and merge classes

Margin class passed at Line 101 is dropped. Merge className and support wrapper spacing.

-const InputField = ({ icon: Icon, ...props }: InputFieldProps) => (
-  <div className="relative">
+const InputField = ({ icon: Icon, className, containerClassName, ...props }: InputFieldProps) => (
+  <div className={`relative ${containerClassName ?? ''}`}>
     <div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
       <Icon className="h-5 w-5 text-gray-400" />
     </div>
     <input
       {...props}
-      className="block w-full pl-10 pr-3 py-2 border border-gray-800 rounded-lg bg-gray-900 text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent"
+      className={`block w-full pl-10 pr-3 py-2 border border-gray-800 rounded-lg bg-gray-900 text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent ${className ?? ''}`}
     />
   </div>
 );

18-20: Add containerClassName prop to the InputField type

 interface InputFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
   icon: React.ElementType;
+  containerClassName?: string;
 }

97-104: Apply wrapper spacing to InputField

-              <InputField
+              <InputField
                 icon={Mail}
                 type="email"
                 name="email"
-                className="mb-7"
+                containerClassName="mb-7"
                 placeholder="Email address"
                 required
               />

49-49: Typos: rename component to ForgotPasswordPage

-export default function ForgotPasswrdPage() {
+export default function ForgotPasswordPage() {

Rename the file and update imports/usages accordingly.


16-35: Reduce duplication: extract AuthLayout to a shared component
This layout is repeated across auth pages; centralize as components/auth/AuthLayout.tsx.

frontend/src/components/pages/SignUpPage.tsx (4)

64-66: Use strict equality and fix copy

-    if (password != repassword) {
-      toast.error("Passwords doesn't match.Try Again");
+    if (password !== repassword) {
+      toast.error("Passwords don't match. Try again.");

59-63: Normalize form inputs (trim email/name)
Avoid accidental whitespace; do not trim passwords.

-    const email = formData.get('email') as string;
-    const name = formData.get('name') as string;
-    const password = formData.get('password-1') as string;
-    const repassword = formData.get('password-2') as string;
+    const email = String(formData.get('email') || '').trim();
+    const name = String(formData.get('name') || '').trim();
+    const password = String(formData.get('password-1') || '');
+    const repassword = String(formData.get('password-2') || '');

128-156: Add autocomplete hints for better UX

                 <InputField
                   icon={User}
                   name="name"
+                  autoComplete="username"
                   placeholder="Username"
                   required
                 />
                 <InputField
                   icon={Mail}
                   type="email"
                   name="email"
+                  autoComplete="email"
                   placeholder="Email address"
                   required
                 />
                 <InputField
                   icon={Lock}
                   type="password"
                   name="password-1"
+                  autoComplete="new-password"
                   placeholder="Password"
                   required
                 />
                 <InputField
                   icon={Lock}
                   type="password"
                   name="password-2"
+                  autoComplete="new-password"
                   placeholder="Reenter Password"
                   required
                 />

25-36: Extract AuthLayout/InputField to shared components
These are duplicated across auth pages; move to shared components to keep styling and behavior in one place.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aceaaf2 and b7aebcf.

📒 Files selected for processing (3)
  • frontend/src/components/pages/ForgotPasswrdPage.tsx (1 hunks)
  • frontend/src/components/pages/ResetPasswordPage.tsx (1 hunks)
  • frontend/src/components/pages/SignUpPage.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/components/pages/ResetPasswordPage.tsx
🧰 Additional context used
🧬 Code graph analysis (2)
frontend/src/components/pages/ForgotPasswrdPage.tsx (1)
frontend/src/lib/supabaseClient.ts (1)
  • supabase (12-12)
frontend/src/components/pages/SignUpPage.tsx (2)
frontend/src/lib/supabaseClient.ts (1)
  • supabase (12-12)
backend/app/core/config/settings.py (1)
  • Settings (8-51)
🔇 Additional comments (2)
frontend/src/components/pages/ForgotPasswrdPage.tsx (1)

64-66: Verify Supabase redirect URL configuration
Ensure VITE_BASE_URL (or window.origin) exactly matches an allowed site URL in Supabase Auth settings and that /reset-password is permitted; otherwise the link may fail at runtime.

frontend/src/components/pages/SignUpPage.tsx (1)

90-98: Confirm emailRedirectTo validity
Ensure the value resolves to an absolute URL allowed in Supabase Auth settings (Site URL/Redirect URLs) to prevent broken confirmation links.

Copy link
Contributor

@smokeyScraper smokeyScraper left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you very much for your contribution, @PinJinx!
Cheers!

@smokeyScraper smokeyScraper merged commit eba8112 into AOSSIE-Org:main Sep 8, 2025
1 check passed
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.

FEATURE REQUEST:Adding an Authentication System

2 participants