diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7dc84ab924937a4332ac20c13299224da684b602 --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# env files (can opt-in for committing if needed) +.env* +.env.local +.env.development.local +.env.test.local +.env.production.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/app/(public)/about/page.tsx b/app/(public)/about/page.tsx new file mode 100644 index 0000000000000000000000000000000000000000..3a98812b866f8d5ef5b79659643f58064f5c5f47 --- /dev/null +++ b/app/(public)/about/page.tsx @@ -0,0 +1,84 @@ +import { Users, Target, Award, Zap } from "lucide-react" + +const values = [ + { + icon: Target, + title: "Mission-Driven", + description: "Every project starts with understanding your goals. We align our expertise with your vision to deliver measurable results.", + }, + { + icon: Users, + title: "Collaborative", + description: "We believe the best products are built together. You're involved at every step — from strategy to launch.", + }, + { + icon: Award, + title: "Quality Obsessed", + description: "We don't cut corners. Every pixel, every line of code, every interaction is crafted to the highest standard.", + }, + { + icon: Zap, + title: "Future-Ready", + description: "We build with tomorrow in mind — scalable architectures, modern frameworks, and forward-thinking design.", + }, +] + +export default function AboutPage() { + return ( +
+
+ {/* Hero */} +
+

About Us

+

+ A small team with{" "} + big ambitions +

+

+ We're a passionate team of designers, developers, and strategists who love turning ideas into + exceptional digital products. Founded with a simple belief: great software should be accessible to everyone. +

+
+ + {/* Stats */} +
+ {[ + { value: "5+", label: "Years" }, + { value: "50+", label: "Projects" }, + { value: "30+", label: "Happy Clients" }, + { value: "98%", label: "Satisfaction" }, + ].map((stat) => ( +
+
+ {stat.value} +
+
{stat.label}
+
+ ))} +
+ + {/* Values */} +
+

What We Stand For

+
+ {values.map((value, i) => ( +
+
+ +
+
+

{value.title}

+

{value.description}

+
+
+ ))} +
+
+
+
+ ) +} diff --git a/app/(public)/blog/[slug]/page.tsx b/app/(public)/blog/[slug]/page.tsx new file mode 100644 index 0000000000000000000000000000000000000000..9ee68126634d064324fc27cbe7f7d3195efa10ce --- /dev/null +++ b/app/(public)/blog/[slug]/page.tsx @@ -0,0 +1,280 @@ +import { Metadata } from 'next' +import { notFound } from 'next/navigation' +import Link from 'next/link' +import { ArrowLeft, ArrowRight, CalendarDays, Share2, Linkedin, Twitter, Link as LinkIcon } from 'lucide-react' +import { format } from 'date-fns' +import { Button } from '@/components/ui/button' +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' + +const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:5000/api' + +// Define the shape of our BlogPost +interface BlogPost { + id: string + title: string + slug: string + content: string + excerpt: string | null + featuredImage: string | null + tags: string | null + publishedAt: string | null + createdAt: string + author: { + name: string | null + } +} + +// Fetch a single post by slug +async function getPost(slug: string): Promise { + try { + const res = await fetch(`${API_URL}/blog/${slug}`, { + next: { revalidate: 60 } // Revalidate every minute + }) + if (!res.ok) { + if (res.status === 404) return null + throw new Error('Failed to fetch post') + } + return res.json() + } catch (error) { + console.error("Error fetching post:", error) + return null + } +} + +// Fetch related posts +async function getRelated(slug: string): Promise { + try { + const res = await fetch(`${API_URL}/blog/${slug}/related`, { + next: { revalidate: 60 } + }) + if (!res.ok) return [] + return res.json() + } catch { + return [] + } +} + +// Dynamically generate metadata for SEO +export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise { + const resolvedParams = await params; + const post = await getPost(resolvedParams.slug) + + if (!post) { + return { + title: 'Post Not Found | NexaFlow', + } + } + + const plainTextExcerpt = post.excerpt || post.content.replace(/<[^>]*>?/gm, '').substring(0, 160) + + return { + title: `${post.title} | NexaFlow Blog`, + description: plainTextExcerpt, + openGraph: { + title: post.title, + description: plainTextExcerpt, + type: 'article', + publishedTime: post.publishedAt || post.createdAt, + authors: [post.author?.name || 'NexaFlow Team'], + images: post.featuredImage ? [{ url: post.featuredImage }] : [], + }, + twitter: { + card: 'summary_large_image', + title: post.title, + description: plainTextExcerpt, + images: post.featuredImage ? [post.featuredImage] : [], + } + } +} + +export default async function BlogPostPage({ params }: { params: Promise<{ slug: string }> }) { + const resolvedParams = await params; + const post = await getPost(resolvedParams.slug) + + if (!post) { + notFound() + } + + const relatedPosts = await getRelated(resolvedParams.slug) + + const publishDate = post.publishedAt ? new Date(post.publishedAt) : new Date(post.createdAt) + const jsonLd = { + '@context': 'https://schema.org', + '@type': 'BlogPosting', + headline: post.title, + image: post.featuredImage ? [post.featuredImage] : [], + datePublished: publishDate.toISOString(), + author: { + '@type': 'Person', + name: post.author?.name || 'NexaFlow Team', + }, + } + + const tags = post.tags ? JSON.parse(post.tags) : [] + + return ( +
+ {/* Inject JSON-LD for SEO */} +