SLD PHP Template
A lightweight and modular PHP starter framework for building plain PHP websites without heavy dependencies.
This project is designed to provide a clean structure, reusable components, and a simple initialization system to speed up development while keeping full control over the codebase.
🚀 Features
- ⚡ Lightweight and fast (no external frameworks required)
- 📁 Clean and scalable folder structure
- 🔧 Centralized configuration system
- 🧩 Modular templates (header, footer, includes)
- 🎨 Basic frontend setup (CSS variables, animations, JS helpers)
- 🛠 Ready-to-use initialization system
- ❌ Built-in error pages (environment & database)
📂 Project Structure
.
├── admin/
├── assets/
│ ├── css/
│ ├── img/
│ └── js/
├── config/
├── functions/
├── includes/
├── pages/
├── templates/
├── themes/
├── public/
├── index.php
└── README.md
⚙️ Configuration
All core configuration is located inside the config/ directory:
init.php→ Application bootstrapconstants.php→ Global constantssettings.php→ App settingsdb.php→ Database connectionfunctions_init.php→ Function loader
🧠 How It Works
- The application starts from
index.php - Core initialization is handled by the config system
- Templates are loaded dynamically (
header.php,footer.php) - Pages are rendered from the
pages/directory - Custom logic can be added via the
functions/folder
🎨 Frontend
The project includes a minimal frontend setup:
CSS System
- Variables-based color system with multiple shades
- Basic layout styles
- Animation utilities
JavaScript
- Simple helper functions like dynamic year rendering
🛠 Usage
-
Clone the repository:
git clone https://github.com/your-username/sld-php-template.git -
Move it into your web server directory
-
Configure:
- Database (
config/db.php) - Environment settings (
config/settings.php)
- Database (
-
Open in browser:
http://localhost/your-project
📄 Pages
home.php→ Main homepagedb-error.php→ Database error pageenv-error.php→ Environment error page
🧩 Templates
Reusable layout components:
templates/header.phptemplates/footer.php
🧪 Status
🚧 This project is currently in development.
New features and improvements will be added progressively.
📌 Roadmap (Planned)
- Routing system
- Theme engine
- Admin panel structure
- CLI tools
- Environment (.env) support
- Basic authentication system
🤝 Contributing
Contributions, ideas, and feedback are welcome.
Feel free to open issues or pull requests.
📜 License
This project is licensed under the MIT License.
See the LICENSE file for details.
👤 Author
Created by Simone (SLD)
💡 Philosophy
This project aims to stay:
- Simple
- Transparent
- Framework-free
- Easy to extend
No magic, just clean PHP.