# Project Knowledge mozdIT Bt. website - Next.js 15 app for a Hungarian IT services company (web hosting, email, DNS). ## Quickstart ```bash # Setup cd proto && npm install # Dev server (with Turbopack) cd proto && npm run dev # Docker dev environment (includes MongoDB, Grafana, Loki) docker-compose -f docker-compose.dev.yml up -d # Tests cd proto && npm test # Unit tests cd proto && npm run test:all # All tests (unit + browser + docker) ``` ## Architecture - **proto/** - Main Next.js 15 application - `src/app/` - App Router pages and API routes - `src/components/` - React components (Header, Footer, ThemeProvider) - `src/content/` - **JSON content management system** - `types.ts` - Content TypeScript definitions - `index.ts` - Content loader utility - `common.json` - Shared texts (buttons, labels) - `pages/*.json` - Page-specific content - `src/lib/` - Utilities (MongoDB, Logger, Site Config) - `src/config/` - Static site configuration - `src/types/` - TypeScript definitions - **docker/** - MongoDB initialization scripts - **docs/** - Project documentation (Hungarian) - **scripts/** - Test sync and reporting scripts Path alias: `@/*` → `./src/*` ## Commands (run from proto/) | Command | Description | |---------|-------------| | `npm run dev` | Dev server with Turbopack | | `npm run build` | Production build | | `npm run lint` | ESLint check | | `npm test` | Unit tests | | `npm run test:browser` | Browser integration tests | | `npm run test:integration` | Docker integration tests | | `npm run test:e2e` | End-to-end tests | | `npm run test:all` | All test suites | | `npm run docker:dev` | Start Docker stack | ## Conventions - **Language**: Hungarian content, English code/comments - **Stack**: Next.js 15 App Router, TypeScript, Tailwind CSS 4 - **Design System**: CSS variables, dark mode, animations in `globals.css` - **Content**: JSON files in `src/content/` for all page texts - **Database**: MongoDB with Mongoose - **Logging**: Winston with Loki integration - **Testing**: Jest + React Testing Library - **ESLint**: next/core-web-vitals + next/typescript ## Gotchas - **All commands run from `proto/`** - The main app lives in the proto subdirectory - **Docker required for integration tests** - Start with `docker-compose -f docker-compose.dev.yml up -d` - **Dual tracking**: Plane (MITHOME-* tickets) + TODO.md for task management - **Environment variables**: Need `MONGODB_URI`, `MONGODB_DB` for database connection - **Path mapping**: Use `@/` imports (e.g., `@/lib/mongodb`, `@/content`) - **Content changes**: Edit JSON files in `src/content/pages/` - rebuild container to see changes - **Dark mode**: Uses `data-theme` attribute on ``, managed by ThemeProvider