import { useState, useEffect } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import { useAuth } from '../components/AuthContext'; import toast from 'react-hot-toast'; export const Register = () => { const [fullName, setFullName] = useState(''); const [companyName, setCompanyName] = useState(''); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [confirmPassword, setConfirmPassword] = useState(''); const [showPassword, setShowPassword] = useState(false); const [showConfirmPassword, setShowConfirmPassword] = useState(false); const [agreeTerms, setAgreeTerms] = useState(false); const [error, setError] = useState(''); const [loading, setLoading] = useState(false); const [legalModal, setLegalModal] = useState(null); const { login } = useAuth(); const navigate = useNavigate(); useEffect(() => { // Remove dark mode to enforce the white theme document.documentElement.classList.remove('dark'); }, []); const handleSubmit = async (e) => { e.preventDefault(); setError(''); if (!fullName.trim() || !companyName.trim() || !email.trim() || !password || !confirmPassword) { setError('All fields are compulsory. Please fill in all required details.'); return; } if (password.length < 8 || !/[A-Z]/.test(password) || !/[a-z]/.test(password) || !/[^A-Za-z0-9]/.test(password)) { setError('Password must meet all 4 security requirements.'); return; } if (password !== confirmPassword) { setError('Passwords do not match.'); return; } if (!agreeTerms) { setError('You must agree to the Terms of Service and Privacy Policy.'); return; } setLoading(true); try { const res = await fetch('/api/auth/register', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email, password }) }); const data = await res.json(); if (res.ok) { toast.success('Account created successfully! Please sign in with your credentials.'); navigate('/login', { state: { email } }); } else { setError(data.message || 'Registration failed. Please try again.'); } } catch (err) { setError('Could not establish connection to the security server API.'); console.error(err); } finally { setLoading(false); } }; return (
{/* Left Side: Branding & Visual Context */}
{/* Background Gradients - Shifted to edges for pure crisp white image canvas */}
{/* Brand Anchor */}
LarShield Logo
LarShield
{/* Value Proposition */}
{/* Seamless 3D Shield Podium Graphic - Shifted right & zero background mismatch */}
LarShield Enterprise 3D Podium

Secure your infrastructure with confidence.

Join elite engineering teams deploying LarShield to monitor complex threat vectors in real-time. Fast, reliable, and exceptionally accurate.

CISO
SEC
+1K

Trusted by 2,000+ Enterprises

Global security leaders

{/* Right Side: Registration Form Canvas */}
{/* Contextual Navigation */}
Already have an account? Sign in arrow_forward
{/* Form Container */}
{/* Shield Logo Graphic above Create an Account */}
LarShield Symbol Logo
{/* Mobile Brand Anchor */}
LarShield Security
{/* Header */}

Create an Account

Get started by creating your administrative profile.

{/* Error Alert Box */} {error && (
warning
{error}
)} {/* Registration Form */}
{/* Row 1: Identity */}
setFullName(e.target.value)} />
setCompanyName(e.target.value)} />
{/* Row 2: Email */}
mail
setEmail(e.target.value)} />
{/* Row 3: Passwords */}
lock
setPassword(e.target.value)} />
verified_user
setConfirmPassword(e.target.value)} />
{/* Password Validation Checklist - Only shown when typing password */} {password.length > 0 && (
= 8 ? 'text-emerald-600 font-semibold' : 'text-slate-500'}`}> {password.length >= 8 ? 'check_circle' : 'radio_button_unchecked'} At least 8 characters
{/[A-Z]/.test(password) ? 'check_circle' : 'radio_button_unchecked'} One uppercase letter
{/[a-z]/.test(password) ? 'check_circle' : 'radio_button_unchecked'} One lowercase letter
{/[^A-Za-z0-9]/.test(password) ? 'check_circle' : 'radio_button_unchecked'} One special character
)} {/* Agreement */}
setAgreeTerms(e.target.checked)} />
{/* Submit Button */}
{/* Legal Policies Modal */} {legalModal && (
setLegalModal(null)} />
{/* Header */}
gavel

Legal Policies

{/* Modal Body */}
{legalModal === 'terms' && (

Terms of Service

Effective Date: August 15, 2026

1. Acceptance of Terms

By accessing or using the Larshield platform (the "Service"), you agree to be bound by these Terms of Service. If you do not agree, you may not access the Service.

2. Description of Service

Larshield provides automated vulnerability scanning, active penetration testing, and security posture management tools. The Service actively probes designated targets to identify security flaws, misconfigurations, and compliance violations.

3. Authorization and Legal Use

You explicitly certify that you possess full, legally verifiable authorization from the system owner to conduct active security assessments against any target URL you submit. Unauthorized scanning is illegal and strictly prohibited. You assume all liability for damages resulting from unauthorized use of the Service.

4. Limitation of Liability

Larshield is provided "AS IS". Vulnerability scanning can cause unintended disruptions, including data loss or system crashes. To the maximum extent permitted by law, Larshield shall not be liable for any direct, indirect, incidental, special, or consequential damages resulting from the use or inability to use the Service.

5. Termination

We reserve the right to suspend or terminate your account immediately, without prior notice or liability, for any reason, including without limitation if you breach the Terms, particularly regarding unauthorized target scanning.

)} {legalModal === 'aup' && (

Acceptable Use Policy (Rules of Engagement)

Effective Date: August 15, 2026

This Acceptable Use Policy (AUP) sets the rules of engagement for utilizing the Larshield platform. Violating this policy will result in immediate account termination and potential legal referral.

1. Prohibited Activities

  • Unauthorized Scanning: Scanning infrastructure, applications, or networks that you do not own or lack explicit, documented consent to test.
  • Denial of Service (DoS/DDoS): Utilizing Larshield's infrastructure to intentionally flood, exhaust, or deny access to a target system.
  • Destructive Payloads: Modifying, deleting, or exfiltrating data from a target system beyond what is strictly necessary to demonstrate a proof-of-concept for a vulnerability.
  • Government & Healthcare Infrastructure: You may not scan government, military, emergency services, or critical healthcare infrastructure without verifying compliance with local regulations.

2. Abuse Prevention and Monitoring

Larshield implements automated heuristics to detect abuse. We reserve the right to instantly halt any active scan that triggers abuse thresholds, resembles a DoS attack, or targets known blacklisted domains.

)} {legalModal === 'privacy' && (

Privacy Policy

Effective Date: August 15, 2026

This Privacy Policy describes how Larshield ("we", "us", or "our") collects, uses, and shares your personal information. We are committed to complying with global data protection laws including the GDPR, CCPA, and India's DPDP Act.

1. Information We Collect

Account Data: Email address, name, billing information, and organization details.

Scan Data: Target URLs, scan configurations, identified vulnerabilities, and generated PDF reports.

Audit Logs: Origin IP addresses, access timestamps, and API request logs for security and compliance monitoring.

2. How We Use Your Information

We use your data strictly to provide, maintain, and improve the Service, process payments, and ensure legal compliance. We do not sell your personal data or scan results to third parties.

3. Data Security

Scan results and user data are encrypted at rest (AES-256) and in transit (TLS 1.3). We enforce strict role-based access controls internally. However, no internet transmission is entirely secure, and you use the Service at your own risk.

4. Your Rights (GDPR & CCPA)

Depending on your jurisdiction, you have the right to access, correct, delete, or restrict the processing of your personal data. You can request a complete data export or account deletion by contacting info@larxius.com.

)}
{/* Footer */}
)}
); };