diff --git a/app/api/auth/google/callback/route.ts b/app/api/auth/google/callback/route.ts
new file mode 100644
index 0000000..1c5c729
--- /dev/null
+++ b/app/api/auth/google/callback/route.ts
@@ -0,0 +1,56 @@
+import { NextRequest, NextResponse } from 'next/server';
+
+/**
+ * Handle Google OAuth callback
+ * In a real app, this would:
+ * 1. Exchange the authorization code for tokens
+ * 2. Verify the token and get user info from Google
+ * 3. Create or update the user in your database
+ * 4. Set session/cookies
+ * 5. Redirect to the app
+ */
+export async function GET(request: NextRequest) {
+ const searchParams = request.nextUrl.searchParams;
+ const code = searchParams.get('code');
+ const error = searchParams.get('error');
+
+ // Handle errors from Google
+ if (error) {
+ console.error('Google OAuth error:', error);
+ return NextResponse.redirect(new URL('/login?error=google_oauth', request.url));
+ }
+
+ if (!code) {
+ console.error('No authorization code received from Google');
+ return NextResponse.redirect(new URL('/login?error=no_code', request.url));
+ }
+
+ try {
+ // In a real app, you would exchange the code for tokens
+ // and validate the tokens here
+
+ // For this demo, we'll just simulate a successful login
+ // by redirecting with a mock session token
+ const redirectUrl = new URL('/', request.url);
+
+ // Mock user data that would normally come from Google
+ const mockUser = {
+ id: 'google-123456',
+ name: 'Google User',
+ email: 'user@gmail.com',
+ picture: 'https://i.pravatar.cc/150',
+ };
+
+ // In a real app, you would set cookies or session data here
+
+ // Simulate setting a session by adding a URL parameter
+ // In a real app, don't pass sensitive data in URL parameters
+ redirectUrl.searchParams.set('session', 'demo-session-token');
+ redirectUrl.searchParams.set('user', encodeURIComponent(JSON.stringify(mockUser)));
+
+ return NextResponse.redirect(redirectUrl);
+ } catch (error) {
+ console.error('Failed to process Google authentication:', error);
+ return NextResponse.redirect(new URL('/login?error=auth_failed', request.url));
+ }
+}
\ No newline at end of file
diff --git a/app/signup/layout.tsx b/app/signup/layout.tsx
new file mode 100644
index 0000000..3bb84d8
--- /dev/null
+++ b/app/signup/layout.tsx
@@ -0,0 +1,15 @@
+'use client';
+
+import React from 'react';
+
+export default function SignupLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ return (
+
+ {children}
+
+ );
+}
\ No newline at end of file
diff --git a/app/signup/page.tsx b/app/signup/page.tsx
new file mode 100644
index 0000000..4d6864d
--- /dev/null
+++ b/app/signup/page.tsx
@@ -0,0 +1,131 @@
+'use client';
+
+import React, { useState } from 'react';
+import { useRouter } from 'next/navigation';
+import Link from 'next/link';
+import { signInWithGoogle } from '@/lib/auth';
+
+export default function SignupPage() {
+ const [name, setName] = useState('');
+ const [email, setEmail] = useState('');
+ const [password, setPassword] = useState('');
+ const [isSubmitting, setIsSubmitting] = useState(false);
+ const [formError, setFormError] = useState('');
+ const router = useRouter();
+
+ const handleSubmit = async (e: React.FormEvent) => {
+ e.preventDefault();
+ setIsSubmitting(true);
+ setFormError('');
+
+ try {
+ // Here you would connect to your backend API for registration
+ console.log('Signing up', { name, email, password });
+
+ // Simulate successful registration
+ setTimeout(() => {
+ // Redirect to login page with success message
+ router.push('/login?registered=true');
+ }, 1500);
+ } catch (error) {
+ console.error('Signup error:', error);
+ setFormError('Something went wrong. Please try again.');
+ } finally {
+ setIsSubmitting(false);
+ }
+ };
+
+ const handleGoogleSignIn = () => {
+ signInWithGoogle();
+ };
+
+ return (
+
+
+
Sign Up, for free
+
+
+
+
+
+ or
+
+
+
+
+
+ {/* Success message */}
+
+ Thank you! Your submission has been received!
+
+
+ {/* Error message */}
+
+ Oops! Something went wrong while submitting the form.
+