File Structure

Front-end root /

FileRole
index.phpMain front-end router
functions.phpFront-end utilities — includes core-functions, data-functions, theme-api, data-layer
core-functions.phpRouting, breadcrumbs, galleries, search helpers
data-functions.phpRouting, SEO, category/tag page rendering, parseRequestUri()
data-layer.phpRead-only split-file layer (sl_* functions, internal $GLOBALS cache)
admin-data-layer.phpWrite split-file layer (sl_admin_* functions, atomic operations)
tf-page.phpPage renderers: SEO tags, header scripts, logo/favicon, featured image, date, category, tags, footer, social icons, search UI
tf-cards.phpCard renderers: article/project cards, homepage sections, article summary, related items, custom fields
tf-shortcodes.phprender_content_html() pipeline, all shortcode render functions, contact form, excerpt helpers
tf-navigation.phpNavigation and menu rendering: render_menu(), renderHierarchicalMenu(), renderDefaultMenu()
tf-markdown.phpMarkdown parser: _md_to_html(), _md_inline(), container directives (:::type)
theme-api.phpHooks, filters, theme options system
install.phpFirst-run installer
lang-cache.phpi18n cache and locale management (__t(), _e(), lang_js_bridge())
lang-switch.phpFront-end language switching handler
search.phpSearch endpoint (JSON, mb_* safe)
contact-process.phpContact form handler (CSRF, rate-limit, hCaptcha, header injection guard)
feed.phpRSS feed
settings.jsonSite settings flat-file database
version.jsonCurrent CMS version

Data directory /data/

data/
├── articles/
│   ├── _index.json        — Lightweight index (metadata only)
│   ├── my-article.json    — Full article data (content, SEO, galleries, all fields)
│   └── other-article.json
├── pages/
│   ├── _index.json
│   └── my-page.json
├── projects/
│   ├── _index.json
│   └── my-project.json
├── categories.json        — Category store (slug → {name, parent, description})
└── tags.json              — Tag store (slug → {name, description})

Other key directories

PathPurpose
/bckps/Database backups and CSS editor backups — direct access blocked by .htaccess
/bckps/css/CSS editor backups (style-YYYYMMDD-HHmmss.css)
/files/Media uploads
/css/System CSS (gallery layouts, lightbox, search, shortcodes)
/js/main.jsFront-end JS (search engine, UI)
/lang/Front-end locale files (en.json, fr.json, es.json…)
/lang/admin/Admin panel locale files
/private/contact.secret32-byte HMAC key for contact form CSRF tokens
/private/contact_rate.jsonRate-limiting data per IP (max 5/hour, SHA-256 hashed IPs)
/theme/Themes directory
/admin/drafts/Autosave draft files (draft_*.json)

Admin panel /admin/

FileRole
index.phpAdmin router (dispatches via ?action=)
dashboard.phpDashboard page
content.phpContent management hub
file-manager.phpMedia manager (drag & drop)
css-editor.phpIntegrated CSS editor (active theme, CodeMirror 5, auto-backups)
batch-optimize.phpBatch image optimisation and WebP conversion
seo-overview.phpSEO overview for all published content
sitemap-generator.phpSitemap generator
settings.phpSettings handler
theme-preview.phpLive theme preview (HMAC token-based)
theme-upload.phpZIP theme import endpoint
autosave.phpDraft autosave AJAX endpoint
auth.phpAuthentication (login/logout)
alt-text-assistant.phpGallery image alt text and caption management
backup-dl.phpSecure backup download proxy
list-content.phpAJAX endpoint for server-side pagination, search, and sorting
preview.phpPost preview (published and unpublished, HTML and Markdown)
forgot-password.phpPassword reset request with email link
reset-password.phpPassword reset form
change-password.phpIn-admin password change

Admin templates /admin/templates/

TemplateRenders
content-add.phpAdd content form
content-edit.phpEdit content form
content-list.phpContent list table
menu-builder.phpVisual menu builder
settings-view.phpSettings page
theme-manager.phpTheme manager with live preview
categories-manage.phpCategory management
tags-manage.phpTag management
drafts.phpDrafts list
backup.phpBackup management
account.phpAccount settings (name, password)
tools-view.phpTools page (sitemap, SEO overview, etc.)
contact.phpContact form settings