Do SikiandClaude Sonnet 5 a661739844 fix(cms): resolve double-root-layout conflict between the site and Payload admin
Next.js 16 requires either one shared root layout for every route, or
each top-level route group to be fully self-contained (no ancestor
layout.tsx above it). MITHOME-86 added (payload)/layout.tsx — which
itself renders Payload's own <html>/<body> via <RootLayout> — while
src/app/layout.tsx still existed as a shared ancestor and did the same.
The result was two React trees fighting over <html>/<body>/<head>,
surfacing in the browser as hydration failures and "You are mounting a
new html component" errors on /admin (invisible to curl-based checks
in the MITHOME-86 verification, since they only exercise SSR, not
client hydration — that verification's "confirmed live" claim was
therefore incomplete; caught now with an actual browser).

Fix, per Payload's documented multi-root pattern: move every existing
site route (page.tsx, globals.css, kapcsolat/szolgaltatasok/rolunk/
adatvedelem/felhasznalasi-feltetelek) into a new (frontend) route
group with its own layout.tsx (renamed from src/app/layout.tsx, with
relative imports adjusted one level deeper), as a sibling of (payload).
No shared layout.tsx remains directly under src/app/.

Verified in a real browser (not just curl): /admin/login and the
dashboard now render and hydrate cleanly, and all site routes
(/, /rolunk, /szolgaltatasok, /kapcsolat, /adatvedelem,
/felhasznalasi-feltetelek) are unaffected — same output, just moved.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 03:40:00 +02:00
2026-09-10 03:21:32 +02:00

mozdIT Bt. — Weboldal fejlesztés (websitedev)

Modern Next.js weboldal a mozdIT Bt. számára — webtárhely, email- és DNS-szolgáltatás, magyar IT vállalkozás.

Stack

  • Frontend: Next.js 15 (Turbopack), React 19, TypeScript, Tailwind CSS 4
  • Tartalom: JSON-alapú, séma-validált content rendszer (proto/src/content/)
  • CMS: saját, dependency-mentes content-editor.js (böngészős szerkesztő)
  • Backend: Next.js API routes, MongoDB
  • Tesztelés: Jest, React Testing Library, Playwright (smoke), valódi szervert indító CMS-tesztek
  • Deploy: natív Docker Compose (deploy.sh) + Gitea Actions nélkül, lokálisan vezérelt
  • Monitoring: Winston + Loki, plusz scripts/security-scan.sh (ntfy riasztással)

Gyors indítás

# Fejlesztői szerver
cd proto && npm run dev

# Docker fejlesztői környezet
docker-compose -f docker-compose.dev.yml up -d

# Teljes pre-deploy tesztkészlet
scripts/pre-deploy-tests.sh

Feladatkezelés (Plane)

  • Projekt: MITHOME (workspace: developments)
  • TODO.md: helyi tükör, a Plane az elsődleges forrás
  • Szinkron: node plane-sync.js (Plane → TODO.md)
  • Ticket-azonosítók: MITHOME-XX

Deploy

./scripts/deploy_to_stage_on_local.sh   # staging: teljes tesztkészlet + push + deploy + smoke
./deploy.sh production                  # éles (szerveren, staging ellenőrzése után)

A CMS „Publikálás" gombja szintén commitol + pushol + deployol (csak a beállított környezetre). Részletek: .agent/workflows/deploy.md, docs/helyi-staging-deploy.md.

Tartalomkezelés

A weboldal szövegei és a CMS a proto/src/content/ JSON-fájljaiból jönnek:

proto/src/content/
├── schema.js        # közös séma-validátor (Next + CMS)
├── types.ts         # TypeScript típusok
├── index.ts         # tartalom-betöltő
├── common.json      # közös szövegek (gombok, lábléc, a11y)
└── pages/           # oldalankénti tartalom (home, about, services, …)

Használat:

import { content, getPageContent } from '@/content'
const about = content.pages.about

Dokumentáció

  • Agent-szabályok: .agent/AGENTS.md, .agent/steering/, .agent/workflows/
  • CMS felhasználói útmutató: docs/felhasznaloi-utmutato.md (a CMS-ben a Súgó is ezt rendereli)
  • Plane szinkron: PLANE-SYNC-GUIDE.md
  • Staging deploy: docs/helyi-staging-deploy.md
  • Gitea runner: docs/gitea-runner-telepites.md

Környezetek

Biztonsági monitoring

scripts/security-scan.sh (cron, 5 percenként) kriptominer/backdoor indikátorokat figyel (álcázott folyamatnevek, /tmp/.kworkerd-jellegű maradványok, magas CPU), és találat esetén ntfy push-t küld a st_limidev_security topicra.

S
Description
No description provided
Readme MIT
2.5 MiB
Languages
TypeScript 60.3%
JavaScript 24.8%
HTML 7%
Shell 4.4%
CSS 3%
Other 0.4%