Madraset El Shamamsa
A long-running Coptic education platform whose PHP architecture, delivery pipeline, and modernization work support a large multilingual content library.
A publishing platform built for a living tradition
Madraset El Shamamsa is an Arabic-first educational platform for Coptic hymns, language, liturgy, history, Bible study, and formation. I started it in 2016 and have continued to own its product direction and engineering: content modeling, page composition, search, performance, security, deployment, and the gradual modernization of a large PHP codebase.
The challenge is not simply publishing articles. Different libraries have different data, navigation, media, and presentation needs, while readers expect the whole site to feel coherent on phones and slower connections. The current repository contains more than 1,100 content pages. A 2024 analytics snapshot recorded roughly 292,000 users; those numbers describe a point-in-time operational snapshot, not a guarantee of current traffic.
The architectural idea
The platform uses thin PHP page entrypoints backed by library-specific generate-* assemblers. An assembler loads page data, selects reusable content fragments, and wraps them in a shared shell for navigation, metadata, scripts, and the footer. The result is fully rendered HTML without requiring a client-side application framework.
That model sits inside a broader delivery system:
- PHP and MySQL provide server-rendered content and application features.
- Vite owns the modern JavaScript/CSS build, development HMR, and production manifest with hashed asset names.
- Docker Compose provides a reproducible local topology for PHP/Apache, MySQL, Vite, phpMyAdmin, and the separate assistant Worker.
- Cloudflare fronts production traffic, while R2 serves large static media through a dedicated asset path.
- Route-aware cache rules express intended policies for static extensions, reading pages, private pages, and APIs; deployed response headers still require live verification.
This is deliberately described as a PHP page-composition/rendering pipeline, not a general-purpose SSR framework. It is a project-specific architecture that reduced repetition across many related libraries.
Outcomes and trade-offs
The composition system made shared changes practical across a large content surface and delivered crawlable HTML by default. Separating the Vite asset pipeline from PHP page rendering also allows frontend tooling to improve incrementally without rewriting the publishing model.
The same longevity creates modernization work. Newer endpoints use PDO and prepared statements, while some legacy paths still contain interpolated mysqli queries. Security helpers cover sessions and CSRF-protected flows, but the current allowlist-based Content Security Policy still permits unsafe-inline and unsafe-eval. These are tracked constraints, not hidden behind claims of complete modernization.
Case-study series
This five-part series documents the implemented behavior and its current constraints: