Files
sld-php-template/README.md
2026-04-27 09:04:05 +01:00

3.1 KiB

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 bootstrap
  • constants.php → Global constants
  • settings.php → App settings
  • db.php → Database connection
  • functions_init.php → Function loader

🧠 How It Works

  1. The application starts from index.php
  2. Core initialization is handled by the config system
  3. Templates are loaded dynamically (header.php, footer.php)
  4. Pages are rendered from the pages/ directory
  5. 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

  1. Clone the repository:

    git clone https://github.com/your-username/sld-php-template.git
    
  2. Move it into your web server directory

  3. Configure:

    • Database (config/db.php)
    • Environment settings (config/settings.php)
  4. Open in browser:

    http://localhost/your-project
    

📄 Pages

  • home.php → Main homepage
  • db-error.php → Database error page
  • env-error.php → Environment error page

🧩 Templates

Reusable layout components:

  • templates/header.php
  • templates/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.