# ๐Ÿ“ sld-blocknotes - Modern Block-based Notes & Command Management System > **๐ŸŒ Languages**: [๐Ÿ‡ฌ๐Ÿ‡ง English](README.md) | [๐Ÿ‡ฎ๐Ÿ‡น Italiano](README.it.md) | [๐Ÿ‡ช๐Ÿ‡ธ Espaรฑol](README.es.md) | [๐Ÿ‡ซ๐Ÿ‡ท Franรงais](README.fr.md) ![PHP](https://img.shields.io/badge/PHP-7.4%20%7C%208.x-777BB4?style=for-the-badge&logo=php&logoColor=white) ![Database](https://img.shields.io/badge/Database-MySQL%20%2F%20MariaDB-4479A1?style=for-the-badge&logo=mysql&logoColor=white) ![Frontend](https://img.shields.io/badge/Frontend-Vanilla%20CSS%20%26%20JS-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black) ![Framework](https://img.shields.io/badge/Framework-Zero%20Dependencies-22c55e?style=for-the-badge) A powerful, modern, zero-dependency Web application for organizing structured block notes, technical commands, code snippets, and instructions. Built with **Pure PHP**, **Vanilla CSS**, **Vanilla JS**, and **MySQL/MariaDB**. Repository URL: [https://gitea.sld-server.org/sld-admin/sld-blocknotes](https://gitea.sld-server.org/sld-admin/sld-blocknotes) --- ## โœจ Key Features - ๐Ÿ“‘ **Structured Block Notes & Subnotes**: - Organize notes into customizable blocknotes. - Notes contain titles, descriptions, and multiple subnotes. - **Collapsible Notes**: Collapsed by default to maximize vertical screen space, with global **Expand All / Collapse All** buttons. - โšก **Terminal Command Subnotes**: - Separate rendering for generic text subnotes vs terminal command subnotes. - **1-Click Clipboard Copy**: Copy command snippets instantly with visual feedback (`โœ“ Copied!`). - High-contrast dark IDE code box with max-height vertical scrolling. - ๐Ÿ” **Real-Time Live Search**: - Filter note titles, descriptions, subnote titles, and terminal command contents instantly inside the active blocknote view. - Automatically expands matched note blocks during search. - ๐Ÿ“ฅ / ๐Ÿ’พ **JSON Import & Export**: - Download blocknote JSON files with one click (`export_blocknote.php`). - Interactive JSON importer supporting both standard and legacy JSON formats. - ๐ŸŒ **Multilingual Interface (IT, EN, ES, FR)**: - Full interface localization in **Italian ๐Ÿ‡ฎ๐Ÿ‡น, English ๐Ÿ‡ฌ๐Ÿ‡ง, Spanish ๐Ÿ‡ช๐Ÿ‡ธ, and French ๐Ÿ‡ซ๐Ÿ‡ท**. - Quick navbar language selector for guests and logged-in users. - Each user's language choice is saved to their database profile for future logins. - ๐Ÿ  **Customizable User Landing Page**: - Choose between launching directly into the **Main Dashboard (All Blocknotes)** or opening a **Specific Default Blocknote** upon login. - ๐Ÿ‘‘ **Single Owner Role & Advanced Hierarchy (`owner` > `admin` > `user`)**: - **Immune Owner Account**: The initial Owner account (`owner`) cannot be deleted by any admin or by themselves. - Owners cannot be demoted or altered by standard administrators. - โš™๏ธ **Site Customization (Owner Exclusive)**: - Change the **Global Application / Site Title**. - Upload & validate a **High-Resolution Favicon** (min 64x64px) with real-time preview. - ๐Ÿš€ **First Start Setup Installer Wizard (`first_start.php`)**: - Automated first-time setup wizard for configuring MySQL database credentials, creating database tables, and setting up the initial `owner` and `admin` accounts. - Fully localized in all 4 languages. --- ## ๐Ÿš€ Quickstart & Installation ### Requirements - Web Server (Apache, Nginx, or PHP built-in CLI server) - PHP 7.4 or 8.x (with `mysqli` extension enabled) - MySQL 5.7+ or MariaDB 10.x+ ### Step-by-Step Installation 1. **Clone the Repository**: ```bash git clone https://gitea.sld-server.org/sld-admin/sld-blocknotes.git cd sld-blocknotes ``` 2. **Start Web Server**: You can serve the directory with your local Web server or use PHP's built-in server: ```bash php -S localhost:8000 ``` 3. **Run Automated Setup Wizard**: Navigate to `http://localhost:8000/` in your browser. The system will automatically detect first-time run and launch `first_start.php`: - Enter your **MySQL Database Credentials** (Host, Database Name, User, Password). - Configure credentials for the **Owner Account**. - Configure credentials for the **First Admin Account**. - Click **โšก Complete Installation & Configure System**. 4. **Login & Enjoy**: After setup completes, you will be redirected to `index.php?page=login` to sign in. --- ## ๐Ÿ“ Directory Structure ```text sld-blocknotes/ โ”œโ”€โ”€ assets/ โ”‚ โ”œโ”€โ”€ css/ โ”‚ โ”‚ โ””โ”€โ”€ style.css # Vanilla CSS design system & HSL variables โ”‚ โ””โ”€โ”€ js/ โ”‚ โ””โ”€โ”€ main.js # Vanilla JS modals, collapsible notes, search & copy โ”œโ”€โ”€ blocknotes/ # Blocknotes JSON storage directory โ”‚ โ””โ”€โ”€ .gitkeep โ”œโ”€โ”€ config/ โ”‚ โ”œโ”€โ”€ constants.php # Path constants definition โ”‚ โ”œโ”€โ”€ db.php # MySQL connection, auto-migration & installer redirect โ”‚ โ”œโ”€โ”€ functions_init.php # Router & page sanitization โ”‚ โ”œโ”€โ”€ init.php # System initialization โ”‚ โ””โ”€โ”€ settings.php # Database credentials configuration template โ”œโ”€โ”€ functions/ โ”‚ โ”œโ”€โ”€ auth.php # Authentication, role permissions & owner protections โ”‚ โ”œโ”€โ”€ blocknotes.php # Blocknote JSON CRUD engine & JSON importer โ”‚ โ”œโ”€โ”€ functions.php # Function module autoloader โ”‚ โ”œโ”€โ”€ lang.php # Multilingual translation dictionary (IT, EN, ES, FR) โ”‚ โ””โ”€โ”€ site_settings.php # Site title & high-resolution favicon manager โ”œโ”€โ”€ includes/ โ”‚ โ”œโ”€โ”€ head_links.php # Global CSS & favicon head includes โ”‚ โ””โ”€โ”€ js_footer.php # Global footer script includes โ”œโ”€โ”€ pages/ โ”‚ โ”œโ”€โ”€ 404.php # Not found page โ”‚ โ”œโ”€โ”€ admin_users.php # Admin user management & Owner site settings โ”‚ โ”œโ”€โ”€ db-error.php # Database error template โ”‚ โ”œโ”€โ”€ export_blocknote.php # Blocknote JSON download endpoint โ”‚ โ”œโ”€โ”€ home.php # Main blocknotes dashboard โ”‚ โ”œโ”€โ”€ login.php # Multilingual login page โ”‚ โ”œโ”€โ”€ logout.php # Session logout โ”‚ โ”œโ”€โ”€ profile.php # User profile, password, theme colors, language & landing page โ”‚ โ””โ”€โ”€ view_blocknote.php # Detail view for blocknotes, collapsible notes & search โ”œโ”€โ”€ templates/ โ”‚ โ”œโ”€โ”€ footer.php # Page footer template โ”‚ โ””โ”€โ”€ header.php # Navbar header, logo, user badges & quick language selector โ”œโ”€โ”€ .gitignore โ”œโ”€โ”€ first_start.php # Automated First Start Installation Wizard โ”œโ”€โ”€ index.php # Application entry point & router โ”œโ”€โ”€ README.md # Main English Documentation โ”œโ”€โ”€ README.it.md # Italian Documentation โ”œโ”€โ”€ README.es.md # Spanish Documentation โ””โ”€โ”€ README.fr.md # French Documentation ``` --- ## ๐Ÿ“„ License This project is open-source software available under the [MIT License](LICENSE).