diff --git a/context.json b/context.json new file mode 100644 index 0000000..a4607ec --- /dev/null +++ b/context.json @@ -0,0 +1,74 @@ +{ + "files_to_modify": { + "frontend": [ + "src/components/seo/JsonLd.tsx", + "src/components/seo/index.ts" + ] + }, + "files_to_create": { + "frontend": [ + "src/components/seo/schemas/PersonJsonLd.tsx", + "src/components/seo/schemas/ProfessionalServiceJsonLd.tsx", + "src/components/seo/schemas/BreadcrumbJsonLd.tsx", + "src/components/seo/schemas/WebPageJsonLd.tsx", + "src/components/seo/schemas/FAQJsonLd.tsx", + "src/components/seo/schemas/ServiceJsonLd.tsx", + "src/components/seo/schemas/OrganizationJsonLd.tsx", + "src/components/seo/schemas/ArticleJsonLd.tsx", + "src/components/seo/schemas/HowToJsonLd.tsx", + "src/components/seo/schemas/ProfilePageJsonLd.tsx", + "src/components/seo/schemas/VideoJsonLd.tsx", + "src/components/seo/schemas/SoftwareAppJsonLd.tsx", + "src/components/seo/schemas/WebSiteJsonLd.tsx", + "src/components/seo/schemas/index.ts" + ] + }, + "files_to_reference": [ + "src/components/about/index.ts", + "src/components/layout/index.ts", + "src/components/portfolio/index.ts" + ], + "patterns": { + "component_organization": "Each component type gets its own directory with multiple component files and a barrel export index.ts", + "barrel_export": "index.ts re-exports all components from the directory using named exports", + "import_paths": "Imports use path alias @/components/... for cleaner imports", + "typescript": "All components use TypeScript with proper interface definitions" + }, + "existing_implementations": { + "description": "Found 14 JSON-LD schema components in a single 758-line file at src/components/seo/JsonLd.tsx", + "relevant_files": [ + "src/components/seo/JsonLd.tsx", + "src/components/seo/index.ts", + "src/app/[locale]/layout.tsx (imports PersonJsonLd, ProfessionalServiceJsonLd, OrganizationJsonLd, WebSiteJsonLd)", + "src/app/[locale]/about/page.tsx (imports ProfilePageJsonLd, BreadcrumbJsonLd)", + "src/app/[locale]/blog/[slug]/page.tsx (imports BreadcrumbJsonLd, ArticleJsonLd)", + "src/app/[locale]/leistungen/page.tsx (imports BreadcrumbJsonLd, FAQJsonLd)" + ], + "components_to_split": [ + "PersonJsonLd", + "ProfessionalServiceJsonLd", + "BreadcrumbJsonLd", + "WebPageJsonLd", + "FAQJsonLd", + "ServiceJsonLd", + "OrganizationJsonLd", + "ArticleJsonLd", + "HowToJsonLd", + "ProfilePageJsonLd", + "VideoJsonLd", + "SoftwareAppJsonLd", + "WebSiteJsonLd" + ], + "usage_locations": [ + "src/app/[locale]/layout.tsx", + "src/app/[locale]/about/page.tsx", + "src/app/[locale]/blog/page.tsx", + "src/app/[locale]/blog/[slug]/page.tsx", + "src/app/[locale]/contact/page.tsx", + "src/app/[locale]/leistungen/page.tsx", + "src/app/[locale]/leistungen/[slug]/page.tsx", + "src/app/[locale]/leistungen/standort/[city]/page.tsx", + "src/app/[locale]/portfolio/[slug]/page.tsx" + ] + } +} diff --git a/project_index.json b/project_index.json new file mode 100644 index 0000000..fe6dec7 --- /dev/null +++ b/project_index.json @@ -0,0 +1,27 @@ +{ + "project_type": "single", + "services": { + "frontend": { + "path": ".", + "tech_stack": ["typescript", "react", "nextjs", "tailwindcss"], + "framework": "Next.js 15 (App Router)", + "port": 3000, + "dev_command": "npm run dev", + "build_command": "npm run build", + "test_command": "npm test" + } + }, + "infrastructure": { + "docker": false, + "database": null, + "ci_cd": false + }, + "conventions": { + "linter": "eslint", + "formatter": "prettier", + "testing": "vitest", + "component_pattern": "Each component directory contains multiple .tsx files with a barrel export index.ts", + "import_pattern": "Path aliases using @/ for src directory", + "export_pattern": "index.ts re-exports components using export { ComponentName } or export { default as ComponentName }" + } +} diff --git a/src/components/seo/JsonLd.tsx b/src/components/seo/JsonLd.tsx deleted file mode 100644 index bf55752..0000000 --- a/src/components/seo/JsonLd.tsx +++ /dev/null @@ -1,758 +0,0 @@ -import { type Locale } from '@/i18n/config'; - -interface JsonLdProps { - locale: Locale; -} - -export function PersonJsonLd({ locale }: JsonLdProps) { - const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://damjan-savic.com'; - - const schema = { - '@context': 'https://schema.org', - '@type': 'Person', - '@id': `${baseUrl}/#person`, - name: 'Damjan Savić', - givenName: 'Damjan', - familyName: 'Savić', - jobTitle: locale === 'de' - ? 'Fullstack Entwickler' - : locale === 'sr' - ? 'Fullstack Developer' - : 'Fullstack Developer', - description: locale === 'de' - ? 'Fullstack Entwicklung für Websites, Apps und SaaS mit Next.js, React und TypeScript.' - : locale === 'sr' - ? 'Fullstack razvoj za web stranice, aplikacije i SaaS sa Next.js, React i TypeScript.' - : 'Fullstack development for websites, apps and SaaS with Next.js, React and TypeScript.', - url: baseUrl, - image: `${baseUrl}/images/og-image.jpg`, - email: 'info@damjan-savic.com', - telephone: '+491756950979', - address: { - '@type': 'PostalAddress', - addressLocality: locale === 'sr' ? 'Keln' : locale === 'en' ? 'Cologne' : 'Köln', - addressRegion: 'NRW', - addressCountry: 'DE', - }, - sameAs: [ - 'https://www.linkedin.com/in/damjansavic/', - 'https://github.com/damjansavic', - ], - knowsAbout: [ - 'Artificial Intelligence', - 'Machine Learning', - 'Process Automation', - 'Voice AI', - 'Web Development', - 'Python', - 'TypeScript', - 'React', - 'Next.js', - 'n8n', - 'SaaS Development', - ], - alumniOf: [ - { - '@type': 'EducationalOrganization', - name: 'FOM Hochschule für Ökonomie & Management', - }, - ], - hasCredential: [ - { - '@type': 'EducationalOccupationalCredential', - name: 'M.A. Software Development', - credentialCategory: 'degree', - }, - { - '@type': 'EducationalOccupationalCredential', - name: 'B.Sc. Wirtschaftsinformatik', - credentialCategory: 'degree', - }, - ], - }; - - return ( -