glueful / api-skeleton
Glueful API Application Skeleton — Create high-performance APIs
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
pkg:composer/glueful/api-skeleton
Requires
- php: ^8.2
- glueful/framework: ^1.3.0
Requires (Dev)
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^3.6
README
A minimal API application starter powered by the Glueful framework.
Quick Start
- Install dependencies:
composer install
- Copy env (if not created):
.env
is auto-copied from.env.example
by post-create scripts - Initialize (quiet):
php glueful install --quiet
- Start server:
php glueful serve
- Visit:
http://127.0.0.1:8080/
andhttp://127.0.0.1:8080/health
CLI alternatives
vendor/bin/glueful
(from the framework package)- Make
glueful
executable to run./glueful
(runchmod +x glueful
)
Default Routes
GET /
— Welcome JSON payloadGET /health
— Lightweight health check (framework also mounts rich/health/*
)
Project Structure
bootstrap/app.php
— Boots the framework (loads env, builds container)public/index.php
— Minimal HTTP entrypointroutes/api.php
— Application routes (usesGlueful\Routing\Router
)app/
— Application code (Controllers/Services/Models)config/
— App configuration loaded by the frameworkstorage/
— Cache, logs, database (SQLite default)
Controllers & Routing
- Routes are defined in
routes/api.php
and point to controllers (e.g.,App\Controllers\WelcomeController
). - The framework auto-scans
app/Controllers
for attribute-based routes. This skeleton uses explicit routes inroutes/api.php
. You can switch toapp/Controllers
if you prefer attribute discovery.
Testing
- Base test case at
tests/TestCase.php
- Run tests:
composer test
Notes
- Default DB is SQLite at
storage/database/glueful.sqlite
- Default queue:
sync
for zero-migration startup (change in.env
if needed)