From c472c108dc24f6b9b928e64f3fcef47b0b991573 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 03:15:03 +0000 Subject: [PATCH 1/4] Add src/app/create-account/page.tsx --- src/app/create-account/page.tsx | 318 ++++++++++++++++++++++++++++++++ 1 file changed, 318 insertions(+) create mode 100644 src/app/create-account/page.tsx diff --git a/src/app/create-account/page.tsx b/src/app/create-account/page.tsx new file mode 100644 index 0000000..9008170 --- /dev/null +++ b/src/app/create-account/page.tsx @@ -0,0 +1,318 @@ +"use client"; + +import { useState } from "react"; +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered'; +import FooterBase from '@/components/sections/footer/FooterBase'; +import Input from '@/components/form/Input'; +import { Mail, Lock, User, CheckCircle } from 'lucide-react'; + +export default function CreateAccountPage() { + const [formData, setFormData] = useState({ + firstName: "", lastName: "", email: "", password: "", confirmPassword: "" + }); + const [errors, setErrors] = useState>({}); + const [isSubmitting, setIsSubmitting] = useState(false); + const [passwordStrength, setPasswordStrength] = useState<'weak' | 'fair' | 'strong' | ''>(''); + + const calculatePasswordStrength = (password: string) => { + if (!password) { + setPasswordStrength(''); + return; + } + if (password.length < 8) { + setPasswordStrength('weak'); + } else if (password.length < 12 || !/[A-Z]/.test(password) || !/[0-9]/.test(password)) { + setPasswordStrength('fair'); + } else { + setPasswordStrength('strong'); + } + }; + + const validateForm = () => { + const newErrors: Record = {}; + + if (!formData.firstName.trim()) { + newErrors.firstName = "First name is required"; + } + + if (!formData.lastName.trim()) { + newErrors.lastName = "Last name is required"; + } + + if (!formData.email) { + newErrors.email = "Email is required"; + } else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(formData.email)) { + newErrors.email = "Please enter a valid email"; + } + + if (!formData.password) { + newErrors.password = "Password is required"; + } else if (formData.password.length < 8) { + newErrors.password = "Password must be at least 8 characters"; + } else if (!/[A-Z]/.test(formData.password)) { + newErrors.password = "Password must contain at least one uppercase letter"; + } else if (!/[0-9]/.test(formData.password)) { + newErrors.password = "Password must contain at least one number"; + } + + if (!formData.confirmPassword) { + newErrors.confirmPassword = "Please confirm your password"; + } else if (formData.password !== formData.confirmPassword) { + newErrors.confirmPassword = "Passwords do not match"; + } + + setErrors(newErrors); + return Object.keys(newErrors).length === 0; + }; + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + if (!validateForm()) { + return; + } + + setIsSubmitting(true); + try { + // Simulate API call + await new Promise(resolve => setTimeout(resolve, 1000)); + console.log("Account creation with:", formData); + // Handle successful account creation + } finally { + setIsSubmitting(false); + } + }; + + const handleInputChange = (field: string, value: string) => { + setFormData(prev => ({ ...prev, [field]: value })); + if (field === 'password') { + calculatePasswordStrength(value); + } + }; + + return ( + + + +
+
+
+

Create Your Account

+

Join thousands of traders improving their performance

+
+ +
+
+
+ + handleInputChange('firstName', value)} + type="text" + placeholder="John" + required + className="w-full" + /> + {errors.firstName && ( +

{errors.firstName}

+ )} +
+ +
+ + handleInputChange('lastName', value)} + type="text" + placeholder="Doe" + required + className="w-full" + /> + {errors.lastName && ( +

{errors.lastName}

+ )} +
+
+ +
+ + handleInputChange('email', value)} + type="email" + placeholder="you@example.com" + required + className="w-full" + /> + {errors.email && ( +

{errors.email}

+ )} +
+ +
+ + handleInputChange('password', value)} + type="password" + placeholder="Create a strong password" + required + className="w-full" + /> + {formData.password && ( +
+
+
+
+
+
+ + {passwordStrength === 'weak' && 'Weak'} + {passwordStrength === 'fair' && 'Fair'} + {passwordStrength === 'strong' && 'Strong'} + +
+ )} + {errors.password && ( +

{errors.password}

+ )} +

+ Password must be at least 8 characters with uppercase letters and numbers +

+
+ +
+ + handleInputChange('confirmPassword', value)} + type="password" + placeholder="Re-enter your password" + required + className="w-full" + /> + {errors.confirmPassword && ( +

{errors.confirmPassword}

+ )} +
+ +
+ + +
+ + + + +
+

+ Already have an account?{" "} + + Sign in + +

+
+
+
+ + + + ); +} \ No newline at end of file -- 2.49.1 From 5851115755c9fd09fb5c6101c5a94dd15fb75f84 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 03:15:03 +0000 Subject: [PATCH 2/4] Add src/app/dashboard/page.tsx --- src/app/dashboard/page.tsx | 185 +++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 src/app/dashboard/page.tsx diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx new file mode 100644 index 0000000..208012f --- /dev/null +++ b/src/app/dashboard/page.tsx @@ -0,0 +1,185 @@ +"use client"; + +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered'; +import FeatureCardEight from '@/components/sections/feature/FeatureCardEight'; +import MetricCardSeven from '@/components/sections/metrics/MetricCardSeven'; +import TestimonialCardSixteen from '@/components/sections/testimonial/TestimonialCardSixteen'; +import FooterBase from '@/components/sections/footer/FooterBase'; +import { TrendingUp, BarChart3, PieChart, Activity, Target, DollarSign, AlertCircle, CheckCircle } from 'lucide-react'; + +export default function DashboardPage() { + return ( + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + +
+ ); +} \ No newline at end of file -- 2.49.1 From 2348fc6351d4fb927c1408c2966545cac456af58 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 03:15:04 +0000 Subject: [PATCH 3/4] Add src/app/login/page.tsx --- src/app/login/page.tsx | 189 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 src/app/login/page.tsx diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx new file mode 100644 index 0000000..0e2c4a0 --- /dev/null +++ b/src/app/login/page.tsx @@ -0,0 +1,189 @@ +"use client"; + +import { useState } from "react"; +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered'; +import FooterBase from '@/components/sections/footer/FooterBase'; +import Input from '@/components/form/Input'; +import { Mail, Lock } from 'lucide-react'; + +export default function LoginPage() { + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const [errors, setErrors] = useState<{ email?: string; password?: string }>({}); + const [isSubmitting, setIsSubmitting] = useState(false); + + const validateForm = () => { + const newErrors: { email?: string; password?: string } = {}; + + if (!email) { + newErrors.email = "Email is required"; + } else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) { + newErrors.email = "Please enter a valid email"; + } + + if (!password) { + newErrors.password = "Password is required"; + } else if (password.length < 6) { + newErrors.password = "Password must be at least 6 characters"; + } + + setErrors(newErrors); + return Object.keys(newErrors).length === 0; + }; + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + if (!validateForm()) { + return; + } + + setIsSubmitting(true); + try { + // Simulate API call + await new Promise(resolve => setTimeout(resolve, 1000)); + console.log("Login attempt with:", { email, password }); + // Handle successful login + } finally { + setIsSubmitting(false); + } + }; + + return ( + + + +
+
+
+

Welcome Back

+

Sign in to your TradeLogs account

+
+ +
+
+ + + {errors.email && ( +

{errors.email}

+ )} +
+ +
+ + + {errors.password && ( +

{errors.password}

+ )} +
+ +
+ + + Forgot password? + +
+ + +
+ +
+

+ Don't have an account?{" "} + + Create one + +

+
+
+
+ + +
+ ); +} \ No newline at end of file -- 2.49.1 From 8d45975582ebd22636ce15be3cedbab981261a8b Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 03:15:04 +0000 Subject: [PATCH 4/4] Update src/app/page.tsx --- src/app/page.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/page.tsx b/src/app/page.tsx index 1cd1efe..6654bfa 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -33,6 +33,7 @@ export default function LandingPage() { { name: "Pricing", id: "pricing" }, { name: "Testimonials", id: "testimonials" }, { name: "FAQ", id: "faq" }, + { name: "Dashboard", id: "/dashboard" }, { name: "Contact", id: "contact" } ]} button={{ text: "Start Free Trial", href: "contact" }} -- 2.49.1