3132fcb8eb838a76aa3db30e705d85ce663d6e41
Payload Global configs mirroring proto/src/content/types.ts:
- src/globals/{Home,About,Services,Contact,Common}.ts
- src/globals/fields/stringArray.ts — shared helper: Payload has no
native string[] field, so every plain string array from the old
content types (trustBullets, paragraphs, features, spec items, …)
becomes an array of one-field { value } objects.
- home.partners is intentionally NOT included — that becomes its own
Partners collection (logo -> Media upload) in MITHOME-89, to avoid
two disagreeing sources for the same data.
- contact.form.fields.gdpr.label stays a plain textarea (not lexical
richText): the JSON source is a hand-written HTML string with an
<a> tag; richText's node-tree serialization would need its own
migration/render logic, out of scope for this bootstrap pass.
scripts/migrate-content-to-payload.ts: one-shot, idempotent Local API
migration reading the existing JSON files and calling updateGlobal —
does not touch or delete the JSON files. Run via the new
`npm run migrate:content` script.
Registered the five Globals in payload.config.ts.
Also included here (belongs with the previous "resolve double-root-
layout conflict" commit but didn't actually get staged there —
verified only now by diffing HEAD against the working tree):
(frontend)/layout.tsx's relative imports corrected to ../../ instead
of ../ (one directory deeper than the original src/app/layout.tsx).
Verified:
- npm run build / lint, tsc --noEmit, npm test (58 passed) all clean
- npm run migrate:content against the real dev MongoDB container,
then read back via payload.findGlobal() — hero.title, trustBullets,
services.items[0].features, footer.address, faq.items.length all
match the JSON source
- Real browser: logged into /admin, opened the Home global editor —
Hero/Trust bullets group renders and shows the migrated Hungarian
content correctly (see screenshot shared in chat)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
- Staging: https://stage.mozdit.hu
- CMS (staging): https://cms.stage.llmdev.mozdit.hu
- ntfy (riasztás):
st_limidev_securitytopic
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.
Languages
TypeScript
60.3%
JavaScript
24.8%
HTML
7%
Shell
4.4%
CSS
3%
Other
0.4%