HDPost is a self-contained, single-file PHP and SQLite creative illustration studio and artwork archive. It provides an art-sharing platform (similar to Pixiv or ArtStation) with zero external server dependencies, responsive client-side routing, and modern media processing.
- Self-Contained Architecture: Entire backend API, database initialization, front-end SPA (Vanilla JS + CSS), and PWA service worker run out of a single file (
index.php). - Chunked File Uploads: Uploads large image and video files in 2MB chunks to bypass strict server upload limits.
- Visual Perceptual Search: Computes 64-bit perceptual hashes (
pHash) to match visually similar images using Hamming distance calculations. - Artwork Management: Supports multi-page illustration sets (up to 500 images with a "See All" viewer), batch uploads, and video playback (MP4, WebM, MOV).
- Feeds & Discovery: Home feed, Hall of Fame rankings (daily/weekly/monthly), R-18 filter, and searchable directories for tags, characters, series/parodies, and artists.
- Social Features: Like system, artist following, and threaded nested commentary supporting Markdown formatting with DOMPurify sanitization.
- Administration & Moderation: Role hierarchy (Super Admin, Admins, Artists), account banning, artwork deletion, comment moderation, and storage tracking.
- Security: Built-in CSRF token validation, IP-based rate limiting, PDO parameterized queries, EXIF orientation fixes, and
.htaccessfile-access denial for data directories.
- PHP: 7.4 or 8.0+
- PHP Extensions:
pdo_sqlite,gd,fileinfo,mbstring - Web Server: Apache (with
mod_rewriteoptional), Nginx, or PHP's built-in development server. - Storage: Read/write permissions in the script's directory.
- Place
index.phpin your web server's public document root (or desired subfolder). - Ensure PHP has write permissions in the directory.
- Open the URL in your web browser (e.g.,
http://localhost/index.phporphp -S 127.0.0.1:8000). - On the first launch, the Setup Wizard will prompt you to create the initial Super Administrator account.
- The application will automatically create and secure the
hdpost_data/directory containing the SQLite database, uploads, and thumbnail cache.