File Structure
Root /
| File | Role |
|---|---|
index.php | Front-end router |
install.php | First-run installer |
config.json | Site settings flat-file store (admin folder name, active theme, language, SEO defaults…) — direct access blocked |
version.json | Current CMS version, checked against the update registry |
plugins.json (plugin activation registry) lives in /plugins/, not the root — see Plugins.
Core libraries /core/
| File | Role |
|---|---|
functions.php | Bootstrap loader — requires every file below, in order, then theme/{active}/functions.php |
core-functions.php | Routing helpers, breadcrumbs, galleries, search helpers, resolve_admin_dir() |
data-functions.php | Routing, SEO, category/tag page rendering, parseRequestUri() |
data-layer.php | Read-only split-file layer (sl_* functions) |
admin-data-layer.php | Write layer (sl_admin_* functions) — save, trash, revisions, index writes |
plugin-api.php | Plugin registry, activation state, admin-menu hook, pl_* hook/filter system |
lang-cache.php | i18n cache and locale management (__t(), _e(), __n()) |
search.php | Search endpoint |
contact-process.php | Contact form handler |
feed.php | RSS feed |
llms.php / llms-full.php | Serve /llms.txt and /llms-full.txt (LLM indexer files) — loaded standalone, before functions.php, to stay lightweight |
Rendering /core/render/
| File | Role |
|---|---|
theme-api.php | Requires the five files below, plus the hook/filter/theme-options system |
tf-page.php | SEO tags, header scripts, logo/favicon, featured image, date, category, tags, footer, search UI |
tf-cards.php | Article/project cards, homepage sections, summaries, related items, custom fields |
tf-shortcodes.php | render_content_html() pipeline and every shortcode renderer |
tf-navigation.php | renderHierarchicalMenu(), renderDefaultMenu() |
tf-markdown.php | Markdown parser, container directives (:::type) |
Data directory /data/
data/
├── articles/{_index.json, {slug}.json…}
├── pages/{_index.json, {slug}.json…}
├── projects/{_index.json, {slug}.json…}
├── drafts/{draft_*.json…} — in-progress items before first publish
├── categories.json
└── tags.json
Every content item also has its own trash and revisions store, created on demand next to its type folder (see Data Layer).
Cache /cache/
Nothing here is hand-edited; every file rebuilds automatically and is safe to delete.
| Path | Contains |
|---|---|
lang/front/{locale}.php, lang/admin/{locale}.php | Compiled locale strings |
sl_idx_{type}.cache.php | Compiled index caches |
sl_categories.cache.php, sl_tags.cache.php | Compiled taxonomy caches |
media-stats.json | Cached media library stats |
htaccess-check.json | Cached dashboard check for public /data/ exposure on nginx |
Other key directories
| Path | Purpose |
|---|---|
/assets/css/, /assets/js/ | System CSS/JS (search, galleries, lightbox, shortcodes) |
/bckps/ | Backups: full-site exports, update safety snapshots, template editor file backups |
/files/ | Media uploads |
/lang/front/, /lang/admin/ | Locale files |
/private/ | Never web-accessible: users.json, contact.secret, theme_preview.secret, contact_rate.json, auth_rate.json, search_rate.json, activity-log.json, audit-log.json |
/theme/ | Installed themes |
/plugins/ | Installed plugins, plus plugins.json (activation registry) |
Admin panel /admin/
The admin folder name is configurable at install time and read from config.json['admin_dir'] — never hardcoded. Key files:
| File | Role |
|---|---|
index.php | Admin router (?action=), including ?action=plugin_page for plugin admin pages |
content.php | Content save/delete/trash/restore/revision actions |
manage-users.php | Multi-user account create/update/delete/role-change |
file-manager.php, file-upload.php, get-files.php, image-optimization.php, batch-optimize.php | Media manager |
template-editor.php | Theme file editor with per-file backups |
theme-preview.php | Live theme preview (signed token) |
extension-upload.php | ZIP import for themes and plugins |
autosave.php | Draft autosave endpoint |
preview.php | Live post preview (published and unpublished) |
seo-overview.php, alt-text-assistant.php, sitemap-generator.php | SEO tools |
auth.php, forgot-password.php, reset-password.php, change-password.php | Authentication |
translations-api.php | Translation editor AJAX endpoint |
list-content.php | Server-side pagination/search/sort for the content list |
backup-dl.php | Backup download proxy |
/admin/includes/
admin-functions.php, backup-functions.php, extension-update-functions.php, admin-icons.php, zip-validation.php, session-config.php, layout.php, sidebar.php.
/admin/templates/
content-add.php, content-edit.php, content-list.php, trash.php, revision-diff.php, pending-diff.php, activity-log.php, users.php, system-info.php, menu-builder.php, settings-view.php, theme-manager.php, categories-manage.php, tags-manage.php, backup.php, account.php, translations.php, update.php, plugins-manager.php, contact.php.
/admin/cache/
extensions-check.json, update-check.json, news-cache.json — all disposable, admin-only, distinct from the root /cache/.
Plugins
plugins/
├── plugins.json — activation registry: { "slug": { "active": bool } }
└── my-plugin/
├── plugin.json — manifest, must set "synaptik_plugin": true
├── my-plugin-init.php — entry file declared in plugin.json
├── data/ — plugin's own JSON store, .htaccess-protected
├── private/ — CSRF secrets, rate-limit stores, .htaccess-protected
├── admin/{admin-page.php, actions.php}
├── assets/
└── lang/
A plugin present on disk but absent (or inactive) in plugins.json never runs — activating it is what loads it, via pl_load_active_plugins() in core/functions.php. See the Plugins category for the hook/filter API and integration points.
Version history of this layout
| Change | Since |
|---|---|
/css/, /js/ → /assets/css/, /assets/js/; /lang/*.json → /lang/front/*.json | 1.2 |
settings.json → config.json; root PHP libraries moved to /core/ and /core/render/; plugin registry moved to /plugins/plugins.json | 1.3.3 |
Autosave drafts moved from /admin/drafts/ into /data/drafts/ (drafts are now real, trashable, revisable content) | 1.4.0 |
/private/users.json (multi-user accounts), /private/activity-log.json, per-item trash and revisions folders added | 1.4.0 |
Upgrades migrate all of the above automatically on first load — no manual action needed. Theme code using the standard API (render_header_scripts(), __t(), _e(), etc.) is never affected by internal path changes.
