glueful / api-skeleton
Glueful API Application Skeleton — Create high-performance APIs
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
pkg:composer/glueful/api-skeleton
Requires
- php: ^8.2
- glueful/framework: ^1.7.4
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): .envis auto-copied from.env.exampleby 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 gluefulexecutable to run./glueful(runchmod +x glueful)
Default Routes
- GET /— Welcome JSON payload
- GET /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 entrypoint
- routes/api.php— Application routes (uses- Glueful\Routing\Router)
- app/— Application code (Controllers/Services/Models)
- config/— App configuration loaded by the framework
- storage/— Cache, logs, database (SQLite default)
Controllers & Routing
- Routes are defined in routes/api.phpand point to controllers (e.g.,App\Controllers\WelcomeController).
- The framework auto-scans app/Controllersfor attribute-based routes. This skeleton uses explicit routes inroutes/api.php. You can switch toapp/Controllersif 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: syncfor zero-migration startup (change in.envif needed)