Do SikiandClaude Sonnet 5 729268a3fe
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Canceled after 0s
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Canceled after 0s
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Canceled after 0s
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Canceled after 0s
feat(deploy): auto-seed a known Payload admin user on every deploy
Follow-up to MITHOME-97: after every deploy, a brand-new database
(first-ever deploy, or a volume wipe) leaves the Payload admin behind
the "Create first user" screen — someone has to notice and fill it in
by hand, which means environments can silently end up with no known
admin credentials, or with whatever a random person happened to type
in at the time.

deploy.sh now calls Payload's built-in `POST /api/users/first-register`
REST endpoint right after the healthcheck passes, using ADMIN_EMAIL /
ADMIN_PASSWORD from the environment's .env file. That endpoint only
succeeds when the `users` collection is completely empty (throws 403
Forbidden otherwise) — which makes this naturally idempotent: the
first deploy against a fresh database creates the known admin, every
later deploy gets a harmless 403 and skips it. It never overwrites an
existing user's password. Missing ADMIN_EMAIL/ADMIN_PASSWORD in the
env file just skips the step with a warning, it doesn't fail the
deploy.

Documented the new variables in .env.staging.example and
.env.production.example (next to the existing PAYLOAD_SECRET
instructions), and the new deploy.sh step 4 in
.agent/workflows/deploy.md. Also dropped a stale "Content Editor is
staging feliratot kap" line from the same doc (that behavior belonged
to the CMS retired in MITHOME-93 and no longer exists).

Verified locally against real Payload instances (not just reading the
code): a fresh, empty MongoDB returns 200 and creates the user; a
second call against the same now-non-empty database returns 403 and
changes nothing; a database that already had a different user (the
existing dev DB) also correctly returns 403.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 23:12:12 +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
  • CMS: Payload CMS (self-hosted, /admin), MongoDB adapter, draft/publish + verziózás, hu/en lokalizáció
  • Tartalom: Payload Globals/Collections (a korábbi JSON-alapú content rendszer, proto/src/content/, csak a migrációs script forrásaként és teszt-fixture-ként él tovább — MITHOME-91/93)
  • Backend: Next.js API routes, MongoDB
  • Tesztelés: Jest, React Testing Library, Playwright (smoke)
  • 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%