This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
ReactJS.DE is a German-language React community website built with Astro 5.x. The site features blog posts, tutorials, event listings, and course information for the German React community. It supports both German and English content.
npm install
git pull --recurse-submodules# Start Astro dev server at http://localhost:4321
npm run dev
# Skip API fetch (for offline/local development)
npm run dev:localnpm run buildnpm run preview # Preview production build locally
npm run generate:og # Generate Open Graph images
npm run generate:og:force # Regenerate all OG images
npm run fetch:all # Fetch all external data (trainers, events, course)
npm run lint # Run astro checkBlog Posts (German): Located in src/content/posts/de/ with structure YYYY-MM-DD-slug/index.md
- Each post has its own directory containing the markdown file and associated assets (images, code samples)
- Front matter includes:
title,description,author,published_at,categories,header_image - Collection name:
posts
Blog Posts (English): Located in src/content/posts/en/ with structure slug/index.md
- Same front matter as German posts, with
language: "en" - Use
translation_slugto link German ↔ English translations - Collection name:
posts-en
Users/Authors: Located in src/content/users/ as YAML files
Content Config: src/content/config.ts defines Zod schemas for all collections
Located in src/pages/:
index.astro- German homepageartikel/- German article listing and detail pagesen/- English pages (index, articles, tutorials)tutorials/- Tutorial listing pagekategorie/- Category pagesmeetups/- Meetup informationschulungen/- Training coursesteam/- Team member pagessuche/- Search (powered by Pagefind)feed.xml.ts- RSS feed
BaseLayout.astro- main template with shared structurePostLayout.astro- blog post template (supportslangprop for i18n)
Located in src/components/:
Navigation.astro- main navigation with mobile menuNavigationBanner.astro- top banner (multilingual, configured insrc/config/site.ts)LanguagePicker.astro- language switcher (DE/EN)PostCard.astro- article preview card (supportslangprop)RelatedPosts.astro- related articles sectionFooter.astro,Newsletter.astro,Pagination.astro- Various JSON-LD structured data components
src/i18n/ui.ts- translation stringssrc/i18n/utils.ts- language detection and translation helperssrc/config/site.ts- site-wide config including multilingual banner text- German is the default locale; English pages live under
/en/
src/plugins/remark-workshop-hint.mjs- transforms[[cta:training-top]]and[[cta:training-bottom]]shortcodes into styled training call-to-action HTML blocks with i18n support
Located in scripts/:
prebuild.js- runs all data fetches before buildgenerate-og-images.js- generates Open Graph social images using Node.js Canvasfetch-trainers.js,fetch-events.js,fetch-course.js- fetch external API datafetch-gravatars.js- download author avatar imagesmigrate-content.js- one-time migration script from Jekyll
The site generates social media preview images via scripts/generate-og-images.js:
- Reads posts from
src/content/posts/de/ - Uses Node.js Canvas to composite: background image + gradient overlay + title + author + logo
- Images cached in
public/og/to avoid regeneration - Font files from
public/shared/assets/fonts/ - Run manually with
npm run generate:ogornpm run generate:og:force
The shared/ directory is a git submodule containing reusable assets across workshops.de portals (reactjs.de, angular.de, vuejs.de). Contents are copied/linked into public/shared/:
- Shared images, fonts, themes
- Update with:
git pull --recurse-submodules
astro.config.mjs- Astro config (sitemap, Pagefind, Tailwind CSS, remark plugins, Shiki)src/config/site.ts- site metadata, navigation structure, banner configfirebase.json- Firebase Hosting config (public dir:dist)
- CI/CD: GitHub Actions workflow (
.github/workflows/) - Hosting: Firebase Hosting (config in
firebase.json, public dir:dist) - Build triggers: Push to master, PRs, daily scheduled builds
- Create directory:
src/content/posts/de/YYYY-MM-DD-slug/ - Create markdown file:
src/content/posts/de/YYYY-MM-DD-slug/index.md - Add front matter:
---
title: "Your Post Title"
description: "SEO description"
author: "Author Name"
published_at: YYYY-MM-DD HH:MM:SS.SSSSSSZ
categories: "react javascript typescript"
header_image: "./header.jpg"
---- Place images in the same directory (paths are relative to
index.md) - Use standard Markdown image syntax:

Use shortcodes instead of raw HTML for training call-to-actions:
[[cta:training-top]]
...article content...
[[cta:training-bottom]]These are transformed by the remark-workshop-hint plugin into styled, language-aware HTML blocks.
- Create directory:
src/content/posts/en/slug/ - Create
index.mdwithlanguage: "en"in front matter - Link translations using
translation_slugin both German and English posts
- Astro 5.x: Static site generator
- Tailwind CSS 4.x: Styling (via Vite plugin)
- TypeScript: Type checking
- Node.js: Runtime, OG image generation (Canvas)
- Pagefind: Client-side search
- Firebase: Hosting platform
- GitHub Actions: CI/CD pipeline
The repository includes a Claude-powered workflow for generating articles from GitHub issues.
- Create a GitHub issue with the article topic and relevant information
- Add the
articlelabel to the issue - The workflow will:
- Analyze the issue content for quality and relevance
- Post an analysis report with a recommendation
- If approved, generate a complete German article (5-10 min read)
- Create a pull request with the new article in
src/content/posts/de/
- Issue creator must be a repository OWNER, MEMBER, or COLLABORATOR
- Issue should include:
- Clear React-related topic
- Sufficient context or external links
- Relevance to German React community
Generated articles follow these guidelines:
- Length: 1500-2500 words (5-10 minute read)
- Language: German
- Style: Informative, friendly, practical
- Code examples in JSX/TypeScript where relevant
- Proper markdown structure with headers
- Front matter with all required fields
- Shared submodule must be initialized for full builds (
git pull --recurse-submodules) - API credentials required for fetching external data (events, trainers)
- Post assets must be in the same directory as
index.md - OG images are generated separately via
npm run generate:og, not duringastro build - English posts use the
posts-encollection, German posts useposts - Use
[[cta:...]]shortcodes instead of raw HTML for workshop hints - Article generation workflow only runs for repository members/collaborators