diff --git a/package-lock.json b/package-lock.json index 91ebeb1..fb939d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@radix-ui/react-toast": "^1.2.15", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "gray-matter": "^4.0.3", "next": "15.5.4", "react": "19.1.0", "react-dom": "19.1.0", @@ -3896,6 +3897,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/esquery": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", @@ -3942,6 +3956,18 @@ "node": ">=0.10.0" } }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4286,6 +4312,43 @@ "dev": true, "license": "MIT" }, + "node_modules/gray-matter": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", + "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", + "license": "MIT", + "dependencies": { + "js-yaml": "^3.13.1", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/gray-matter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/gray-matter/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/has-bigints": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", @@ -4577,6 +4640,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4956,6 +5028,15 @@ "json-buffer": "3.0.1" } }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/language-subtag-registry": { "version": "0.3.23", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", @@ -6103,6 +6184,19 @@ "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", "license": "MIT" }, + "node_modules/section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", @@ -6316,6 +6410,12 @@ "node": ">=0.10.0" } }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "license": "BSD-3-Clause" + }, "node_modules/stable-hash": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz", @@ -6460,6 +6560,15 @@ "node": ">=4" } }, + "node_modules/strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", diff --git a/package.json b/package.json index 5d6b802..f0c1ff3 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@radix-ui/react-toast": "^1.2.15", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "gray-matter": "^4.0.3", "next": "15.5.4", "react": "19.1.0", "react-dom": "19.1.0", diff --git a/public/team-members/28580edf-40b6-4469-a53a-b9b6436eb008.jpg b/public/team-members/28580edf-40b6-4469-a53a-b9b6436eb008.jpg new file mode 100644 index 0000000..13c0e3a Binary files /dev/null and b/public/team-members/28580edf-40b6-4469-a53a-b9b6436eb008.jpg differ diff --git a/public/team-members/8e3f17f0-6465-4554-a6a9-9685b1b71045.jpg b/public/team-members/8e3f17f0-6465-4554-a6a9-9685b1b71045.jpg new file mode 100644 index 0000000..c1edef2 Binary files /dev/null and b/public/team-members/8e3f17f0-6465-4554-a6a9-9685b1b71045.jpg differ diff --git a/public/team-members/afsan-khan.jpg b/public/team-members/afsan-khan.jpg new file mode 100644 index 0000000..ee25abb Binary files /dev/null and b/public/team-members/afsan-khan.jpg differ diff --git a/public/team-members/azizul-hakim-akash.jpg b/public/team-members/azizul-hakim-akash.jpg new file mode 100644 index 0000000..384db56 Binary files /dev/null and b/public/team-members/azizul-hakim-akash.jpg differ diff --git a/public/team-members/maruf-mustal-moon.jpg b/public/team-members/maruf-mustal-moon.jpg new file mode 100644 index 0000000..10e262e Binary files /dev/null and b/public/team-members/maruf-mustal-moon.jpg differ diff --git a/public/team-members/rafiqul-islam-susmoy.jpg b/public/team-members/rafiqul-islam-susmoy.jpg new file mode 100644 index 0000000..4b6a344 Binary files /dev/null and b/public/team-members/rafiqul-islam-susmoy.jpg differ diff --git a/public/team-members/syed-salman-reza.jpg b/public/team-members/syed-salman-reza.jpg new file mode 100644 index 0000000..bfbfd35 Binary files /dev/null and b/public/team-members/syed-salman-reza.jpg differ diff --git a/src/app/page.tsx b/src/app/page.tsx index d92fdca..4aa1bec 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -3,6 +3,7 @@ import { Container } from "@/components/ui/container" import { Typography } from "@/components/ui/typography" import { Grid } from "@/components/ui/grid" import { Stack } from "@/components/ui/stack" +import { Logo } from "@/components/ui/logo" import { ArrowRightIcon, GitHubLogoIcon } from "@radix-ui/react-icons" import ProjectsSection from "@/components/home/projects-section" import TeamMembersSection from "@/components/home/team-members-section" @@ -17,6 +18,7 @@ export default function Home() { {/* Logo/Brand */} + Code Storm @@ -43,40 +45,46 @@ export default function Home() { {/* Features Grid */} -
- - -
- +
+ + +
+ +
+
+ Open Source + + Building transparent, accessible solutions for the community +
- Open Source - - Building transparent, accessible solutions for the community -
- -
-
+
- Community - - Connecting passionate developers and researchers worldwide - +
+ Community + + Connecting passionate developers and researchers worldwide + +
- -
-
+
- Innovation - - Pushing boundaries with cutting-edge research and development - +
+ Innovation + + Pushing boundaries with cutting-edge research and development + +
diff --git a/src/app/projects/page.tsx b/src/app/projects/page.tsx index 7382928..4d3e4b7 100644 --- a/src/app/projects/page.tsx +++ b/src/app/projects/page.tsx @@ -1,7 +1,8 @@ import { Container } from "@/components/ui/container" import { Card, CardContent, CardDescription, CardHeader, CardTitle, CardFooter } from "@/components/ui/card" import { Button } from "@/components/ui/button" -import { GitHubLogoIcon, ExternalLinkIcon } from "@radix-ui/react-icons" +import { GitHubLogoIcon, ExternalLinkIcon, StarIcon, CopyIcon } from "@radix-ui/react-icons" +import { getAllProjects, getFeaturedProjects } from "@/lib/project-data" export const metadata = { title: "Projects", @@ -9,6 +10,25 @@ export const metadata = { } export default function ProjectsPage() { + const allProjects = getAllProjects() + const featuredProjects = getFeaturedProjects(3) + const otherProjects = allProjects.filter(p => !featuredProjects.some(fp => fp.slug === p.slug)) + + const getTechBadgeColor = (tech: string) => { + const colors: Record = { + 'JavaScript': 'bg-yellow-100 text-yellow-800 border-yellow-200', + 'TypeScript': 'bg-blue-100 text-blue-800 border-blue-200', + 'Python': 'bg-green-100 text-green-800 border-green-200', + 'PHP': 'bg-purple-100 text-purple-800 border-purple-200', + 'HTML': 'bg-orange-100 text-orange-800 border-orange-200', + 'CSS': 'bg-pink-100 text-pink-800 border-pink-200', + 'Go': 'bg-cyan-100 text-cyan-800 border-cyan-200', + 'Rust': 'bg-red-100 text-red-800 border-red-200', + 'Java': 'bg-amber-100 text-amber-800 border-amber-200', + } + return colors[tech] || 'bg-secondary text-secondary-foreground border-border' + } + return (
@@ -18,12 +38,163 @@ export default function ProjectsPage() {

Our Projects

Discover the open-source projects we're building to solve real-world problems - and empower developers worldwide. + and empower developers worldwide. From SaaS platforms to AI/ML tools.

- {/* Featured Project */} - + {/* Featured Projects */} + {featuredProjects.length > 0 && ( +
+

Featured Projects

+
+ {featuredProjects.map((project) => ( + + +
+
+ {project.name} + + {project.overview || project.description || 'No description available'} + +
+ {project.primaryLanguage && ( + + {project.primaryLanguage} + + )} +
+
+ + {project.github && ( +
+ {project.stars !== undefined && ( +
+ + {project.stars} +
+ )} + {project.forks !== undefined && ( +
+ + {project.forks} +
+ )} +
+ Updated: {project.lastUpdated || 'Unknown'} +
+
+ )} + {project.techStack && project.techStack.length > 0 && ( +
+ {project.techStack.slice(0, 3).map((tech, idx) => ( + + {tech} + + ))} + {project.techStack.length > 3 && ( + + +{project.techStack.length - 3} more + + )} +
+ )} +
+ + {project.github && ( + + )} + {project.liveDemo && ( + + )} + +
+ ))} +
+
+ )} + + {/* All Projects */} + {otherProjects.length > 0 && ( +
+

All Projects

+
+ {otherProjects.map((project) => ( + + +
+
+ {project.name} + {project.overview && ( + + {project.overview} + + )} +
+ {project.primaryLanguage && ( + + {project.primaryLanguage} + + )} +
+
+ +
+
+ {project.stars !== undefined && ( +
+ + {project.stars} +
+ )} + {project.visibility && ( + + {project.visibility} + + )} +
+
+ {project.github && ( + + )} + {project.liveDemo && ( + + )} +
+
+
+
+ ))} +
+
+ )} + + {/* Portfolio Project */} +
@@ -33,7 +204,7 @@ export default function ProjectsPage() {
- Featured + Portfolio
@@ -44,8 +215,8 @@ export default function ProjectsPage() { implementation for best practices in web development.

- Next.js - Tailwind CSS + Next.js 15 + Tailwind CSS 4 Radix UI TypeScript
@@ -65,63 +236,6 @@ export default function ProjectsPage() {
- - {/* Other Projects */} -
-

More Projects Coming Soon

-
- - - Community Tools - - Developer tools and utilities for the open-source community - - - -

- A collection of tools to help developers contribute to open-source projects more effectively. -

-
- - Coming Soon - -
- - - - Research Platform - - Platform for collaborative research and knowledge sharing - - - -

- A platform to facilitate research collaboration and share findings with the community. -

-
- - Coming Soon - -
- - - - Learning Resources - - Educational content and tutorials for developers - - - -

- Comprehensive learning materials to help developers grow their skills. -

-
- - Coming Soon - -
-
-
diff --git a/src/app/team/page.tsx b/src/app/team/page.tsx index 3ae70a0..353d62e 100644 --- a/src/app/team/page.tsx +++ b/src/app/team/page.tsx @@ -1,9 +1,10 @@ import { Container } from "@/components/ui/container" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Button } from "@/components/ui/button" -import { GitHubLogoIcon, LinkedInLogoIcon } from "@radix-ui/react-icons" +import { GitHubLogoIcon, LinkedInLogoIcon, TwitterLogoIcon } from "@radix-ui/react-icons" import Image from "next/image" import type { Metadata } from "next" +import { getAllTeamMembers } from "@/lib/team-data" export const metadata: Metadata = { title: "Team", @@ -14,66 +15,9 @@ export const metadata: Metadata = { }, } -const teamMembers = [ - { - name: "Alex Chen", - role: "Lead Engineer & Founder", - bio: "Passionate about building scalable systems and fostering open source communities. Leading the technical direction of CodeStorm Hub with expertise in full-stack development and cloud architecture.", - avatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face", - github: "https://github.com/alexchen-dev", - linkedin: "https://linkedin.com/in/alexchen-dev", - }, - { - name: "Dr. Priya Patel", - role: "Research Lead", - bio: "PhD in Computer Science with expertise in machine learning algorithms. Driving research initiatives and ML infrastructure development across multiple open source projects.", - avatar: "https://images.unsplash.com/photo-1580489944761-15a19d654956?w=150&h=150&fit=crop&crop=face", - github: "https://github.com/priyapatel-research", - linkedin: "https://linkedin.com/in/priya-patel-ai", - }, - { - name: "Sarah Kim", - role: "DevOps Engineer", - bio: "Expert in cloud infrastructure and CI/CD pipelines. Ensuring reliable deployments and scalable architecture for all CodeStorm Hub projects with focus on automation.", - avatar: "https://images.unsplash.com/photo-1494790108755-2616b612b786?w=150&h=150&fit=crop&crop=face", - github: "https://github.com/sarahkim-dev", - linkedin: "https://linkedin.com/in/sarah-kim-devops", - }, - { - name: "Marcus Johnson", - role: "Security Engineer", - bio: "Cybersecurity specialist focused on secure coding practices and vulnerability assessment. Protecting our community and codebases with comprehensive security audits.", - avatar: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face", - github: "https://github.com/marcusj-security", - linkedin: "https://linkedin.com/in/marcus-johnson-security", - }, - { - name: "Taylor Morgan", - role: "UX Designer", - bio: "User experience designer with a passion for accessible and inclusive design. Creating intuitive interfaces that serve our diverse community with focus on usability research.", - avatar: "https://images.unsplash.com/photo-1489424731084-a5d8b219a5bb?w=150&h=150&fit=crop&crop=face", - github: "https://github.com/taylormorgan-design", - linkedin: "https://linkedin.com/in/taylor-morgan-ux", - }, - { - name: "James Liu", - role: "Frontend Developer", - bio: "Frontend specialist with expertise in modern React patterns and web performance optimization. Building fast, accessible user interfaces for open source projects.", - avatar: "https://images.unsplash.com/photo-1519345182560-3f2917c472ef?w=150&h=150&fit=crop&crop=face", - github: "https://github.com/jamesliu-frontend", - linkedin: "https://linkedin.com/in/james-liu-frontend", - }, - { - name: "Community Contributors", - role: "Open Source Enthusiasts", - bio: "Our extended team includes passionate contributors from around the world who believe in the power of open source collaboration and continuously contribute to our projects.", - avatar: "https://github.com/CodeStorm-Hub.png", - github: "https://github.com/CodeStorm-Hub", - linkedin: null, - }, -] - export default function TeamPage() { + const teamMembers = getAllTeamMembers() + return (
@@ -88,55 +32,74 @@ export default function TeamPage() {
{/* Team Members */} -
- {teamMembers.map((member, index) => ( - - -
- {`${member.name} -
- {member.name} - {member.role} -
- -

{member.bio}

-
- {member.github && ( - - )} - {member.linkedin && ( - - )} -
-
-
- ))} -
+ {teamMembers.length > 0 ? ( +
+ {teamMembers.map((member, index) => ( + + +
+ {`${member.name} +
+ {member.name} + {member.role} +
+ +

{member.bio}

+
+ {member.social.github && member.social.github !== '#' && ( + + )} + {member.social.linkedin && member.social.linkedin !== '#' && ( + + )} + {member.social.twitter && member.social.twitter !== '#' && ( + + )} +
+
+
+ ))} +
+ ) : ( +
+

Team information is being updated. Please check back soon!

+
+ )} {/* Join Us Section */} diff --git a/src/components/home/projects-section.tsx b/src/components/home/projects-section.tsx index 9371e0b..5cf8d23 100644 --- a/src/components/home/projects-section.tsx +++ b/src/components/home/projects-section.tsx @@ -4,95 +4,16 @@ import { Typography } from "@/components/ui/typography" import { Grid } from "@/components/ui/grid" import { Stack } from "@/components/ui/stack" import { Button } from "@/components/ui/button" -import { GitHubLogoIcon, StarIcon, PersonIcon } from "@radix-ui/react-icons" - -interface Project { - id: string - name: string - description: string - stars: number - contributors: number - primaryTech: string - category: string - repoUrl: string - projectUrl?: string -} - -// Mock data for projects -const projects: Project[] = [ - { - id: "1", - name: "DataStorm Analytics", - description: "Real-time data processing and visualization platform built for scalability", - stars: 2847, - contributors: 18, - primaryTech: "Python", - category: "Data Science", - repoUrl: "https://github.com/CodeStorm-Hub/datastorm-analytics", - projectUrl: "/projects/datastorm-analytics" - }, - { - id: "2", - name: "CloudNative Toolkit", - description: "Container orchestration and microservices deployment automation tools", - stars: 1523, - contributors: 12, - primaryTech: "Go", - category: "Infrastructure", - repoUrl: "https://github.com/CodeStorm-Hub/cloudnative-toolkit", - projectUrl: "/projects/cloudnative-toolkit" - }, - { - id: "3", - name: "ML Research Hub", - description: "Open source machine learning algorithms and research implementations", - stars: 3241, - contributors: 25, - primaryTech: "Python", - category: "Research", - repoUrl: "https://github.com/CodeStorm-Hub/ml-research-hub", - projectUrl: "/projects/ml-research-hub" - }, - { - id: "4", - name: "DevTools Suite", - description: "Developer productivity tools and utilities for modern web development", - stars: 892, - contributors: 8, - primaryTech: "TypeScript", - category: "Dev Tools", - repoUrl: "https://github.com/CodeStorm-Hub/devtools-suite", - projectUrl: "/projects/devtools-suite" - }, - { - id: "5", - name: "Security Scanner", - description: "Automated security vulnerability scanner for open source dependencies", - stars: 1687, - contributors: 14, - primaryTech: "Rust", - category: "Security", - repoUrl: "https://github.com/CodeStorm-Hub/security-scanner", - projectUrl: "/projects/security-scanner" - }, - { - id: "6", - name: "API Gateway", - description: "High-performance API gateway with rate limiting and authentication", - stars: 2156, - contributors: 16, - primaryTech: "Node.js", - category: "Infrastructure", - repoUrl: "https://github.com/CodeStorm-Hub/api-gateway", - projectUrl: "/projects/api-gateway" - } -] +import { GitHubLogoIcon, StarIcon, PersonIcon, ExternalLinkIcon } from "@radix-ui/react-icons" +import { getFeaturedProjects } from "@/lib/project-data" interface ProjectsSectionProps { className?: string } export default function ProjectsSection({ className }: ProjectsSectionProps) { + const featuredProjects = getFeaturedProjects(6) + return (
@@ -109,63 +30,78 @@ export default function ProjectsSection({ className }: ProjectsSectionProps) { {/* Projects Grid */} - {projects.map((project) => ( - + {featuredProjects.map((project) => ( +
{project.name} - - {project.primaryTech} - + {project.primaryLanguage && ( + + {project.primaryLanguage} + + )}
- - {project.category} - + {project.techStack && project.techStack.length > 0 && ( + + {project.techStack[0]} + + )}
- {project.description} + {project.overview || project.description || "No description available."} {/* Project Stats */}
-
-
-
-
+ {project.stars !== undefined && ( +
+
+ )} + {project.forks !== undefined && ( +
+
+ )}
{/* Action Buttons */}
- {project.projectUrl ? ( + {project.liveDemo && ( + + )} + {project.github && ( - ) : null} - + )}
diff --git a/src/components/home/team-members-section.tsx b/src/components/home/team-members-section.tsx index b6f7a89..a60f826 100644 --- a/src/components/home/team-members-section.tsx +++ b/src/components/home/team-members-section.tsx @@ -6,129 +6,15 @@ import { Stack } from "@/components/ui/stack" import { Button } from "@/components/ui/button" import { GitHubLogoIcon, LinkedInLogoIcon } from "@radix-ui/react-icons" import Image from "next/image" - -interface TeamMember { - id: string - name: string - role: string - specialization: string - avatar: string - bio: string - github?: string - linkedin?: string - skills: string[] - contributions: { - commits: number - prs: number - reviews: number - } -} - -// Core team members and contributors -const teamMembers: TeamMember[] = [ - { - id: "1", - name: "Alex Chen", - role: "Lead Engineer & Founder", - specialization: "Full-Stack Development", - avatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face", - bio: "Passionate about building scalable systems and fostering open source communities. Leading the technical direction of CodeStorm Hub.", - github: "https://github.com/alexchen-dev", - linkedin: "https://linkedin.com/in/alexchen-dev", - skills: ["TypeScript", "React", "Node.js", "Docker", "AWS"], - contributions: { - commits: 1247, - prs: 89, - reviews: 156 - } - }, - { - id: "2", - name: "Dr. Priya Patel", - role: "Research Lead", - specialization: "Machine Learning & AI", - avatar: "https://images.unsplash.com/photo-1580489944761-15a19d654956?w=150&h=150&fit=crop&crop=face", - bio: "PhD in Computer Science with expertise in machine learning algorithms. Driving research initiatives and ML infrastructure development.", - github: "https://github.com/priyapatel-research", - linkedin: "https://linkedin.com/in/priya-patel-ai", - skills: ["Python", "TensorFlow", "PyTorch", "MLOps", "Research"], - contributions: { - commits: 892, - prs: 67, - reviews: 134 - } - }, - { - id: "3", - name: "Sarah Kim", - role: "DevOps Engineer", - specialization: "Infrastructure & Automation", - avatar: "https://images.unsplash.com/photo-1494790108755-2616b612b786?w=150&h=150&fit=crop&crop=face", - bio: "Expert in cloud infrastructure and CI/CD pipelines. Ensuring reliable deployments and scalable architecture for all projects.", - github: "https://github.com/sarahkim-dev", - linkedin: "https://linkedin.com/in/sarah-kim-devops", - skills: ["Kubernetes", "Terraform", "GitHub Actions", "AWS", "Monitoring"], - contributions: { - commits: 743, - prs: 52, - reviews: 98 - } - }, - { - id: "4", - name: "Marcus Johnson", - role: "Security Engineer", - specialization: "Application Security", - avatar: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face", - bio: "Cybersecurity specialist focused on secure coding practices and vulnerability assessment. Protecting our community and codebases.", - github: "https://github.com/marcusj-security", - linkedin: "https://linkedin.com/in/marcus-johnson-security", - skills: ["Security Auditing", "Penetration Testing", "Rust", "Go", "OWASP"], - contributions: { - commits: 456, - prs: 34, - reviews: 87 - } - }, - { - id: "5", - name: "Taylor Morgan", - role: "UX Designer", - specialization: "Product Design & Research", - avatar: "https://images.unsplash.com/photo-1489424731084-a5d8b219a5bb?w=150&h=150&fit=crop&crop=face", - bio: "User experience designer with a passion for accessible and inclusive design. Creating intuitive interfaces that serve our diverse community.", - github: "https://github.com/taylormorgan-design", - linkedin: "https://linkedin.com/in/taylor-morgan-ux", - skills: ["Figma", "User Research", "Accessibility", "Prototyping", "Design Systems"], - contributions: { - commits: 234, - prs: 28, - reviews: 45 - } - }, - { - id: "6", - name: "James Liu", - role: "Frontend Developer", - specialization: "React & Performance", - avatar: "https://images.unsplash.com/photo-1519345182560-3f2917c472ef?w=150&h=150&fit=crop&crop=face", - bio: "Frontend specialist with expertise in modern React patterns and web performance optimization. Building fast, accessible user interfaces.", - github: "https://github.com/jamesliu-frontend", - linkedin: "https://linkedin.com/in/james-liu-frontend", - skills: ["React", "Next.js", "TypeScript", "Performance", "Testing"], - contributions: { - commits: 687, - prs: 45, - reviews: 78 - } - } -] +import { getAllTeamMembers } from "@/lib/team-data" interface TeamMembersSectionProps { className?: string } export default function TeamMembersSection({ className }: TeamMembersSectionProps) { + const teamMembers = getAllTeamMembers().slice(0, 6) // Show first 6 members on homepage + return (
@@ -145,90 +31,39 @@ export default function TeamMembersSection({ className }: TeamMembersSectionProp {/* Team Members Grid */} - {teamMembers.map((member) => ( - + {teamMembers.map((member, index) => ( +
{`${member.name}
{member.name} {member.role} - - {member.specialization} -
{/* Bio */} - + {member.bio} - {/* Skills */} -
- - Skills - -
- {member.skills.slice(0, 3).map((skill) => ( - - {skill} - - ))} - {member.skills.length > 3 && ( - - +{member.skills.length - 3} more - - )} -
-
- - {/* Contributions Stats */} -
- - Contributions - -
-
-
- {member.contributions.commits} -
-
Commits
-
-
-
- {member.contributions.prs} -
-
PRs
-
-
-
- {member.contributions.reviews} -
-
Reviews
-
-
-
- {/* Social Links */}
- {member.github && ( + {member.social.github && member.social.github !== '#' && ( )} - {member.linkedin && ( + {member.social.linkedin && member.social.linkedin !== '#' && ( + ) + } + + return ( + + ) +} \ No newline at end of file diff --git a/src/hooks/use-theme.ts b/src/hooks/use-theme.ts new file mode 100644 index 0000000..c825a37 --- /dev/null +++ b/src/hooks/use-theme.ts @@ -0,0 +1,51 @@ +"use client" + +import { useState, useEffect } from 'react' + +export type Theme = 'light' | 'dark' + +export function useTheme() { + const [theme, setTheme] = useState('light') + const [mounted, setMounted] = useState(false) + + useEffect(() => { + setMounted(true) + + // Check for stored theme preference or default to system preference + const stored = localStorage.getItem('theme') as Theme | null + if (stored) { + setTheme(stored) + document.documentElement.classList.toggle('dark', stored === 'dark') + } else { + // Check system preference + const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches + const systemTheme: Theme = prefersDark ? 'dark' : 'light' + setTheme(systemTheme) + document.documentElement.classList.toggle('dark', systemTheme === 'dark') + } + }, []) + + const toggleTheme = () => { + if (!mounted) return + + const newTheme: Theme = theme === 'light' ? 'dark' : 'light' + setTheme(newTheme) + localStorage.setItem('theme', newTheme) + document.documentElement.classList.toggle('dark', newTheme === 'dark') + } + + const setThemeValue = (newTheme: Theme) => { + if (!mounted) return + + setTheme(newTheme) + localStorage.setItem('theme', newTheme) + document.documentElement.classList.toggle('dark', newTheme === 'dark') + } + + return { + theme, + toggleTheme, + setTheme: setThemeValue, + mounted, + } +} \ No newline at end of file diff --git a/src/lib/project-data.ts b/src/lib/project-data.ts new file mode 100644 index 0000000..0469601 --- /dev/null +++ b/src/lib/project-data.ts @@ -0,0 +1,173 @@ +import fs from 'fs' +import path from 'path' +import matter from 'gray-matter' + +export interface ProjectData { + name: string + slug: string + overview?: string + description?: string + github?: string + primaryLanguage?: string + languages?: string[] + stars?: number + forks?: number + lastUpdated?: string + status?: 'Active' | 'Archived' | 'Maintenance' + visibility?: 'Public' | 'Private' + liveDemo?: string + techStack?: string[] + architecture?: string + repositorySize?: string + content: string +} + +let cachedProjectsData: ProjectData[] | null = null + +export function getAllProjects(): ProjectData[] { + if (cachedProjectsData) { + return cachedProjectsData + } + + try { + const projectsDir = path.join(process.cwd(), 'docs', 'projects') + const filenames = fs.readdirSync(projectsDir) + + cachedProjectsData = filenames + .filter(name => name.endsWith('.md')) + .map(filename => { + const filePath = path.join(projectsDir, filename) + const fileContent = fs.readFileSync(filePath, 'utf8') + const { data, content } = matter(fileContent) + const slug = filename.replace(/\.md$/, '') + + // Parse the markdown content to extract structured data + const parsedData = parseProjectMarkdown(content, slug) + + return { + ...data, + ...parsedData, + slug, + content, + } as ProjectData + }) + .sort((a, b) => { + // Sort by status (Active first), then by stars, then by last updated + if (a.status === 'Active' && b.status !== 'Active') return -1 + if (b.status === 'Active' && a.status !== 'Active') return 1 + if (a.stars && b.stars) return b.stars - a.stars + return (b.lastUpdated || '').localeCompare(a.lastUpdated || '') + }) + + return cachedProjectsData + } catch (error) { + console.warn('Failed to load projects data from docs/projects:', error) + cachedProjectsData = [] + return cachedProjectsData + } +} + +function parseProjectMarkdown(content: string, slug: string): Partial { + const lines = content.split('\n') + const data: Partial = { name: slug.replace(/-/g, ' ') } + + // Extract title + const titleMatch = lines.find(line => line.startsWith('# ')) + if (titleMatch) { + data.name = titleMatch.replace('# ', '').trim() + } + + // Extract overview/description + const overviewIndex = lines.findIndex(line => line.includes('## Overview')) + if (overviewIndex > -1 && overviewIndex < lines.length - 2) { + const descriptionLine = lines[overviewIndex + 2] + if (descriptionLine && !descriptionLine.startsWith('#')) { + data.overview = descriptionLine.trim() + } + } + + // Extract GitHub URL + const githubMatch = content.match(/- \*\*GitHub:\*\* (https:\/\/github\.com\/[^\s\n]+)/) + if (githubMatch) { + data.github = githubMatch[1] + } + + // Extract primary language + const langMatch = content.match(/- \*\*Primary Language:\*\* (.+)/) + if (langMatch) { + data.primaryLanguage = langMatch[1].trim() + } + + // Extract languages with percentages + const languagesMatch = content.match(/- \*\*Languages:\*\* (.+)/) + if (languagesMatch) { + const languagesStr = languagesMatch[1] + data.languages = languagesStr.split(',').map(lang => lang.trim().split('(')[0].trim()) + } + + // Extract stars and forks + const starsMatch = content.match(/⭐ (\d+) stars?/) + if (starsMatch) { + data.stars = parseInt(starsMatch[1]) + } + + const forksMatch = content.match(/🍴 (\d+) forks?/) + if (forksMatch) { + data.forks = parseInt(forksMatch[1]) + } + + // Extract last updated + const updateMatch = content.match(/- \*\*Last Updated:\*\* (.+)/) + if (updateMatch) { + data.lastUpdated = updateMatch[1].trim() + } + + // Extract status + const statusMatch = content.match(/- \*\*Status:\*\* (?:✅|🔄|📦) (Active|Archived|Maintenance)/) + if (statusMatch) { + data.status = statusMatch[1] as 'Active' | 'Archived' | 'Maintenance' + } + + // Extract visibility + const visibilityMatch = content.match(/- \*\*Visibility:\*\* (?:🌐|🔐) (Public|Private)/) + if (visibilityMatch) { + data.visibility = visibilityMatch[1] as 'Public' | 'Private' + } + + // Extract live demo + const demoMatch = content.match(/- \*\*Live Demo:\*\* \[([^\]]+)\]\(([^)]+)\)/) + if (demoMatch) { + data.liveDemo = demoMatch[2] + } + + // Extract tech stack + const techMatch = content.match(/- \*\*Technology Stack:\*\* (.+)/) + if (techMatch) { + data.techStack = techMatch[1].split(',').map(tech => tech.trim()) + } + + // Extract architecture + const archMatch = content.match(/- \*\*Architecture:\*\* (.+)/) + if (archMatch) { + data.architecture = archMatch[1].trim() + } + + return data +} + +export function getProjectBySlug(slug: string): ProjectData | undefined { + return getAllProjects().find(project => project.slug === slug) +} + +export function getFeaturedProjects(limit: number = 6): ProjectData[] { + return getAllProjects() + .filter(project => project.status === 'Active' && project.visibility === 'Public') + .slice(0, limit) +} + +export function getProjectsByTechnology(tech: string): ProjectData[] { + return getAllProjects().filter(project => + project.techStack?.some(t => t.toLowerCase().includes(tech.toLowerCase())) || + project.primaryLanguage?.toLowerCase().includes(tech.toLowerCase()) + ) +} \ No newline at end of file diff --git a/src/lib/team-data.ts b/src/lib/team-data.ts new file mode 100644 index 0000000..aa35617 --- /dev/null +++ b/src/lib/team-data.ts @@ -0,0 +1,60 @@ +import fs from 'fs' +import path from 'path' + +export interface TeamMember { + name: string + role: string + bio: string + image: string + social: { + github: string + linkedin: string + twitter: string + } +} + +export interface TeamData { + team: TeamMember[] +} + +let cachedTeamData: TeamData | null = null + +export function getTeamData(): TeamData { + if (cachedTeamData) { + return cachedTeamData + } + + try { + const teamJsonPath = path.join(process.cwd(), 'docs', 'team-members', 'team.json') + const teamJsonContent = fs.readFileSync(teamJsonPath, 'utf8') + const rawData = JSON.parse(teamJsonContent) + + // Fix image paths to ensure they point to the correct location + cachedTeamData = { + team: rawData.team.map((member: TeamMember) => ({ + ...member, + image: member.image.startsWith('/') + ? `/team-members${member.image}` + : `/team-members/${member.image}` + })) + } + + return cachedTeamData! + } catch (error) { + console.warn('Failed to load team data from docs/team-members/team.json:', error) + + // Fallback to empty team data if file doesn't exist + cachedTeamData = { team: [] } + return cachedTeamData + } +} + +export function getAllTeamMembers(): TeamMember[] { + return getTeamData().team +} + +export function getTeamMemberByName(name: string): TeamMember | undefined { + return getAllTeamMembers().find(member => + member.name.toLowerCase() === name.toLowerCase() + ) +} \ No newline at end of file