CodeUnit Portfolio CMS
A framework-free PHP Portfolio, Blog & Digital Products Platform
Built With
📋 Project Overview
The Build
The platform was built and refined across multiple versions (v2.0–v2.17), with a focus on performance, reliability, and clean deployment. It runs on plain PHP 7.4/8 with zero Composer dependencies, backed by MySQL/MariaDB, and styled with Tailwind CSS and self-hosted Alpine.js — no CDN reliance, no Node build step.
Core Features
Blog engine with Markdown-to-HTML rendering and a built-in Table of Contents sidebar for long-form posts
Admin dashboard for managing projects, blog content, services, and coupons through a clean CRUD interface
Digital products shop for selling code and templates directly from the platform
Coupon system with corrected payment-timing logic — codes are marked used only on confirmed payment, not initiation
Consolidated schema — a single schema.sql source of truth for fast, clean installs with no migration chains
Engineering & Quality
Systematic function audit using PHP's tokenizer to catch phantom/broken function calls before deployment
Fixed a "headers already sent" bug in the admin services module
Hardened the 500 error page to render independently of database connectivity
Built a 22-test, zero-dependency regression suite — confirmed idempotent across runs
Full Git history with a clean commit structure, published to GitHub
▶️ Demo Video
🖼 Gallery
⚡ Challenges Faced
Phantom function calls — Codebase evolution left behind calls to functions that no longer existed, invisible to manual review.
Coupon logic bug — Coupons were marked "used" on payment initiation instead of confirmation, risking lost coupons on failed payments.
No framework safety nets — Zero dependencies meant every safeguard (error handling, validation, defensive coding) had to be built by hand.
Hosting constraints — Free hosting (InfinityFree) blocked external JS/CDN calls, breaking anything reliant on external scripts.
Migration drift — Incremental migration files caused inconsistency between environments over time.
💡 Key Takeaways
Built a PHP tokenizer-based audit to systematically catch phantom function calls instead of relying on manual review.
Tied coupon state to confirmed payment events, not initiation — payment logic now tested against failure paths, not just success.
Wrote defensive code deliberately (e.g., a 500 page that survives a dead database) and enforced a 22-test zero-dependency regression suite before every release.
Self-hosted all front-end dependencies (Alpine.js off CDN), removing hosting-environment fragility and making the move to Chajio Cloud (LiteSpeed/CyberPanel) seamless.
Consolidated everything into a single schema.sql as the source of truth — simpler, fewer moving parts, no drift risk.
💬 Client Feedback
“Real systems for real businesses — built properly, built to last.”