2.7 KiB
Executable File
2.7 KiB
Executable File
Project Knowledge
mozdIT Bt. website - Next.js 14 app for a Hungarian IT services company (web hosting, email, DNS).
Quickstart
# 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 14 application
src/app/- App Router pages and API routessrc/components/- React components (Header, Footer, ThemeProvider)src/content/- JSON content management systemtypes.ts- Content TypeScript definitionsindex.ts- Content loader utilitycommon.json- Shared texts (buttons, labels)pages/*.json- Page-specific content
src/lib/- Utilities (MongoDB, Logger, Site Config)src/config/- Static site configurationsrc/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 14 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: Linear (ZEE-* tickets) + TODO.md for task management
- Environment variables: Need
MONGODB_URI,MONGODB_DBfor 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-themeattribute on<html>, managed by ThemeProvider