Key Features
SLD-Blocknotes is a modern, lightweight, and completely zero-dependency web application built for organizing structured technical notes, procedures, instructions, code snippets, and terminal commands. Engineered with Pure PHP, Vanilla CSS, Vanilla JavaScript, and MySQL/MariaDB, it provides maximum performance, minimal resource usage, and frictionless deployment on any Linux server or standard LAMP/LEMP stack.
- Hierarchical Block Structure: Three-tier organization:
Blocknotes→Notes→Subnotes. - Collapsible Notes (Accordion UI): Note blocks are collapsed by default to maximize vertical screen space and overview clarity. Features global "Expand All" and "Collapse All" action buttons.
- Terminal Command Subnotes: Dedicated rendering for terminal commands in a high-contrast IDE/console code box with max-height vertical scrolling and a 1-Click Clipboard Copy button with immediate visual confirmation (
โ Copied!). - Real-Time Live Search: Instant client-side search bar filtering note titles, descriptions, subnote titles, and terminal command contents, automatically expanding matched note blocks.
- JSON Storage Engine with Import & Export: Each blocknote is stored as an independent JSON file in
blocknotes/. Download any blocknote with a single click for instant backups, or import existing JSON files with built-in backward compatibility for legacy formats. - Native 4-Language Localization (IT, EN, ES, FR): Complete interface translation in English ๐ฌ๐ง, Italian ๐ฎ๐น, Spanish ๐ช๐ธ, and French ๐ซ๐ท with a quick navbar dropdown switcher and persistent database preferences for each user profile.
- Customizable User Landing Page: Users can configure their preferred landing page upon loginโeither jumping directly into the Global Dashboard or automatically opening a specific Default Blocknote.
- Role-Based Access Control & Immune Owner: 3-tier user hierarchy (
owner>admin>user). The primary Owner account cannot be deleted by any administrator or by themselves, nor demoted. - Site Customization (Owner Exclusive): The Owner can customize the global application site title and upload a high-resolution custom Favicon (with format validation and minimum 64x64px resolution verification).
- Custom HSL Theme Colors: Every user can personalize the UI color scheme by adjusting Primary, Secondary, and Tertiary HSL hue angles.
- Automated First Start Setup Wizard (
first_start.php): Guided multilingual installer that detects the first run, creates the database schema and tables, provisions Owner and Admin credentials, and creates a secure installation lock. - Live Online Demo with Hourly Auto-Reset: Fully functioning demonstration instance publicly accessible online that auto-resets every hour for instant evaluation.
Live Demo & Test Environment
A public demonstration instance of SLD-Blocknotes is available online for testing all application features, creating notes, experimenting with the search engine, and evaluating the UI without setting up a local server:
| Parameter | Access Detail |
|---|---|
| Live Demo URL | https://test-sld-blocknote.sld-server.org/ |
| Administrator Username | admin |
| Administrator Password | admin123 |
| Reset Frequency | Automatic reset every hour (database and blocknote JSON files are fully wiped and restored to clean initial states) |
Project Structure
The application follows a clean, modular architecture with zero external package managers or vendor folders:
๐ sld-blocknotes/ โโโ ๐ assets/ โ โโโ ๐ css/ โ โ โโโ ๐ animations.css # CSS keyframe animations and transitions โ โ โโโ ๐ style.css # Main stylesheet, responsive layout & components โ โ โโโ ๐ variables.css # HSL color palette and design tokens โ โโโ ๐ js/ โ โ โโโ ๐ main.js # Vanilla JS modals, collapsible notes, live search & clipboard copy โ โโโ ๐ img/ # Application icons, uploaded favicons and branding assets โโโ ๐ blocknotes/ # JSON storage directory for user blocknotes โ โโโ ๐ .gitkeep โโโ ๐ config/ โ โโโ ๐ constants.php # System path definitions and URL constants โ โโโ ๐ db.php # MySQL connection, schema auto-migration & installer router โ โโโ ๐ functions_init.php # Routing controller and page parameter sanitizer โ โโโ ๐ init.php # Session initialization and helper loader โ โโโ ๐ settings.php # Auto-generated database credentials configuration โโโ ๐ functions/ โ โโโ ๐ auth.php # Authentication, password hashing & hierarchical RBAC โ โโโ ๐ blocknotes.php # CRUD logic for blocknotes, notes, subnotes & JSON import โ โโโ ๐ functions.php # Global helper function autoloader โ โโโ ๐ lang.php # Multilingual translation dictionary (EN, IT, ES, FR) โ โโโ ๐ site_settings.php # Site title manager and high-res favicon upload validator โโโ ๐ includes/ โ โโโ ๐ head_links.php # HTML header CSS and metadata inclusions โ โโโ ๐ js_footer.php # Footer script tags and JS initialization โโโ ๐ pages/ โ โโโ ๐ 404.php # Page not found error view โ โโโ ๐ about.php # Project information page โ โโโ ๐ admin_users.php # User administration panel and Owner site settings โ โโโ ๐ db-error.php # Database connection error display โ โโโ ๐ env-error.php # Environment / PHP extension error display โ โโโ ๐ export_blocknote.php # Blocknote JSON download endpoint โ โโโ ๐ home.php # Main dashboard listing all accessible blocknotes โ โโโ ๐ login.php # Multilingual user authentication page โ โโโ ๐ logout.php # Session termination handler โ โโโ ๐ profile.php # User profile, theme colors, language & landing page settings โ โโโ ๐ view_blocknote.php # Single blocknote detail view with collapsible notes & live search โโโ ๐ templates/ โ โโโ ๐ footer.php # Global page footer template โ โโโ ๐ header.php # Navigation bar, user badge and language switcher โโโ ๐ .gitignore โโโ ๐ .htaccess # Apache URL rewrite and folder protection rules โโโ ๐ first_start.php # Automated First Start Installation Wizard โโโ ๐ index.php # Central application router and entry point โโโ ๐ LICENSE # MIT Open Source License
Module Responsibilities
| Module / File | Role & Responsibility |
|---|---|
| first_start.php | Interactive installer wizard for initializing MySQL connection, database creation, table migrations, and setting up initial Owner & Admin accounts. |
| config/db.php | Manages MySQL database connection using mysqli, runs automatic table migrations, and redirects to installer on first run. |
| functions/auth.php | Handles secure user authentication with password_hash(), role enforcement (owner, admin, user), and Owner account immunity protections. |
| functions/blocknotes.php | Full CRUD engine for reading, creating, updating, and deleting blocknotes, notes, and subnotes as JSON files on disk, plus JSON import parser. |
| functions/lang.php | Internationalization engine supporting 4 languages (EN, IT, ES, FR) with automatic session tracking and the __('key') translation helper. |
| functions/site_settings.php | Stores dynamic site configuration (e.g. site title) and provides secure favicon uploading with minimum dimension checks. |
| assets/js/main.js | Client-side interactivity: responsive modals, collapsible note accordions, real-time live search filter, and 1-click clipboard copy. |
System Requirements
- Web Server: Apache (with
mod_rewriteenabled), Nginx, or PHP CLI built-in web server. - PHP Version: PHP 7.4 or PHP 8.x (tested on 8.0, 8.1, 8.2, 8.3).
- Required PHP Extensions:
mysqli,json,session,mbstring,gd(optional, for favicon resolution verification). - Database: MySQL 5.7+ or MariaDB 10.3+.
- File Permissions: Write permissions for the web server user on
blocknotes/,config/, andassets/img/.
Installation & Setup Guide
1. Clone Repository or Download Release
Download the project ZIP archive or clone the Git repository onto your server:
git clone https://gitea.sld-server.org/sld-admin/sld-blocknotes.git cd sld-blocknotes
2. Configure Directory Permissions
Ensure your web server user (such as www-data on Debian/Ubuntu or nginx on CentOS/RHEL) has write access to the storage directories:
chmod -R 775 blocknotes/ config/ assets/img/ chown -R www-data:www-data .
3. Start Web Server
For local development or testing, you can launch PHP's built-in web server:
php -S localhost:8000
4. Run First Start Setup Wizard
Open your browser and navigate to the site URL (e.g. http://localhost:8000/ or http://your-domain.com/). The application will automatically launch the setup installer first_start.php:
- MySQL Database Credentials: Enter your MySQL Host (e.g.
localhost), Database Name (e.g.sld_blocknotes), Username, and Password. If the database does not exist, the installer will attempt to create it. - Owner Account (Super-Admin): Set the username and password for the primary Owner account. This account possesses absolute privileges and cannot be deleted.
- First Admin Account: Set the username and password for the first secondary administrator.
- Complete Setup: Click โก Complete Installation & Configure System. The wizard will create
config/settings.php, generate theconfig/installed.locksecurity file, and redirect you to the login page.
Feature Deep Dive
1. Collapsible Notes & Visual Organization
Inside each blocknote, note items are rendered as collapsible blocks that start in a collapsed state. This design allows users to manage dozens of technical procedures without cluttering the screen.
- Clicking any note header toggles its expansion with a smooth CSS transition.
- Use the top navigation buttons "Expand All" and "Collapse All" to open or close every note block at once.
2. Terminal Command Subnotes & 1-Click Copy
Subnotes support two distinct display modes:
- Standard Text: Formatted for explanatory notes, guidelines, and documentation text.
- Terminal Command: Displayed inside a high-contrast dark console box with monospace typography. Includes a dedicated Copy button in the upper right corner that immediately copies the command string to the clipboard with visual feedback (
โ Copied!).
3. Real-Time Live Search
The search bar located at the top of the blocknote view allows instant keyword filtering. As you type, the client-side JavaScript engine searches across:
- Parent note titles and descriptions.
- Subnote titles.
- Terminal command contents and code snippets.
Matching notes remain visible and are automatically expanded so you can locate the desired command or snippet instantly.
4. JSON Export & Import
Every blocknote is saved independently in blocknotes/[id].json. Through the action toolbar, you can:
- Export Blocknote (Download JSON): Download the active blocknote as a standalone
.jsonfile for backups or transferring to another server. - Import JSON: Upload an external blocknote JSON file. The importer handles both standard format files and legacy array-based schemas seamlessly.
User Roles & Access Control
| Role | Permissions & Capabilities |
|---|---|
| Owner | Full control over the system. Can manage all blocknotes, create/edit/delete admins and standard users, change the Global Application Title, and upload custom Favicons. Immune to deletion and role demotion. |
| Admin | Can view and manage all blocknotes across the system and manage standard users. Cannot delete or alter the Owner account and cannot modify Owner-only site settings. |
| User | Can create, edit, and delete their own personal blocknotes, and manage their personal profile settings (password, language, theme colors, default landing page). |
Personalization & HSL Themes
Each user can configure their workspace from the Profile page (?page=profile):
- Primary, Secondary & Tertiary Hue Angles: Fine-tune the HSL color palette to suit individual aesthetic preferences.
- Preferred Language: Select between English, Italian, Spanish, and French.
- Default Landing Page: Choose between opening the Main Dashboard or launching directly into a specific Blocknote upon login.
Blocknote JSON Schema
Example of a standard JSON file saved in the blocknotes/ directory:
{
"id": "bn_66cb12345678a",
"title": "Server Administration Notes",
"description": "Essential commands and procedures for Linux server maintenance",
"username": "admin",
"created_at": "2026-08-25 15:30:00",
"updated_at": "2026-08-26 10:15:00",
"notes": [
{
"id": "note_66cb12998765b",
"title": "Systemd Service Management",
"description": "Core commands for checking and managing system daemons",
"subnotes": [
{
"id": "sub_66cb1300a1b2c",
"title": "Check Nginx Daemon Status",
"type": "command",
"content": "sudo systemctl status nginx --no-pager -l"
},
{
"id": "sub_66cb1300d3e4f",
"title": "Reload Configuration Notes",
"type": "text",
"content": "Always test configuration syntax with nginx -t before issuing a reload."
}
]
}
]
}
License & Information
SLD-Blocknotes is released as open-source software under the MIT License.
Official Repository: https://gitea.sld-server.org/sld-admin/sld-blocknotes