Introduction

Overview, quickstart, project structure, and FAQs

Getting Started with Glueful

Glueful is a modern, enterprise-grade PHP API framework designed for building secure, scalable, and high-performance applications. Built with PHP 8.3+ and leveraging cutting-edge development practices, Glueful provides a comprehensive toolkit for professional API development with minimal configuration overhead.

What is Glueful?

Glueful is a high-performance PHP framework that prioritizes developer productivity while maintaining enterprise-grade features. It's designed specifically for building modern APIs with:

  • Developer-first experience - Interactive setup wizard and powerful CLI tools
  • Enterprise architecture - Production-ready with connection pooling, queues, and advanced caching
  • Security by default - Multi-layered security with CSRF, rate limiting, and secure sessions
  • Performance optimized - Built-in memory management and query optimization
  • API-first design - Automatic OpenAPI/Swagger documentation
  • Extensible - High-performance extension system

When to Use Glueful

Glueful is perfect for:

  • API-first applications - REST APIs, microservices, and backend services
  • Enterprise applications - Applications requiring robust security, performance, and scalability
  • Modern PHP development - Projects leveraging PHP 8.3+ features and modern practices
  • Rapid prototyping - Quick API development with built-in tooling
  • Team collaboration - Standardized structure and comprehensive documentation

Quick Start

Get up and running with Glueful in under 5 minutes using the API skeleton:

composer create-project glueful/api-skeleton my-api
cd my-api
php glueful serve

Your API is now running at http://127.0.0.1:8080 (try /welcome, /v1/status, /health).

From here, follow the dedicated guides:

  • Installation — requirements, skeleton vs. framework-only, running the dev server, and adding your first route

Project Structure

The API skeleton provides a clean, organized structure:

my-api/
├── app/                    # Application code
│   ├── Controllers/        # HTTP controllers
│   ├── Models/            # Data models
│   └── Services/          # Business logic
├── bootstrap/
│   └── app.php            # Framework bootstrap
├── config/                # Configuration files
│   ├── app.php            # Application config
│   ├── database.php       # Database settings
│   └── ...                # Feature-specific configs
├── database/
│   └── migrations/        # Database migrations
├── public/
│   └── index.php          # HTTP entry point
├── routes/
│   └── api.php            # Route definitions
├── storage/               # Cache, logs, database
│   ├── cache/
│   ├── logs/
│   └── database/
└── tests/                 # Test files

Core Features Overview

Foundation

  • Modern PHP 8.3+ architecture with attributes and typed properties
  • Powerful Dependency Injection container with service providers
  • Advanced routing system with PSR-15 middleware support
  • Request Context architecture eliminating superglobal dependencies

API Development

  • RESTful API endpoints with automatic OpenAPI/Swagger documentation
  • Multi-layer request validation with centralized helpers
  • Standardized error handling with secure production responses
  • Adaptive rate limiting with behavior analysis

Database & Performance

  • Connection pooling with health monitoring
  • Advanced QueryBuilder with JSON support and bulk operations
  • Repository pattern with consistent data access
  • Memory-efficient processing for large datasets

Security & Production

  • Multi-layered security (CSRF, headers, lockdown modes)
  • Permission system with role-based access control
  • Audit logging and security event tracking
  • Production-hardened defaults and monitoring

Developer Experience

  • Interactive CLI with setup wizards and generators
  • Hot-reload development server
  • Comprehensive error pages and debugging tools
  • Built-in profiling and performance monitoring

Next Steps

Now that you have Glueful running:

  1. Installation Guide - Install, run, and build your first route
  2. Configuration - Environment setup and config options
  3. Core Concepts - Learn the essentials you’ll use daily

FAQ