# CodePress CMS **[π³π± Nederlands](#) | [π¬π§ English](README.en.md)** Een lichtgewicht, file-based content management systeem gebouwd met PHP (β₯8.0). **Versie:** 2.5.0 | **Licentie:** AGPL v3 / Commercial ## β¨ Features - π **Multi-format Content** - Markdown, PHP en HTML bestanden - π§ **Dynamic Navigation** - Automatische menu generatie - π **Multi-language** - NL/EN/DE/FR ondersteuning - π **Search** - Volledige tekst zoekfunctie - π± **Responsive** - Bootstrap 5 thema's - π **Security** - 100/100 pentest score - π‘οΈ **Admin Console** - CodeMirror editor, media beheer, thema's, plugins - π₯ **Gebruikersrollen** - Admin, Content Beheerder, BI Beheerder, Site Admin - π **Analytics** - Bezoekersstatistieken met GeoIP - π€ **BotGuard** - Bot/AI bescherming - π **Logging** - Uitgebreid logging systeem - π **Plugin Systeem** - Sidebar plugins met eigen CSS/SCSS, Twig templates ## π Quick Start ```bash # Installeer dependencies composer install # Start server met router voor schone URLs php -S localhost:8080 cms/router.php ``` **Website:** `http://localhost:8080` **Admin:** `http://localhost:8080/admin` (login: `admin` / `admin`) ## π Handleidingen Zie **[guide/](guide/)** voor uitgebreide documentatie per rol: | Rol | Handleiding | |-----|-------------| | π Redacteur | [Content Beheerder](guide/nl/content-beheerder.md) | | βοΈ Administrator | [Admin Beheerder](guide/nl/admin-beheerder.md) | | π¨ Theme bouwer | [Theme Developer](guide/nl/theme-developer.md) | | π» Developer | [CodePress Developer](guide/nl/codepress-developer.md) | Elke handleiding heeft sub-onderdelen in aparte mappen met een zijbalknavigatie. ## π₯ Gebruikersrollen | Rol | Permissies | |-----|-----------| | **Admin** | Volledige toegang (alles) | | **Content Beheerder** | Content beheer, handleiding | | **BI Beheerder** | Statistieken, logs, handleiding | | **Site Admin** | Thema, plugins, statistieken, logs, update, handleiding | ## π Project Structuur ``` codepress/ βββ cms/ # Core CMS engine β βββ core/class/ # CMS classes (CodePressCMS, ThemeManager, etc.) β βββ core/plugin/ # Plugin systeem (PluginManager, CMSAPI) β βββ router.php # PHP dev server router (schone URLs) βββ language/ # Taalbestanden (nl/, en/, de/ β elk met site.php + admin.php) βββ admin/ # Admin console β βββ config/ # Admin configuratie (admin.json) β βββ src/AdminAuth.php # Authenticatie, rollen, permissies β βββ storage/ # Logs, cache, geoip β βββ theme/default/ # Admin thema β βββ assets/ # CSS, JS, fonts, codemirror β βββ views/ # Twig templates (layouts, pages) β βββ theme.json # Admin thema configuratie βββ themes/ # Website thema's β βββ default/ # Standaard thema β β βββ theme.json # Layout mapping, kleuren β β βββ base.twig # Hoofd layout β β βββ *.twig # Layout templates β β βββ partials/ # Header, navigation, footer β β βββ assets/ # SCSS, CSS, JS, img β βββ demo/ # Demo thema βββ plugins/ # Plugins β βββ HTMLBlock/ # Voorbeeld sidebar plugin β βββ Navigation/ # EssentiΓ«le navigatie plugin (beschermd) β βββ Navigation.php # Plugin code β βββ plugin.json # Plugin metadata β βββ assets/scss/ # Plugin SCSS bron β βββ assets/css/ # Plugin CSS βββ content/ # Website content (.md, .php, .html) βββ public/ # Web root β βββ index.php # Website entry point β βββ admin.php # Admin entry point + routing βββ guide/ # Handleidingen (nl/en) β βββ nl/ # Nederlandse handleidingen β βββ en/ # Engelse handleidingen βββ cli/test/ # Test suites βββ var/ # Cache (twig) βββ config.json # Site configuratie βββ composer.json # PHP dependencies βββ version.php # Versie informatie ``` ## βοΈ Configuratie ### config.json ```json { "site_title": "CodePress", "active_theme": "default", "default_page": "auto", "language": { "default": "nl", "available": ["nl", "en"] }, "enabled_plugins": ["HTMLBlock", "Navigation"], "features": { "search_enabled": true, "breadcrumbs_enabled": true }, "security": { "block_ai_bots": true, "rate_limit_enabled": true }, "analytics": { "enabled": true }, "logging": { "enabled": true } } ``` ## π§ Dependencies - **PHP β₯8.0** met extensies: json, mbstring - **Composer** packages: - twig/twig (templating) - scssphp/scssphp (SCSS compilatie) - league/commonmark (Markdown met HeadingPermalinks) - maxmind-db/reader (GeoIP) ## π Security - β XSS preventie (htmlspecialchars) - β CSRF tokens (admin formulieren) - β Path traversal preventie (realpath checks) - β Secure cookies (HttpOnly, SameSite) - β Security headers (X-Frame-Options, CSP) - β Bot/AI bescherming (BotGuard) - β Rate limiting per IP - β Role-based access control (RBAC) ## π Plugins ### Plugin structuur ``` plugins/MijnPlugin/ βββ MijnPlugin.php # Plugin code (naam = pluginnaam) βββ plugin.json # Plugin metadata βββ assets/scss/ # Plugin SCSS bron βββ assets/css/ # Plugin CSS (na compilatie) ``` ### EssentiΓ«le plugins De **Navigation** plugin is een essentiΓ«le plugin en kan niet worden gedeactiveerd, bewerkt of verwijderd. Deze plugin genereert automatisch de zijbalknavigatie voor handleidingen en content. ### Plugin CSS Plugin CSS wordt automatisch geladen na thema CSS, zodat thema's plugin styling kunnen overschrijven. ## π Content Voorbeelden ### Markdown met frontmatter ```markdown --- layout: full_content plugins: HTMLBlock, Navigation --- # Pagina titel Content in Markdown formaat... ``` ### PHP content ```php getAllPages(); echo "
Aantal pagina's: " . count($pages) . "
"; ``` ## π§ͺ Testen ```bash # Penetration tests cli/test/pentest/security-test.sh # Accessibility tests (WCAG 2.1 AA) cli/test/accessibility.sh # Functionele tests cli/test/functional/*.sh ``` ## π Ondersteuning - **Documentatie:** [guide/](guide/) - **Issues:** Git repository - **Contact:** commercial@noorlander.info ## π Licentie **Dual-licensed:** - **AGPL v3** - Voor open-source projecten - **Commercial** - Voor propriΓ«tair gebruik Zie [LICENSE](LICENSE) voor details. --- **CodePress CMS** - Gebouwd door E.Noorlander / CodePress Development Team