diff --git a/backend/.gitignore b/backend/.gitignore
new file mode 100644
index 0000000..2eea525
--- /dev/null
+++ b/backend/.gitignore
@@ -0,0 +1 @@
+.env
\ No newline at end of file
diff --git a/backend/src/routes/authRoutes.ts b/backend/src/routes/authRoutes.ts
index c56964a..071d48a 100644
--- a/backend/src/routes/authRoutes.ts
+++ b/backend/src/routes/authRoutes.ts
@@ -1,5 +1,5 @@
import express from "express";
-import { registerUser, loginUser, getUserProfile } from "../controllers/authController.js";
+import { registerUser, loginUser, getUserProfile} from "../controllers/authController.js";
import passport from "passport";
import { protect } from "../middleware/authMiddleware.js";
@@ -17,7 +17,7 @@ router.get(
router.get(
"/google/callback",
passport.authenticate("google", { session: false, failureRedirect: process.env.FRONTEND_URL ? `${process.env.FRONTEND_URL}/signin` : "/signin" }),
- oauthCallback
+
);
// GitHub OAuth
@@ -28,7 +28,7 @@ router.get(
router.get(
"/github/callback",
passport.authenticate("github", { session: false, failureRedirect: process.env.FRONTEND_URL ? `${process.env.FRONTEND_URL}/signin` : "/signin" }),
- oauthCallback
+
);
export default router;
\ No newline at end of file
diff --git a/frontend/src/assets/loader.gif b/frontend/src/assets/loader.gif
new file mode 100644
index 0000000..ce80a45
Binary files /dev/null and b/frontend/src/assets/loader.gif differ
diff --git a/frontend/src/pages/RoomActions.tsx b/frontend/src/pages/RoomActions.tsx
index 5dccac5..a528513 100644
--- a/frontend/src/pages/RoomActions.tsx
+++ b/frontend/src/pages/RoomActions.tsx
@@ -23,7 +23,6 @@ export default function RoomActions() {
});
setUser(res.data.user);
} catch (err) {
- // invalid token or user not found
localStorage.removeItem("token");
navigate("/signin");
} finally {
@@ -41,34 +40,46 @@ export default function RoomActions() {
navigate("/");
};
- if (loading) return
Loading...
;
+ if (loading)
+ return (
+
+ );
return (
-
-
-
Room Actions
-
Hello {user?.name ?? "user"}, choose an action:
+
+
+
+ Room Actions
+
+
+ π Hello {user?.name ?? "Guest"}, what would you like to do today?
+
-
+
+ {/* Join Room */}
+ {/* Create Room */}
+ {/* Logout */}
diff --git a/frontend/src/pages/Signin.tsx b/frontend/src/pages/Signin.tsx
index 151c257..05a3822 100644
--- a/frontend/src/pages/Signin.tsx
+++ b/frontend/src/pages/Signin.tsx
@@ -24,7 +24,12 @@ interface SignInData {
const SignIn = () => {
const [isLoading, setIsLoading] = useState(false);
const navigate = useNavigate();
- const { register, handleSubmit, formState: { errors }, reset } = useForm
();
+ const {
+ register,
+ handleSubmit,
+ formState: { errors },
+ reset,
+ } = useForm();
const onSubmit = async (data: SignInData) => {
setIsLoading(true);
@@ -40,7 +45,6 @@ const SignIn = () => {
description: response.data.message || "Login successful",
});
- // store JWT token in localStorage
if (response.data.token) {
localStorage.setItem("token", response.data.token);
}
@@ -50,7 +54,9 @@ const SignIn = () => {
} catch (error: any) {
toast({
title: "Error",
- description: error.response?.data?.message || "Login failed. Please try again.",
+ description:
+ error.response?.data?.message ||
+ "Login failed. Please try again.",
variant: "destructive",
});
} finally {
@@ -59,19 +65,19 @@ const SignIn = () => {
};
return (
-
-
+
+
-
+
PeerCall
- Sign in to your account
+ Sign in to continue to your account
-
-
+
- Or continue with
+ β Or continue with β
-
-
- Don't have an account?{" "}
+
+
+ Donβt have an account?{" "}
Sign Up
diff --git a/frontend/src/pages/Signup.tsx b/frontend/src/pages/Signup.tsx
index 6a4c6ff..5541c3c 100644
--- a/frontend/src/pages/Signup.tsx
+++ b/frontend/src/pages/Signup.tsx
@@ -47,7 +47,6 @@ const SignUp = () => {
setIsLoading(true);
try {
- // Derive name from email (part before @)
const name = data.email.split("@")[0];
const response = await axios.post(
@@ -64,10 +63,10 @@ const SignUp = () => {
toast({
title: "Success!",
- description: response.data.message || "Registration successful",
+ description:
+ response.data.message || "Account created successfully. Welcome!",
});
- // Optional: save token for auto-login
if (response.data.token) {
localStorage.setItem("token", response.data.token);
}
@@ -78,7 +77,8 @@ const SignUp = () => {
toast({
title: "Error",
description:
- error.response?.data?.message || "Registration failed. Please try again.",
+ error.response?.data?.message ||
+ "Registration failed. Please try again.",
variant: "destructive",
});
} finally {
@@ -87,10 +87,10 @@ const SignUp = () => {
};
return (
-
-
+
+
-
+
PeerCall
@@ -99,7 +99,7 @@ const SignUp = () => {
-
-
-
+
+
Already have an account?{" "}
Sign In