This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Remix-based website for Redezeit, deployed on Netlify. The site is multilingual (German, English, Russian, Ukrainian) and uses Contentful as a headless CMS for content management. The application connects refugee coaches with people seeking conversation partners.
Before running the project, create a .env file based on .env.template:
CONTENTFUL_SPACE: Contentful space IDCONTENTFUL_ACCESSTOKEN: Contentful delivery API tokenCONTENTFUL_ENVIRONMENT: Usually "master"CONTENTFUL_MANAGEMENT_API_ACCESS_TOKEN: Required for generating TypeScript types from Contentful
Find these values in Contentful under Settings > API keys.
npm run dev # Start local development server
npm run build # Build for production
npm start # Serve production build locally (via Netlify)npm run contentful-typescript-codegen # Generate TypeScript types from Contentful schemaThis generates types to types/generated/* based on the current Contentful content model.
npm run lint # Run ESLint
npm run typecheck # Run TypeScript type checking
npm test # Run Vitest testsThe site is entirely content-driven through Contentful:
- Content fetching: All Contentful API calls are in
app/utils/contentful.ts - Content types: TypeScript types are auto-generated in
types/generated/via the codegen script - Content blocks: Modular content blocks are rendered via
app/components/ContentBlocks.tsx, which maps Contentful content types to React components
Key Contentful utilities:
getPage(slug, locale): Fetch page by sluggetPageById(id, locale): Fetch page by Contentful entry IDgetCoaches(lang): Fetch coach profiles with language filteringgetMainNav(locale): Fetch navigation structuregetBlogposts(locale): Fetch blog posts
Uses remix-i18next for translations:
- Supported locales:
de(German),en(English),ru(Russian),uk(Ukrainian) - Translation files:
public/locales/{locale}/common.json - Locale configuration:
app/utils/locales.ts - i18n setup:
app/utils/i18n.server.tsandapp/utils/i18n.ts
Locales are handled via URL routing: /{locale}/path. The locale parameter is extracted in loaders and passed to Contentful queries.
Remix file-based routing with dynamic locale prefixes:
app/routes/$locale.tsx: Layout wrapper that fetches navigation and wraps all locale-specific pagesapp/routes/$locale._index.tsx: Homepageapp/routes/$locale.$slug.tsx: Dynamic pages from Contentfulapp/routes/$locale.blog.tsx: Blog layoutapp/routes/$locale.blog._index.tsx: Blog listingapp/routes/$locale.blog.$post.tsx: Individual blog post- Language-specific routes: e.g.,
de.ich-suche-redezeit.tsx,en.i-need-speaking-time.tsxfor special pages
Pages in Contentful are composed of reusable content blocks. Each block type maps to a React component:
headerBlock→ContentBlockHeadercenteredContent→ContentBlockCenteredcontentImageBg→ContentBlockImageBgtwoImages→ContentBlockTwoImagesvideoPlayer→VideoPlayertestimonials→Testimonial- etc.
The ContentBlocks component in app/components/ContentBlocks.tsx iterates through a page's content array and renders the appropriate component for each block type.
The coach directory allows filtering by language, gender, and tags:
- Coach data comes from Contentful via
getCoaches() - Filtering logic is in
app/routes/de.ich-suche-redezeit.tsxand similar language-specific routes app/components/CoachCard.tsx: Individual coach displayapp/components/CoachSearch.tsxandapp/components/SearchBar.tsx: Search interface
- Google Tag Manager: Integrated via
GTM-NH6W3MZ - Brevo: Email marketing integration via
app/brevo.tsx - Cookie consent: Managed via
app/cookies.tswithgdprConsentcookie - Tracking is only enabled when user consents via
CookieBannercomponent
Deployed to Netlify:
- Build command:
npm run build - Publish directory:
build/client - Configuration:
netlify.toml - Adapter:
@netlify/remix-adapter
- Tailwind CSS: Primary styling framework
- Typography plugin:
@tailwindcss/typographyfor rich text - Config:
tailwind.config.js - Global styles:
app/styles/app.css
app/root.tsx: Root layout with SEO, analytics setup, and cookie bannerapp/routes/$locale.tsx: Main layout that loads navigation for all pagesapp/utils/contentful.ts: All Contentful API integrationapp/components/ContentBlocks.tsx: Content block renderergetContentfulEnvironment.js: Helper for Contentful Management API access