From 7c82aa4640fb258ce3fbe8fe40d1830885be7f27 Mon Sep 17 00:00:00 2001 From: Maaz Khokhar Date: Wed, 25 Jun 2025 11:38:19 -0400 Subject: [PATCH] feat: implement review submission functionality and update reviews API --- src/App.tsx | 1007 +++++++++++++++++++++++++++++++++++---------- src/reviewsApi.ts | 16 +- 2 files changed, 786 insertions(+), 237 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index cbbb1d5..b4319ce 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,253 +1,806 @@ -import { useState, useEffect } from "react"; -import HeroSection from "./components/HeroSection"; -import LeadershipSection from "./components/LeadershipSection"; -import EntrepreneurshipSection from "./components/EntrepreneurshipSection"; -import AcademicSection from "./components/AcademicSection"; -import TechSection from "./components/TechSection"; -import AboutSection from "./components/AboutSection"; -import AthleticsSection from "./components/AthleticsSection"; -import ReviewsSection from "./components/ReviewsSection"; -import Footer from "./components/Footer"; -import { Sun, Moon } from "lucide-react"; +import { useState, type JSX, useEffect } from "react"; +import { + Star, + Plus, + X, + Mail, + Phone, + MapPin, + Github, + Linkedin, + Award, + Briefcase, + GraduationCap, + Trophy, + Zap, + Users, +} from "lucide-react"; +import { addReview, fetchReviews, type Review } from "./reviewsApi"; const App = () => { - const [, setActiveSection] = useState("hero"); - const [, setIsVisible] = useState({}); - const [isDarkMode, setIsDarkMode] = useState(true); + const [showModal, setShowModal] = useState(false); + const isOutOfCollege = false; // Change this to false if you want to simulate being in college + const [reviews, setReviews] = useState([]); + const [newReview, setNewReview] = useState({ + name: "", + rating: -1, + position: "", + text: "", + }); useEffect(() => { - const observer = new IntersectionObserver( - (entries) => { - entries.forEach((entry) => { - if (entry.isIntersecting) { - setIsVisible((prev) => ({ ...prev, [entry.target.id]: true })); - setActiveSection(entry.target.id); - } - }); - }, - { threshold: 0.3 } - ); - - document.querySelectorAll("section[id]").forEach((section) => { - observer.observe(section); - }); - - return () => observer.disconnect(); + fetchReviews().then(setReviews); }, []); - const scrollToSection = (sectionId: string) => { - document.getElementById(sectionId)?.scrollIntoView({ behavior: "smooth" }); + const handleAddReview = () => { + if ( + !newReview.name || + newReview.rating < 1 || + newReview.rating > 5 || + !newReview.position || + !newReview.text + ) { + alert("Please fill out all fields correctly."); + return; + } + + // Add the new review to the state + addReview(newReview) + .then(() => { + fetchReviews().then(setReviews); + alert("Review added successfully!"); + setNewReview({ name: "", rating: -1, position: "", text: "" }); + setShowModal(false); + }) + .catch((error) => { + console.error("Error adding review:", error); + alert("Failed to add review. Please try again later."); + setShowModal(false); + }); }; - const toggleDarkMode = () => { - setIsDarkMode(!isDarkMode); + const renderStars = (rating: number): JSX.Element[] => { + return Array(5) + .fill(0) + .map((_, i) => ( + + )); }; - const themeClasses = isDarkMode - ? "min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900 text-white overflow-x-hidden transition-all duration-1000" - : "min-h-screen bg-gradient-to-br from-blue-50 via-purple-50 to-pink-50 text-gray-900 overflow-x-hidden transition-all duration-1000"; - - const cardClasses = isDarkMode - ? "bg-white/5 backdrop-blur-lg border-white/10" - : "bg-white/90 backdrop-blur-lg border-gray-200/60 shadow-xl"; - - const navClasses = isDarkMode - ? "bg-black/20 backdrop-blur-lg border-white/10" - : "bg-white/80 backdrop-blur-lg border-gray-200/30"; - - const textClasses = isDarkMode ? "text-gray-300" : "text-gray-700"; - return ( -
- - {/* Navigation */} - +
- {/* Hero Section */} - +
+ {/* Why I Stand Out */} +
+
+ +

+ What Makes Me Unique +

+
+
+

+ I bridge the gap between cutting-edge technology and real-world + impact. With a unique combination of technical expertise, + entrepreneurial mindset, and leadership experience, I transform + complex problems into elegant solutions that drive meaningful + change. +

+
+
+
+ +
+

+ Innovation Driver +

+

+ Transforming ideas into scalable solutions +

+
+
+
+ +
+

Team Catalyst

+

+ Inspiring collaboration and excellence +

+
+
+
+ +
+

+ Results Focused +

+

+ Delivering measurable impact consistently +

+
+
+
+
- {/* About Section */} - + {/* Academic & STEM Highlights */} +
+
+ +

+ Academic & STEM Excellence +

+
+
+ {isOutOfCollege && ( +
+

+ Education +

+
+
+

+ Master of Science in Computer Science +

+

+ Stanford University • GPA: 3.9/4.0 +

+

+ Specialization: AI & Machine Learning +

+
+
+

+ Bachelor of Science in Engineering +

+

+ MIT • Summa Cum Laude • GPA: 3.95/4.0 +

+

+ Double Major: Computer Science & Mathematics +

+
+
+
+ )} +
+

+ STEM Achievements +

+
    + {[ + "Developed 5+ freelance applications serving diverse client needs", + "Specialized in full-stack web development and mobile applications", + "Maintained 100% client satisfaction rate with on-time delivery", + "Expertise in React, TypeScript, and modern web technologies", + ].map((achievement, index) => ( +
  • + + {achievement} +
  • + ))} +
+
+
+
- {/* Academic Section */} - + {/* Tech, Innovation, and Projects */} +
+
+ +

+ Technology & Innovation +

+
+
+
+

+ Featured Projects +

+
+
+ + Local School Attendance App + +

+ Lead Developer | 2025 +

+

+ Developed and deployed a comprehensive attendance management + system for a local educational institution, streamlining + their administrative processes and improving data accuracy. + The application continues to serve the organization daily, + demonstrating successful long-term solution delivery. +

+
+ {isOutOfCollege && ( +
+

Sun-Scope

+

+ Full-Stack Engineer | 2025 +

+

+ Built IoT solution reducing energy consumption by 35% + across 200+ commercial buildings +

+
+ )} +
+ + I-Dazzle E-Commerce Platform + +

+ Technical Lead | 2025 +

+

+ Architected and developed a custom e-commerce platform for a + luxury bag retailer, enabling direct-to-consumer sales and + reducing third-party marketplace dependency. Implemented + responsive design, secure payment processing, and inventory + management features to support business growth and brand + independence. +

+
+
+
+
+

+ Technical Skills +

+
+
+

+ Programming Languages +

+
+ {["Python", "JavaScript", "TypeScript"].map((skill) => ( + + {skill} + + ))} +
+
+
+

+ Frameworks & Tools +

+
+ {[ + "React", + "React Native", + "Docker", + "React Native", + "TailwindCSS", + ].map((skill) => ( + + {skill} + + ))} +
+
+ {isOutOfCollege && ( +
+

+ Specializations +

+
+ {["UI/UX Design", ""].map((skill) => ( + + {skill} + + ))} +
+
+ )} +
+
+
+
- {/* Tech Section */} - + {/* Leadership, Service, & School */} +
+
+ +

+ Leadership & Service +

+
+
+
+
+

+ Leadership Roles +

+
+
+

+ NJHS Inductee +

+

+ National Junior Honor Society Inductee • 2024 +

+

+ Recognized for academic excellence, leadership, and + community service in middle school +

+
+
+

+ "Fabulous Falcon" Award +

+

+ Forestwood Middle School • 2024 +

+

+ Awarded for outstanding contributions to school community + and leadership in student activities +

+
+
+

+ Peer Learning Mentor +

+

+ Forestwood Middle School • 2023-2024 +

+

+ Mentored 50+ students in computer science fundamentals, + fostering a collaborative learning environment +

+
+
+
+ {isOutOfCollege && ( +
+

+ Community Service +

+
+
+

+ Code for Good Volunteer +

+

+ 2020-Present • 500+ hours +

+

+ Built digital solutions for 10+ nonprofits, impacting + 10,000+ lives +

+
+
+
+ )} +
+
+
- {/* Leadership Section */} - + {isOutOfCollege && ( + /* Athletics & Competitions */ +
+
+ +

+ Athletics & Competitions +

+
+
+
+

+ Competitive Programming +

+
    +
  • + + + ACM ICPC World Finals - Top 20 + +
  • +
  • + + + Google Code Jam - Round 3 Qualifier + +
  • +
  • + + + Facebook Hacker Cup - Top 100 + +
  • +
+
+
+

+ Hackathons +

+
    +
  • + + + TechCrunch Disrupt - 1st Place + +
  • +
  • + + MIT HackMIT - Winner +
  • +
  • + + + Stanford TreeHacks - 2nd Place + +
  • +
+
+
+

+ Athletic Achievements +

+
    +
  • + + + Varsity Tennis - Team Captain + +
  • +
  • + + + Marathon Finisher - Sub 3:30 + +
  • +
  • + + + Rock Climbing - Advanced Level + +
  • +
+
+
+
+ )} - {/* Athletics Section */} - + {/* Entrepreneurship and Drive */} + {isOutOfCollege && ( +
+
+ +

+ Entrepreneurial Ventures +

+
+
+
+

+ Founded Startups +

+
+
+

+ EcoTech Solutions +

+

+ Co-Founder & CTO • 2023-Present +

+

+ $2M in funding raised, 50+ employees, revolutionizing + renewable energy storage +

+
+
+

StudySync

+

+ Founder • 2022-2023 +

+

+ EdTech platform with 10K+ users, acquired by major + educational publisher +

+
+
+

+ DevTools Pro +

+

+ Co-Founder • 2021-2022 +

+

+ Developer productivity suite, $500K ARR before successful + exit +

+
+
+
+
+

+ Investment & Advisory +

+
+
+

+ Angel Investor +

+

+ 15+ early-stage investments in AI and sustainability + startups +

+

+ 3 successful exits, 2 unicorns in portfolio +

+
+
+

+ Startup Accelerator Mentor +

+

+ Y Combinator, Techstars, 500 Startups +

+

+ Mentored 50+ startups, $100M+ in follow-on funding +

+
+
+

+ Innovation Consultant +

+

+ Fortune 500 digital transformation advisor +

+

+ Led innovation workshops for 20+ enterprises +

+
+
+
+
+
+ )} + {/* Reviews Section */} +
+
+
+ +

+ Professional Reviews +

+
+ +
+
+ {reviews.length > 1 ? ( + reviews.map((review, index) => ( +
+
+
+ +
+
+

+ {review.name} +

+

+ {review.position} +

+
+
+
+ {renderStars(review.rating)} +
+

{review.text}

+
+ )) + ) : ( +
+ No reviews yet. Be the first to add one! +
+ )} +
+
- {/* Entrepreneurship Section */} - + {/* Let's Connect */} +
+
+

Let's Connect

+

+ Ready to collaborate on something amazing? I'm always excited to + discuss new opportunities and innovative projects. +

+
+ + + Email Me + + {isOutOfCollege && ( + + + LinkedIn + + )} + + + GitHub + +
+
+
+
- {/* Reviews Section */} - - - {/* Footer */} -